aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini3
-rw-r--r--tests/wpt/metadata/MANIFEST.json10
-rw-r--r--tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini9
-rw-r--r--tests/wpt/metadata/encoding/single-byte-decoder.html.ini2
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini4
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini4
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini4
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini22
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini10
-rw-r--r--tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini7
-rw-r--r--tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html.ini11
-rw-r--r--tests/wpt/metadata/resource-timing/buffer-full-add-after-full-event.html.ini2
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html167
13 files changed, 233 insertions, 22 deletions
diff --git a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini
index 3a3d15b8406..3b874fc1748 100644
--- a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini
+++ b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini
@@ -14,9 +14,6 @@
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
- [Revoke blob URL after calling fetch, fetch should succeed]
- expected: FAIL
-
[url-with-fetch.any.html]
[Untitled]
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index 6ae6d9a9624..e7b7cd2ec3c 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -378735,6 +378735,12 @@
{}
]
],
+ "html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html": [
+ [
+ "/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html",
+ {}
+ ]
+ ],
"html/webappapis/scripting/events/compile-event-handler-settings-objects.html": [
[
"/html/webappapis/scripting/events/compile-event-handler-settings-objects.html",
@@ -632904,6 +632910,10 @@
"1e43d1ccd476a530738cfdc7846adad807ca1edc",
"testharness"
],
+ "html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html": [
+ "ed6c006651162aeaac41a4ad7a8e81ad0bbd457e",
+ "testharness"
+ ],
"html/webappapis/scripting/events/compile-event-handler-settings-objects.html": [
"29ac9b8ced469025278b5d5215b651b58a6f5a4d",
"testharness"
diff --git a/tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini b/tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini
index b245ee1cb1f..5307319dca4 100644
--- a/tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini
+++ b/tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini
@@ -1,6 +1,5 @@
[matchMedia.xht]
bug: https://github.com/servo/servo/issues/20818
- expected: TIMEOUT
[window.matchMedia exists]
expected: FAIL
@@ -8,11 +7,5 @@
expected: FAIL
[Resize iframe from 200x100 to 200x50, then to 100x50]
- expected: NOTRUN
-
- [Listeners are called in the order which they have been added]
- expected: NOTRUN
-
- [Listener added twice is only called once.]
- expected: NOTRUN
+ expected: FAIL
diff --git a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini
index ca5a9dc5e16..ace97d3719d 100644
--- a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini
+++ b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini
@@ -2,7 +2,7 @@
type: testharness
[single-byte-decoder.html?document]
- expected: CRASH
+ expected: TIMEOUT
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini
new file mode 100644
index 00000000000..87b07c3e670
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini
@@ -0,0 +1,4 @@
+[traverse_the_history_1.html]
+ [Multiple history traversals from the same task]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini
new file mode 100644
index 00000000000..51f8272a6de
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini
@@ -0,0 +1,4 @@
+[traverse_the_history_3.html]
+ [Multiple history traversals, last would be aborted]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini
new file mode 100644
index 00000000000..385376c7321
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini
@@ -0,0 +1,4 @@
+[traverse_the_history_4.html]
+ [Multiple history traversals, last would be aborted]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini
index 29b0025a2ae..0f1a214d0ee 100644
--- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini
+++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini
@@ -5,11 +5,29 @@
expected: TIMEOUT
[picture: source (max-width:500px) valid image, img valid image, resize to wide]
- expected: TIMEOUT
+ expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to narrow]
expected: TIMEOUT
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
- expected: TIMEOUT
+ expected: FAIL
+
+ [picture: source (max-width:500px) broken image, img valid image, resize to narrow]
+ expected: FAIL
+
+ [img (srcset 1 cand) valid image, resize to wide]
+ expected: FAIL
+
+ [picture: same URL in source (max-width:500px) and img, resize to wide]
+ expected: FAIL
+
+ [img (srcset 1 cand) valid image, resize to narrow]
+ expected: FAIL
+
+ [picture: source (max-width:500px) valid image, img broken image, resize to wide]
+ expected: FAIL
+
+ [picture: same URL in source (max-width:500px) and img, resize to narrow]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini
new file mode 100644
index 00000000000..8cc42056d34
--- /dev/null
+++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini
@@ -0,0 +1,10 @@
+[non-active-document.html]
+ [DOMParser]
+ expected: FAIL
+
+ [createHTMLDocument]
+ expected: FAIL
+
+ [<template>]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini
deleted file mode 100644
index 9e522297c94..00000000000
--- a/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[toggleEvent.html]
- [Calling open twice on 'details' fires only one toggle event]
- expected: FAIL
-
- [Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html.ini
new file mode 100644
index 00000000000..6ed21fb34b1
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html.ini
@@ -0,0 +1,11 @@
+[compile-event-handler-lexical-scopes.html]
+ expected: TIMEOUT
+ [The EventHandler is an element's event handler and has no form owner.]
+ expected: FAIL
+
+ [The EventHandler is an element's event handler and has a form owner.]
+ expected: FAIL
+
+ [The EventHandler is not an element's event handler (i.e. Window's event handler) and has no form owner.]
+ expected: TIMEOUT
+
diff --git a/tests/wpt/metadata/resource-timing/buffer-full-add-after-full-event.html.ini b/tests/wpt/metadata/resource-timing/buffer-full-add-after-full-event.html.ini
index e6fe241b4ed..8f8c89cb287 100644
--- a/tests/wpt/metadata/resource-timing/buffer-full-add-after-full-event.html.ini
+++ b/tests/wpt/metadata/resource-timing/buffer-full-add-after-full-event.html.ini
@@ -1,5 +1,5 @@
[buffer-full-add-after-full-event.html]
expected: ERROR
[Test that entry was added to the buffer after a buffer full event]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html
new file mode 100644
index 00000000000..ed6c0066511
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-lexical-scopes.html
@@ -0,0 +1,167 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Lexical scopes when compiling an inline event handler</title>
+<link rel="help" href="https://html.spec.whatwg.org/C/#getting-the-current-value-of-the-event-handler">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+setup({allow_uncaught_exception: true});
+</script>
+
+<!-- test case 1: element, document, and window -->
+
+<table>
+ <tr id="test1_outer">
+ <td id="test1_target" onclick="
+window.testResults.complete = typeof(complete);
+window.testResults.cellIndex = typeof(cellIndex);
+window.testResults.cells = typeof(cells);
+window.testResults.domain = typeof(domain);
+window.testResults.print = typeof(print);
+window.testResults.testResults = typeof(testResults);
+window.testResults.target_own_property = typeof(target_own_property);
+window.testResults.inner_own_property = typeof(inner_own_property);
+window.testResults.outer_own_property = typeof(outer_own_property);
+window.testResults.event = typeof(event);
+">
+ <img id="test1_inner">
+ </td>
+ </tr>
+</table>
+
+<script>
+"use strict";
+
+test(() => {
+ const target_element = document.getElementById("test1_target");
+ const inner_element = document.getElementById("test1_inner");
+ const outer_element = document.getElementById("test1_outer");
+
+ target_element.target_own_property = {};
+ inner_element.inner_own_property = {};
+ outer_element.outer_own_property = {};
+
+ const results = window.testResults = {};
+ // Clicking an inner element makes the event target where the event handler is
+ // registered doesn't match the event target that the event is fired. From a
+ // point of view |target_element|, event.target != event.currentTarget.
+ inner_element.click();
+ // Expected scopes are: |target_element|, document, and window.
+ assert_equals(results.complete, "undefined", "HTMLImageElement.prototype.complete");
+ assert_equals(results.cellIndex, "number", "HTMLTableCellElement.prototype.cellIndex");
+ assert_equals(results.cells, "undefined", "HTMLTableRowElement.prototype.cellIndex");
+ assert_equals(results.domain, "string", "Document.prototype.domain");
+ assert_equals(results.print, "function", "window.print");
+ assert_equals(results.testResults, "object");
+ assert_equals(results.target_own_property, "object");
+ assert_equals(results.inner_own_property, "undefined");
+ assert_equals(results.outer_own_property, "undefined");
+ assert_equals(results.event, "object", "The argument of event handler");
+}, "The EventHandler is an element's event handler and has no form owner.");
+</script>
+
+
+<!-- test case 2: element, form owner, document, and window -->
+
+<form id="test2_form_owner" onsubmit="return false;">
+ <!-- 'button' is a form-associated element and has a form owner.
+ https://html.spec.whatwg.org/C/#form-associated-element
+ -->
+ <button id="test2_target" onclick="
+window.testResults.cite = typeof(cite);
+window.testResults.autofocus = typeof(autofocus);
+window.testResults.form = typeof(form);
+window.testResults.encoding = typeof(encoding);
+window.testResults.domain = typeof(domain);
+window.testResults.print = typeof(print);
+window.testResults.testResults = typeof(testResults);
+window.testResults.target_own_property = typeof(target_own_property);
+window.testResults.inner_own_property = typeof(inner_own_property);
+window.testResults.form_owner_own_property = typeof(form_owner_own_property);
+window.testResults.event = typeof(event);
+">
+ <q id="test2_inner"></q>
+ </button>
+</form>
+
+<script>
+"use strict";
+
+test(() => {
+ const target_element = document.getElementById("test2_target");
+ const inner_element = document.getElementById("test2_inner");
+ const form_owner_element = document.getElementById("test2_form_owner");
+
+ target_element.target_own_property = {};
+ inner_element.inner_own_property = {};
+ form_owner_element.form_owner_own_property = {};
+
+ const results = window.testResults = {};
+ // Clicking an inner element makes the event target where the event handler is
+ // registered doesn't match the event target that the event is fired. From a
+ // point of view |target_element|, event.target != event.currentTarget.
+ inner_element.click();
+ // Expected scopes are: |target_element|, form owner, document, and window.
+ assert_equals(results.cite, "undefined", "HTMLQuoteElement.prototype.cite");
+ assert_equals(results.autofocus, "boolean", "HTMLButtonElement.prototype.autofocus");
+ assert_equals(results.form, "object", "HTMLButtonElement.prototype.form");
+ assert_equals(results.encoding, "string", "HTMLFormElement.prototype.encoding");
+ assert_equals(results.domain, "string", "Document.prototype.domain");
+ assert_equals(results.print, "function", "window.print");
+ assert_equals(results.testResults, "object");
+ assert_equals(results.target_own_property, "object");
+ assert_equals(results.inner_own_property, "undefined");
+ assert_equals(results.form_owner_own_property, "object");
+ assert_equals(results.event, "object", "The argument of event handler");
+}, "The EventHandler is an element's event handler and has a form owner.");
+</script>
+
+
+<!-- test case 3: element and window -->
+
+<a id="test3_inner"></a>
+
+<script>
+"use strict";
+
+// This test is placed at last so that it can safely use a global variable
+// without conflicting other tests. Only this test is asynchronous.
+async_test(t => {
+ const target_element = window;
+ const inner_element = document.getElementById("test3_inner");
+
+ target_element.target_own_property = {};
+ inner_element.inner_own_property = {};
+ document.body.body_own_property = {};
+
+ // "onerror" is one of the Window-reflecting body element event handler set.
+ // https://html.spec.whatwg.org/C/#window-reflecting-body-element-event-handler-set
+ // So, the EventHandler is treated as a Window's event handler.
+ document.body.setAttribute("onerror", "\
+window.testResults.ping = typeof(ping); \
+window.testResults.domain = typeof(domain); \
+window.testResults.print = typeof(print); \
+window.testResults.testResults = typeof(testResults); \
+window.testResults.target_own_property = typeof(target_own_property); \
+window.testResults.inner_own_property = typeof(inner_own_property); \
+window.testResults.body_own_property = typeof(body_own_property); \
+window.testResults.event = typeof(event); \
+");
+
+ const results = window.testResults = {};
+ window.addEventListener("error", t.step_func_done(() => {
+ // Expected scopes are: |target_element| and window only.
+ assert_equals(results.domain, "undefined", "Document.prototype.domain");
+ assert_equals(results.print, "function", "window.print");
+ assert_equals(results.testResults, "object");
+ assert_equals(results.target_own_property, "object");
+ assert_equals(results.inner_own_property, "undefined");
+ assert_in_array(results.event, ["object", "string"], "The first argument of onerror event handler");
+ }));
+
+ // Make a compilation error happen in order to invoke onerror event handler.
+ inner_element.setAttribute("onclick", "cause a compilation error");
+ inner_element.click();
+}, "The EventHandler is not an element's event handler (i.e. Window's event handler) and has no form owner.");
+</script>