From 986610f6ed1a5467d13f78ec3434bbf164d77513 Mon Sep 17 00:00:00 2001
From: WPT Sync Bot
Date: Fri, 17 Jul 2020 08:20:46 +0000
Subject: [PATCH] Update web-platform-tests to revision
8ba782c9d5a545b850cd8920032cb14cfbab2c35
---
.../url/url-in-tags-revoke.window.js.ini | 2 +-
.../CSS2/floats/hit-test-floats-003.html.ini | 4 +
.../CSS2/floats/hit-test-floats-004.html.ini | 4 +
.../CSS2/floats/hit-test-floats-005.html.ini | 4 +
.../css/cssom-view/CaretPosition-001.html.ini | 4 +
...ryList-addListener-removeListener.html.ini | 3 +
.../cssom-view/elementFromPoint-001.html.ini | 4 -
.../cssom-view/elementFromPosition.html.ini | 3 -
.../elementsFromPoint-invalid-cases.html.ini | 4 -
.../matchMedia-display-none-iframe.html.ini | 2 -
.../fetch/content-type/response.window.js.ini | 25 +--
.../fetch/content-type/script.window.js.ini | 6 -
.../nosniff/parsing-nosniff.window.js.ini | 3 -
.../traverse_the_history_1.html.ini | 4 -
.../traverse_the_history_4.html.ini | 4 -
.../supported-elements.html.ini | 3 +
.../iframe-loading-lazy.html.ini | 6 +
.../iframe_sandbox_popups_escaping-1.html.ini | 2 +-
...rame_sandbox_popups_nonescaping-1.html.ini | 2 +-
...rame_sandbox_popups_nonescaping-2.html.ini | 3 +-
...rame_sandbox_popups_nonescaping-3.html.ini | 3 +-
.../image-loading-lazy.html.ini | 13 ++
.../module-static-import-delayed.html.ini | 4 -
...le-event-handler-settings-objects.html.ini | 2 +-
.../realtimeanalyser-fft-scaling.html.ini | 1 -
.../webmessaging/with-ports/017.html.ini | 5 -
.../url/url-in-tags-revoke.window.js.ini | 2 +-
tests/wpt/metadata/MANIFEST.json | 158 ++++++++++++++----
.../CSS2/floats/hit-test-floats-003.html.ini | 4 +
.../CSS2/floats/hit-test-floats-004.html.ini | 4 +
.../CSS2/floats/hit-test-floats-005.html.ini | 4 +
.../css/cssom-view/CaretPosition-001.html.ini | 4 +
...ryList-addListener-removeListener.html.ini | 3 +
.../cssom-view/elementFromPoint-001.html.ini | 4 -
.../cssom-view/elementFromPosition.html.ini | 3 -
.../elementsFromPoint-invalid-cases.html.ini | 4 -
.../matchMedia-display-none-iframe.html.ini | 2 -
.../fetch/content-type/response.window.js.ini | 25 +--
.../fetch/content-type/script.window.js.ini | 6 -
.../nosniff/parsing-nosniff.window.js.ini | 3 -
.../traverse_the_history_1.html.ini | 4 -
.../traverse_the_history_4.html.ini | 4 -
.../supported-elements.html.ini | 3 +
.../iframe-loading-lazy.html.ini | 6 +
.../iframe_sandbox_popups_escaping-1.html.ini | 2 +-
...rame_sandbox_popups_nonescaping-1.html.ini | 2 +-
...rame_sandbox_popups_nonescaping-2.html.ini | 3 +-
...rame_sandbox_popups_nonescaping-3.html.ini | 3 +-
.../image-loading-lazy-load-event.html.ini | 4 -
.../image-loading-lazy.html.ini | 12 ++
.../module-static-import-delayed.html.ini | 4 -
...le-event-handler-settings-objects.html.ini | 2 +-
.../realtimeanalyser-fft-scaling.html.ini | 1 -
.../webmessaging/with-ports/017.html.ini | 5 -
.../idb-explicit-commit-throw.any.js | 8 -
.../IndexedDB/idb-explicit-commit.any.js | 7 -
.../idbobjectstore_putall.tentative.any.js | 7 -
.../audio-output/idlharness.https.window.js | 5 +-
.../position-relative-percentage-top-002.html | 12 ++
.../grid-item-flex-container-001.html | 132 +++++++++++++++
.../aspect-ratio/abspos-009.tentative.html | 12 ++
.../aspect-ratio/abspos-010.tentative.html | 9 +
.../aspect-ratio/abspos-011.tentative.html | 11 ++
.../api/resources/infinite-slow-response.py | 13 +-
.../fetch/api/resources/stash-put.py | 16 +-
.../fetch/api/resources/stash-take.py | 6 +-
.../iframe-loading-lazy.html | 48 ++++--
.../image-loading-lazy-load-event.html | 51 ------
.../the-img-element/image-loading-lazy.html | 100 +++++++++--
.../interfaces/audio-output.idl | 4 +
.../web-platform-tests/interfaces/streams.idl | 4 +-
.../interfaces/uievents.idl | 21 ++-
.../interfaces/wai-aria.idl | 82 ++++-----
.../chromium/mock-screenenumeration.js | 19 ++-
.../screen_enumeration/README.md | 1 +
.../getScreens.tentative.https.window.js | 78 ++++++---
.../getScreens.values.https.html | 109 +++++++-----
.../isMultiScreen.tentative.https.window.js | 40 +++++
.../isMultiScreen.values.https.html | 42 +++++
.../tools/ci/epochs_update.sh | 7 +-
.../wpt/web-platform-tests/tools/lint/lint.py | 69 +++++---
.../web-platform-tests/tools/lint/rules.py | 10 ++
.../tools/lint/tests/test_file_lints.py | 27 +++
tests/wpt/web-platform-tests/tools/wpt/run.py | 4 +-
.../wptserve/tests/functional/test_server.py | 23 +++
.../tools/wptserve/tests/test_request.py | 29 +++-
.../tools/wptserve/wptserve/request.py | 11 ++
.../tools/wptserve/wptserve/response.py | 3 +-
.../tools/wptserve/wptserve/server.py | 10 ++
.../constructor-allowed-to-start.html | 25 +++
.../rendering/draw-buffers.html.ini | 3 +
91 files changed, 1030 insertions(+), 429 deletions(-)
create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini
create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini
create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini
create mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini
delete mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini
delete mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini
delete mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/matchMedia-display-none-iframe.html.ini
delete mode 100644 tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini
delete mode 100644 tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini
create mode 100644 tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/image-loading-lazy.html.ini
delete mode 100644 tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini
delete mode 100644 tests/wpt/metadata-layout-2020/webmessaging/with-ports/017.html.ini
create mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini
create mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini
create mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini
create mode 100644 tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini
delete mode 100644 tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini
delete mode 100644 tests/wpt/metadata/css/cssom-view/elementsFromPoint-invalid-cases.html.ini
delete mode 100644 tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini
delete mode 100644 tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini
delete mode 100644 tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini
delete mode 100644 tests/wpt/metadata/html/semantics/embedded-content/the-img-element/image-loading-lazy-load-event.html.ini
delete mode 100644 tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini
delete mode 100644 tests/wpt/metadata/webmessaging/with-ports/017.html.ini
create mode 100644 tests/wpt/web-platform-tests/css/css-flexbox/position-relative-percentage-top-002.html
create mode 100644 tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-item-flex-container-001.html
create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/abspos-009.tentative.html
create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/abspos-010.tentative.html
create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/abspos-011.tentative.html
delete mode 100644 tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-load-event.html
create mode 100644 tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.tentative.https.window.js
create mode 100644 tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.values.https.html
create mode 100644 tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/constructor-allowed-to-start.html
diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini
index 3605e8f3fc9..76b44d9e9cf 100644
--- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini
+++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini
@@ -4,7 +4,7 @@
expected: TIMEOUT
[Opening a blob URL in a new window immediately before revoking it works.]
- expected: TIMEOUT
+ expected: FAIL
[Fetching a blob URL immediately before revoking it works in an iframe.]
expected: FAIL
diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini
new file mode 100644
index 00000000000..f29da48a2a0
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini
@@ -0,0 +1,4 @@
+[hit-test-floats-003.html]
+ [Miss float below something else]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini
new file mode 100644
index 00000000000..4bfb0c2053a
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini
@@ -0,0 +1,4 @@
+[hit-test-floats-004.html]
+ [Miss float below something else]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini
new file mode 100644
index 00000000000..baa9f1a7541
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini
@@ -0,0 +1,4 @@
+[hit-test-floats-005.html]
+ [Miss clipped float]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini
new file mode 100644
index 00000000000..4c79907309b
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini
@@ -0,0 +1,4 @@
+[CaretPosition-001.html]
+ [Element at (400, 100)]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini
index 628b1fab770..c884dc82eab 100644
--- a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini
+++ b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini
@@ -2,3 +2,6 @@
[listeners are called when
-
-
-
diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy.html
index 0c1c39a8ae9..35f25f8a154 100644
--- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy.html
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy.html
@@ -1,38 +1,95 @@
diff --git a/tests/wpt/web-platform-tests/interfaces/audio-output.idl b/tests/wpt/web-platform-tests/interfaces/audio-output.idl
index cf0f46d08bc..2041e6ea8fd 100644
--- a/tests/wpt/web-platform-tests/interfaces/audio-output.idl
+++ b/tests/wpt/web-platform-tests/interfaces/audio-output.idl
@@ -7,3 +7,7 @@ partial interface HTMLMediaElement {
[SecureContext] readonly attribute DOMString sinkId;
[SecureContext] Promise setSinkId (DOMString sinkId);
};
+
+partial interface MediaDevices {
+ Promise selectAudioOutput();
+};
diff --git a/tests/wpt/web-platform-tests/interfaces/streams.idl b/tests/wpt/web-platform-tests/interfaces/streams.idl
index 35f558f624a..3d7484a20e0 100644
--- a/tests/wpt/web-platform-tests/interfaces/streams.idl
+++ b/tests/wpt/web-platform-tests/interfaces/streams.idl
@@ -137,7 +137,7 @@ dictionary UnderlyingSink {
};
callback UnderlyingSinkStartCallback = any (WritableStreamDefaultController controller);
-callback UnderlyingSinkWriteCallback = Promise (WritableStreamDefaultController controller, optional any chunk);
+callback UnderlyingSinkWriteCallback = Promise (any chunk, WritableStreamDefaultController controller);
callback UnderlyingSinkCloseCallback = Promise ();
callback UnderlyingSinkAbortCallback = Promise (optional any reason);
@@ -180,7 +180,7 @@ dictionary Transformer {
callback TransformerStartCallback = any (TransformStreamDefaultController controller);
callback TransformerFlushCallback = Promise (TransformStreamDefaultController controller);
-callback TransformerTransformCallback = Promise (TransformStreamDefaultController controller, optional any chunk);
+callback TransformerTransformCallback = Promise (any chunk, TransformStreamDefaultController controller);
[Exposed=(Window,Worker,Worklet)]
interface TransformStreamDefaultController {
diff --git a/tests/wpt/web-platform-tests/interfaces/uievents.idl b/tests/wpt/web-platform-tests/interfaces/uievents.idl
index b00f7badb90..67405ebf118 100644
--- a/tests/wpt/web-platform-tests/interfaces/uievents.idl
+++ b/tests/wpt/web-platform-tests/interfaces/uievents.idl
@@ -3,8 +3,9 @@
// (https://github.com/tidoust/reffy-reports)
// Source: UI Events (https://w3c.github.io/uievents/)
-[Constructor(DOMString type, optional UIEventInit eventInitDict), Exposed=Window]
+[Exposed=Window]
interface UIEvent : Event {
+ constructor(DOMString type, optional UIEventInit eventInitDict);
readonly attribute Window? view;
readonly attribute long detail;
};
@@ -14,8 +15,9 @@ dictionary UIEventInit : EventInit {
long detail = 0;
};
-[Constructor(DOMString type, optional FocusEventInit eventInitDict), Exposed=Window]
+[Exposed=Window]
interface FocusEvent : UIEvent {
+ constructor(DOMString type, optional FocusEventInit eventInitDict);
readonly attribute EventTarget? relatedTarget;
};
@@ -23,8 +25,9 @@ dictionary FocusEventInit : UIEventInit {
EventTarget? relatedTarget = null;
};
-[Constructor(DOMString type, optional MouseEventInit eventInitDict), Exposed=Window]
+[Exposed=Window]
interface MouseEvent : UIEvent {
+ constructor(DOMString type, optional MouseEventInit eventInitDict);
readonly attribute long screenX;
readonly attribute long screenY;
readonly attribute long clientX;
@@ -72,8 +75,9 @@ dictionary EventModifierInit : UIEventInit {
boolean modifierSymbolLock = false;
};
-[Constructor(DOMString type, optional WheelEventInit eventInitDict), Exposed=Window]
+[Exposed=Window]
interface WheelEvent : MouseEvent {
+ constructor(DOMString type, optional WheelEventInit eventInitDict);
// DeltaModeCode
const unsigned long DOM_DELTA_PIXEL = 0x00;
const unsigned long DOM_DELTA_LINE = 0x01;
@@ -92,8 +96,9 @@ dictionary WheelEventInit : MouseEventInit {
unsigned long deltaMode = 0;
};
-[Constructor(DOMString type, optional InputEventInit eventInitDict), Exposed=Window]
+[Exposed=Window]
interface InputEvent : UIEvent {
+ constructor(DOMString type, optional InputEventInit eventInitDict);
readonly attribute DOMString? data;
readonly attribute boolean isComposing;
readonly attribute DOMString inputType;
@@ -105,8 +110,9 @@ dictionary InputEventInit : UIEventInit {
DOMString inputType = "";
};
-[Constructor(DOMString type, optional KeyboardEventInit eventInitDict), Exposed=Window]
+[Exposed=Window]
interface KeyboardEvent : UIEvent {
+ constructor(DOMString type, optional KeyboardEventInit eventInitDict);
// KeyLocationCode
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
@@ -136,8 +142,9 @@ dictionary KeyboardEventInit : EventModifierInit {
boolean isComposing = false;
};
-[Constructor(DOMString type, optional CompositionEventInit eventInitDict), Exposed=Window]
+[Exposed=Window]
interface CompositionEvent : UIEvent {
+ constructor(DOMString type, optional CompositionEventInit eventInitDict);
readonly attribute DOMString data;
};
diff --git a/tests/wpt/web-platform-tests/interfaces/wai-aria.idl b/tests/wpt/web-platform-tests/interfaces/wai-aria.idl
index d5d8f32521a..5b1bacc932f 100644
--- a/tests/wpt/web-platform-tests/interfaces/wai-aria.idl
+++ b/tests/wpt/web-platform-tests/interfaces/wai-aria.idl
@@ -10,53 +10,53 @@ Element includes AccessibilityRole;
interface mixin AriaAttributes {
- attribute DOMString? ariaAtomic;
- attribute DOMString? ariaAutoComplete;
- attribute DOMString? ariaBusy;
- attribute DOMString? ariaChecked;
- attribute DOMString? ariaColCount;
- attribute DOMString? ariaColIndex;
- attribute DOMString? ariaColIndexText;
- attribute DOMString? ariaColSpan;
+ attribute DOMString ariaAtomic;
+ attribute DOMString ariaAutoComplete;
+ attribute DOMString ariaBusy;
+ attribute DOMString ariaChecked;
+ attribute DOMString ariaColCount;
+ attribute DOMString ariaColIndex;
+ attribute DOMString ariaColIndexText;
+ attribute DOMString ariaColSpan;
- attribute DOMString? ariaCurrent;
+ attribute DOMString ariaCurrent;
- attribute DOMString? ariaDescription;
+ attribute DOMString ariaDescription;
- attribute DOMString? ariaDisabled;
+ attribute DOMString ariaDisabled;
- attribute DOMString? ariaExpanded;
+ attribute DOMString ariaExpanded;
- attribute DOMString? ariaHasPopup;
- attribute DOMString? ariaHidden;
- attribute DOMString? ariaInvalid;
- attribute DOMString? ariaKeyShortcuts;
- attribute DOMString? ariaLabel;
+ attribute DOMString ariaHasPopup;
+ attribute DOMString ariaHidden;
+ attribute DOMString ariaInvalid;
+ attribute DOMString ariaKeyShortcuts;
+ attribute DOMString ariaLabel;
- attribute DOMString? ariaLevel;
- attribute DOMString? ariaLive;
- attribute DOMString? ariaModal;
- attribute DOMString? ariaMultiLine;
- attribute DOMString? ariaMultiSelectable;
- attribute DOMString? ariaOrientation;
+ attribute DOMString ariaLevel;
+ attribute DOMString ariaLive;
+ attribute DOMString ariaModal;
+ attribute DOMString ariaMultiLine;
+ attribute DOMString ariaMultiSelectable;
+ attribute DOMString ariaOrientation;
- attribute DOMString? ariaPlaceholder;
- attribute DOMString? ariaPosInSet;
- attribute DOMString? ariaPressed;
- attribute DOMString? ariaReadOnly;
- attribute DOMString? ariaRelevant;
- attribute DOMString? ariaRequired;
- attribute DOMString? ariaRoleDescription;
- attribute DOMString? ariaRowCount;
- attribute DOMString? ariaRowIndex;
- attribute DOMString? ariaRowIndexText;
- attribute DOMString? ariaRowSpan;
- attribute DOMString? ariaSelected;
- attribute DOMString? ariaSetSize;
- attribute DOMString? ariaSort;
- attribute DOMString? ariaValueMax;
- attribute DOMString? ariaValueMin;
- attribute DOMString? ariaValueNow;
- attribute DOMString? ariaValueText;
+ attribute DOMString ariaPlaceholder;
+ attribute DOMString ariaPosInSet;
+ attribute DOMString ariaPressed;
+ attribute DOMString ariaReadOnly;
+
+ attribute DOMString ariaRequired;
+ attribute DOMString ariaRoleDescription;
+ attribute DOMString ariaRowCount;
+ attribute DOMString ariaRowIndex;
+ attribute DOMString ariaRowIndexText;
+ attribute DOMString ariaRowSpan;
+ attribute DOMString ariaSelected;
+ attribute DOMString ariaSetSize;
+ attribute DOMString ariaSort;
+ attribute DOMString ariaValueMax;
+ attribute DOMString ariaValueMin;
+ attribute DOMString ariaValueNow;
+ attribute DOMString ariaValueText;
};
Element includes AriaAttributes;
diff --git a/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js b/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js
index 5a2d7b18d28..2e41f59ea80 100644
--- a/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js
+++ b/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js
@@ -44,11 +44,22 @@ var ScreenEnumerationTest = (() => {
}
async getDisplays() {
+ if (!this.success_)
+ return Promise.resolve({ result: undefined, });
+ let value = new blink.mojom.Displays();
+ value.displays = this.displays_;
+ value.internalId = this.internalId_;
+ value.primaryId = this.primaryId_;
+ return Promise.resolve({ result: value, });
+ }
+
+ async hasMultipleDisplays() {
+ if (!this.success_)
+ return Promise.resolve({ result: blink.mojom.MultipleDisplays.kError });
return Promise.resolve({
- displays: this.displays_,
- internalId: this.internalId_,
- primaryId: this.primaryId_,
- success: this.success_,
+ result: this.displays_.length > 1
+ ? blink.mojom.MultipleDisplays.kTrue
+ : blink.mojom.MultipleDisplays.kFalse,
});
}
}
diff --git a/tests/wpt/web-platform-tests/screen_enumeration/README.md b/tests/wpt/web-platform-tests/screen_enumeration/README.md
index e3de83d0a89..42a5ebfc516 100644
--- a/tests/wpt/web-platform-tests/screen_enumeration/README.md
+++ b/tests/wpt/web-platform-tests/screen_enumeration/README.md
@@ -19,6 +19,7 @@ The `ScreenEnumerationTest` interface is defined as:
addDisplay(display); // Push display to the display vector.
removeDisplay(id); // Remove display from the display vector.
async getDisplays(); // Interceptor of getDisplays (screen_enumeration.mojom).
+ async hasMultipleDisplays(); // Interceptor of hasMultipleDisplays (screen_enumeration.mojom).
};
```
diff --git a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js
index f496282b016..ad982b219cb 100644
--- a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js
+++ b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js
@@ -1,39 +1,63 @@
// META: global=window
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
-"use strict";
+'use strict';
-promise_test(async testCase => {
- assert_equals(typeof self.getScreens, "function");
-}, "self.getScreens is present");
+promise_test(async t => {
+ assert_equals(typeof self.getScreens, 'function');
+}, 'getScreens() is present');
-promise_test(async testCase => {
- await test_driver.set_permission({name: "window-placement"}, "granted");
+promise_test(async t => {
+ await test_driver.set_permission({name: 'window-placement'}, 'granted');
const screens = await self.getScreens();
assert_greater_than(screens.length, 0);
- assert_equals(typeof screens[0].availWidth, "number");
- assert_equals(typeof screens[0].availHeight, "number");
- assert_equals(typeof screens[0].width, "number");
- assert_equals(typeof screens[0].height, "number");
- assert_equals(typeof screens[0].colorDepth, "number");
- assert_equals(typeof screens[0].pixelDepth, "number");
+ assert_equals(typeof screens[0].availWidth, 'number');
+ assert_equals(typeof screens[0].availHeight, 'number');
+ assert_equals(typeof screens[0].width, 'number');
+ assert_equals(typeof screens[0].height, 'number');
+ assert_equals(typeof screens[0].colorDepth, 'number');
+ assert_equals(typeof screens[0].pixelDepth, 'number');
- assert_equals(typeof screens[0].availLeft, "number");
- assert_equals(typeof screens[0].availTop, "number");
- assert_equals(typeof screens[0].left, "number");
- assert_equals(typeof screens[0].top, "number");
- assert_equals(typeof screens[0].orientation, "object");
+ assert_equals(typeof screens[0].availLeft, 'number');
+ assert_equals(typeof screens[0].availTop, 'number');
+ assert_equals(typeof screens[0].left, 'number');
+ assert_equals(typeof screens[0].top, 'number');
+ assert_equals(typeof screens[0].orientation, 'object');
- assert_equals(typeof screens[0].primary, "boolean");
- assert_equals(typeof screens[0].internal, "boolean");
- assert_equals(typeof screens[0].scaleFactor, "number");
- assert_equals(typeof screens[0].id, "string");
- assert_equals(typeof screens[0].touchSupport, "boolean");
-}, "self.getScreens returns at least 1 Screen with permission granted");
+ assert_equals(typeof screens[0].primary, 'boolean');
+ assert_equals(typeof screens[0].internal, 'boolean');
+ assert_equals(typeof screens[0].scaleFactor, 'number');
+ assert_equals(typeof screens[0].id, 'string');
+ assert_equals(typeof screens[0].touchSupport, 'boolean');
+}, 'getScreens() returns at least 1 Screen with permission granted');
-promise_test(async testCase => {
+promise_test(async t => {
+ await test_driver.set_permission({name: 'window-placement'}, 'granted');
+ assert_greater_than((await self.getScreens()).length, 0);
await test_driver.set_permission({name: 'window-placement'}, 'denied');
- const screens = await self.getScreens();
- assert_equals(screens.length, 0);
-}, 'self.getScreens returns no Screen objects with permission denied');
+ await promise_rejects_dom(t, 'NotAllowedError', self.getScreens());
+}, 'getScreens() rejects the promise with permission denied');
+
+async_test(async t => {
+ await test_driver.set_permission({name: 'window-placement'}, 'granted');
+ let iframe = document.body.appendChild(document.createElement('iframe'));
+ assert_greater_than((await iframe.contentWindow.getScreens()).length, 0);
+
+ iframe.contentWindow.onunload = t.step_func(async () => {
+ // TODO(crbug.com/1106132): This should reject or resolve; not hang.
+ // assert_greater_than((await iframe.contentWindow.getScreens()).length, 0);
+
+ let iframeGetScreens = iframe.contentWindow.getScreens;
+ let constructor = iframe.contentWindow.DOMException;
+ assert_not_equals(iframeGetScreens, undefined);
+ assert_not_equals(constructor, undefined);
+
+ await t.step_wait(() => !iframe.contentWindow, "execution context invalid");
+ assert_equals(iframe.contentWindow, null);
+ await promise_rejects_dom(t, 'InvalidStateError', constructor, iframeGetScreens());
+ t.done();
+ });
+
+ document.body.removeChild(iframe);
+}, "getScreens() resolves for attached iframe; rejects for detached iframe");
diff --git a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.values.https.html b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.values.https.html
index 3b8060786e1..881396adbc3 100644
--- a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.values.https.html
+++ b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.values.https.html
@@ -1,19 +1,37 @@
-
+
Screen Enumeration: getScreens() tentative
-
-
-
-
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.tentative.https.window.js b/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.tentative.https.window.js
new file mode 100644
index 00000000000..515731cc04f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.tentative.https.window.js
@@ -0,0 +1,40 @@
+// META: global=window
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+'use strict';
+
+promise_test(async t => {
+ assert_equals(typeof self.isMultiScreen, 'function');
+}, 'isMultiScreen() is present');
+
+promise_test(async t => {
+ await test_driver.set_permission({name: 'window-placement'}, 'granted');
+ assert_equals(typeof await self.isMultiScreen(), 'boolean');
+}, 'isMultiScreen() returns a boolean value with permission granted');
+
+promise_test(async t => {
+ await test_driver.set_permission({name: 'window-placement'}, 'denied');
+ assert_equals(typeof await self.isMultiScreen(), 'boolean');
+}, 'isMultiScreen() returns a boolean value with permission denied');
+
+async_test(async t => {
+ let iframe = document.body.appendChild(document.createElement('iframe'));
+ assert_equals(typeof await iframe.contentWindow.isMultiScreen(), 'boolean');
+
+ iframe.contentWindow.onunload = t.step_func(async () => {
+ // TODO(crbug.com/1106132): This should reject or resolve; not hang.
+ // assert_equals(typeof await iframe.contentWindow.isMultiScreen(), 'boolean');
+
+ let iframeIsMultiScreen = iframe.contentWindow.isMultiScreen;
+ let constructor = iframe.contentWindow.DOMException;
+ assert_not_equals(iframeIsMultiScreen, undefined);
+ assert_not_equals(constructor, undefined);
+
+ await t.step_wait(() => !iframe.contentWindow, "execution context invalid");
+ assert_equals(iframe.contentWindow, null);
+ await promise_rejects_dom(t, 'InvalidStateError', constructor, iframeIsMultiScreen());
+ t.done();
+ });
+
+ document.body.removeChild(iframe);
+}, "isMultiScreen() resolves for attached iframe; rejects for detached iframe");
diff --git a/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.values.https.html b/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.values.https.html
new file mode 100644
index 00000000000..5146803ea9c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.values.https.html
@@ -0,0 +1,42 @@
+
+
+Screen Enumeration: isMultiScreen() tentative
+
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/tools/ci/epochs_update.sh b/tests/wpt/web-platform-tests/tools/ci/epochs_update.sh
index 4b393fa6db5..f460814c962 100755
--- a/tests/wpt/web-platform-tests/tools/ci/epochs_update.sh
+++ b/tests/wpt/web-platform-tests/tools/ci/epochs_update.sh
@@ -26,7 +26,12 @@ main () {
do
EPOCH=$(get_epoch_timeval ${e})
EPOCH_BRANCH_NAME=$(get_epoch_branch_name ${e})
- git branch ${EPOCH_BRANCH_NAME} $(./wpt rev-list --epoch ${EPOCH})
+ EPOCH_SHA=$(./wpt rev-list --epoch ${EPOCH})
+ if [ "${EPOCH_SHA}" = "" ]; then
+ echo "ERROR: Empty SHA returned from ./wpt rev-list"
+ exit 1
+ fi
+ git branch "${EPOCH_BRANCH_NAME}" "${EPOCH_SHA}"
ALL_BRANCHES_NAMES="${ALL_BRANCHES_NAMES} ${EPOCH_BRANCH_NAME}"
done
# This is safe because `git push` will by default fail for a non-fast-forward
diff --git a/tests/wpt/web-platform-tests/tools/lint/lint.py b/tests/wpt/web-platform-tests/tools/lint/lint.py
index 14052e7a972..ad053dcca58 100644
--- a/tests/wpt/web-platform-tests/tools/lint/lint.py
+++ b/tests/wpt/web-platform-tests/tools/lint/lint.py
@@ -48,6 +48,11 @@ if MYPY:
# ignores the error.
Ignorelist = Dict[Text, Dict[Text, Set[Optional[int]]]]
+ try:
+ from xml.etree import cElementTree as ElementTree
+ except ImportError:
+ from xml.etree import ElementTree as ElementTree # type: ignore
+
logger = None # type: Optional[logging.Logger]
@@ -521,6 +526,9 @@ def check_parsed(repo_root, path, f):
if timeout_value != "long":
errors.append(rules.InvalidTimeout.error(path, (timeout_value,)))
+ required_elements = [] # type: List[Text]
+
+ testharnessreport_nodes = [] # type: List[ElementTree.Element]
if source_file.testharness_nodes:
test_type = source_file.manifest_items()[0]
if test_type not in ("testharness", "manual"):
@@ -543,31 +551,12 @@ def check_parsed(repo_root, path, f):
if variant != "" and variant[0] not in ("?", "#"):
errors.append(rules.MalformedVariant.error(path, (path,)))
- seen_elements = {"timeout": False,
- "testharness": False,
- "testharnessreport": False}
- required_elements = [key for key, value in {"testharness": True,
- "testharnessreport": len(testharnessreport_nodes) > 0,
- "timeout": len(source_file.timeout_nodes) > 0}.items()
- if value]
-
- for elem in source_file.root.iter():
- if source_file.timeout_nodes and elem == source_file.timeout_nodes[0]:
- seen_elements["timeout"] = True
- if seen_elements["testharness"]:
- errors.append(rules.LateTimeout.error(path))
-
- elif elem == source_file.testharness_nodes[0]:
- seen_elements["testharness"] = True
-
- elif testharnessreport_nodes and elem == testharnessreport_nodes[0]:
- seen_elements["testharnessreport"] = True
- if not seen_elements["testharness"]:
- errors.append(rules.EarlyTestharnessReport.error(path))
-
- if all(seen_elements[name] for name in required_elements):
- break
+ required_elements.extend(key for key, value in {"testharness": True,
+ "testharnessreport": len(testharnessreport_nodes) > 0,
+ "timeout": len(source_file.timeout_nodes) > 0}.items()
+ if value)
+ testdriver_vendor_nodes = [] # type: List[ElementTree.Element]
if source_file.testdriver_nodes:
if len(source_file.testdriver_nodes) > 1:
errors.append(rules.MultipleTestdriver.error(path))
@@ -579,6 +568,38 @@ def check_parsed(repo_root, path, f):
if len(testdriver_vendor_nodes) > 1:
errors.append(rules.MultipleTestdriverVendor.error(path))
+ required_elements.append("testdriver")
+ if len(testdriver_vendor_nodes) > 0:
+ required_elements.append("testdriver-vendor")
+
+ if required_elements:
+ seen_elements = defaultdict(bool)
+
+ for elem in source_file.root.iter():
+ if source_file.timeout_nodes and elem == source_file.timeout_nodes[0]:
+ seen_elements["timeout"] = True
+ if seen_elements["testharness"]:
+ errors.append(rules.LateTimeout.error(path))
+
+ elif source_file.testharness_nodes and elem == source_file.testharness_nodes[0]:
+ seen_elements["testharness"] = True
+
+ elif testharnessreport_nodes and elem == testharnessreport_nodes[0]:
+ seen_elements["testharnessreport"] = True
+ if not seen_elements["testharness"]:
+ errors.append(rules.EarlyTestharnessReport.error(path))
+
+ elif source_file.testdriver_nodes and elem == source_file.testdriver_nodes[0]:
+ seen_elements["testdriver"] = True
+
+ elif testdriver_vendor_nodes and elem == testdriver_vendor_nodes[0]:
+ seen_elements["testdriver-vendor"] = True
+ if not seen_elements["testdriver"]:
+ errors.append(rules.EarlyTestdriverVendor.error(path))
+
+ if all(seen_elements[name] for name in required_elements):
+ break
+
for element in source_file.root.findall(".//{http://www.w3.org/1999/xhtml}script[@src]"):
src = element.attrib["src"]
diff --git a/tests/wpt/web-platform-tests/tools/lint/rules.py b/tests/wpt/web-platform-tests/tools/lint/rules.py
index 6ffd749b9ad..c67745792d1 100644
--- a/tests/wpt/web-platform-tests/tools/lint/rules.py
+++ b/tests/wpt/web-platform-tests/tools/lint/rules.py
@@ -242,6 +242,16 @@ class EarlyTestharnessReport(Rule):
to_fix = "flip the order"
+class EarlyTestdriverVendor(Rule):
+ name = "EARLY-TESTDRIVER-VENDOR"
+ description = collapse("""
+ Test file has an instance of
+ `
+
+