WebKit Bugzilla
Attachment 346734 Details for
Bug 188390
: REGRESSION(r234669): Didn't commit the actual change (Requested by rniwa on #webkit).
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ROLLOUT of r234669
bug-188390-20180807172100.patch (text/plain), 20.18 KB, created by
WebKit Commit Bot
on 2018-08-07 14:21:01 PDT
(
hide
)
Description:
ROLLOUT of r234669
Filename:
MIME Type:
Creator:
WebKit Commit Bot
Created:
2018-08-07 14:21:01 PDT
Size:
20.18 KB
patch
obsolete
>Subversion Revision: 234669 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index fc40b06fcbcba857ea06fdb3589bd99cc6a12ae6..d040c486f7571f5743508b3c86c4f89ee5f2c2f1 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2018-08-07 Commit Queue <commit-queue@webkit.org> >+ >+ Unreviewed, rolling out r234669. >+ https://bugs.webkit.org/show_bug.cgi?id=188390 >+ >+ Didn't commit the actual change (Requested by rniwa on >+ #webkit). >+ >+ Reverted changeset: >+ >+ "document.open and document.write must throw while the HTML >+ parser is synchronously constructing a custom element" >+ https://bugs.webkit.org/show_bug.cgi?id=187319 >+ https://trac.webkit.org/changeset/234669 >+ > 2018-08-07 Ryosuke Niwa <rniwa@webkit.org> > > document.open and document.write must throw while the HTML parser is synchronously constructing a custom element >diff --git a/LayoutTests/fast/custom-elements/resources/navigation-destination.html b/LayoutTests/fast/custom-elements/resources/navigation-destination.html >deleted file mode 100644 >index ede8d2c6eb13ea0d8b633780160811559e283950..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/custom-elements/resources/navigation-destination.html >+++ /dev/null >@@ -1,9 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<body> >-<p>Navigated!</p> >-<script> >-parent.postMessage('didNavigate', '*'); >-</script> >-</body> >-</html> >diff --git a/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-expected.txt b/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-expected.txt >deleted file mode 100644 >index d976fe770479edebc867449bfe18960a7c31839a..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-expected.txt >+++ /dev/null >@@ -1,13 +0,0 @@ >- >-PASS document.open() must throw an InvalidStateError when synchronously constructing a custom element >-PASS document.open("text/html") must throw an InvalidStateError when synchronously constructing a custom element >-PASS document.open(URL) must NOT throw an InvalidStateError when synchronously constructing a custom element >-PASS document.close() must throw an InvalidStateError when synchronously constructing a custom element >-PASS document.write must throw an InvalidStateError when synchronously constructing a custom element >-PASS document.writeln must throw an InvalidStateError when synchronously constructing a custom element >-PASS document.open() of another document must not throw an InvalidStateError when synchronously constructing a custom element >-PASS document.open("text/html") of another document must not throw an InvalidStateError when synchronously constructing a custom element >-PASS document.close() of another document must not throw an InvalidStateError when synchronously constructing a custom element >-PASS document.write of another document must not throw an InvalidStateError when synchronously constructing a custom element >-PASS document.writeln of another document must not throw an InvalidStateError when synchronously constructing a custom element >- >diff --git a/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html b/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html >deleted file mode 100644 >index aa4c7b0dbfe6d13e4f03449862c174147776033c..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html >+++ /dev/null >@@ -1,117 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<title>Custom Elements: create an element for a token must increment and decrement document's throw-on-dynamic-markup-insertion counter</title> >-<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> >-<meta name="assert" content="Invoking document.open, document.write, document.writeln, and document.write must throw an exception when the HTML parser is creating a custom element for a token"> >-<meta name="help" content="https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token"> >-<meta name="help" content="https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#throw-on-dynamic-markup-insertion-counter"> >-<script src="../../resources/testharness.js"></script> >-<script src="../../resources/testharnessreport.js"></script> >-<script src="../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> >-</head> >-<body> >-<div id="log"></div> >-<script> >- >-async function construct_custom_element_in_parser(test, call_function) >-{ >- const window = await create_window_in_test(test); >- const document = window.document; >- >- document.open(); >- >- let executed = false; >- let exception = null; >- class CustomElement extends window.HTMLElement { >- constructor() { >- super(); >- try { >- call_function(document, window); >- } catch (error) { >- exception = error; >- } >- executed = true; >- } >- } >- window.customElements.define('some-element', CustomElement); >- >- document.write('<!DOCTYPE html><html><body><some-element></some-element></body></html>'); >- document.close(); >- >- assert_true(executed, 'Must synchronously instantiate a custom element'); >- return {window, document, exception}; >-} >- >-promise_test(async function () { >- const result = await construct_custom_element_in_parser(this, (document) => document.open()); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >-}, 'document.open() must throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const result = await construct_custom_element_in_parser(this, (document) => document.open('text/html')); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >-}, 'document.open("text/html") must throw an InvalidStateError when synchronously constructing a custom element'); >- >-// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open-window >-promise_test(async function () { >- let load_promise = new Promise((resolve) => window.onmessage = (event) => resolve(event.data)); >- const result = await construct_custom_element_in_parser(this, (document, window) => document.open('resources/navigation-destination.html', '_self', '')); >- assert_equals(result.exception, null); >- assert_equals(await load_promise, 'didNavigate'); >-}, 'document.open(URL) must NOT throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const result = await construct_custom_element_in_parser(this, (document) => document.close()); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >-}, 'document.close() must throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const result = await construct_custom_element_in_parser(this, (document) => document.write('<b>some text</b>')); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >- assert_equals(result.document.querySelector('b'), null, 'Must not insert new content'); >- assert_false(result.document.documentElement.innerHTML.includes('some text'), 'Must not insert new content'); >-}, 'document.write must throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const result = await construct_custom_element_in_parser(this, (document) => document.writeln('<b>some text</b>')); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >- assert_equals(result.document.querySelector('b'), null, 'Must not insert new content'); >- assert_false(result.document.documentElement.innerHTML.includes('some text'), 'Must not insert new content'); >-}, 'document.writeln must throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await construct_custom_element_in_parser(this, (document) => another_window.document.open()); >- assert_equals(result.exception, null); >-}, 'document.open() of another document must not throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await construct_custom_element_in_parser(this, (document) => another_window.document.open('text/html')); >- assert_equals(result.exception, null); >-}, 'document.open("text/html") of another document must not throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await construct_custom_element_in_parser(this, (document) => another_window.document.close()); >- assert_equals(result.exception, null); >-}, 'document.close() of another document must not throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await construct_custom_element_in_parser(this, (document) => another_window.document.write('<b>some text</b>')); >- assert_equals(result.exception, null); >- assert_equals(another_window.document.querySelector('b').outerHTML, '<b>some text</b>'); >-}, 'document.write of another document must not throw an InvalidStateError when synchronously constructing a custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await construct_custom_element_in_parser(this, (document) => another_window.document.writeln('<b>some text</b>')); >- assert_equals(result.exception, null); >- assert_equals(another_window.document.querySelector('b').outerHTML, '<b>some text</b>'); >-}, 'document.writeln of another document must not throw an InvalidStateError when synchronously constructing a custom element'); >- >-</script> >-</body> >-</html> >diff --git a/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-expected.txt b/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-expected.txt >deleted file mode 100644 >index e19ed11945bd69013c74aa5b09bfe2fdb2634cf8..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-expected.txt >+++ /dev/null >@@ -1,13 +0,0 @@ >- >-PASS document.open() must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.open("text/html") must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.open(URL) must NOT throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.close() must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.write must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.writeln must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.open() of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.open("text/html") of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.close() of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.write of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >-PASS document.writeln of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element >- >diff --git a/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html b/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html >deleted file mode 100644 >index c6cd7c60e70534b5aa4997b3f6ece557a4bcc818..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html >+++ /dev/null >@@ -1,117 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<title>Custom Elements: create an element for a token must increment and decrement document's throw-on-dynamic-markup-insertion counter</title> >-<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> >-<meta name="assert" content="Invoking document.open, document.write, document.writeln, and document.write must throw an exception when the HTML parser is creating a custom element for a token"> >-<meta name="help" content="https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token"> >-<meta name="help" content="https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#throw-on-dynamic-markup-insertion-counter"> >-<script src="../../resources/testharness.js"></script> >-<script src="../../resources/testharnessreport.js"></script> >-<script src="../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> >-</head> >-<body> >-<div id="log"></div> >-<script> >- >-async function custom_element_reactions_in_parser(test, call_function) >-{ >- const window = await create_window_in_test(test); >- const document = window.document; >- >- document.open(); >- >- let executed = false; >- let exception = null; >- class CustomElement extends window.HTMLElement { >- attributeChangedCallback(name, oldValue, newValue) { >- try { >- call_function(document, window); >- } catch (error) { >- exception = error; >- } >- executed = true; >- } >- } >- CustomElement.observedAttributes = ['title']; >- window.customElements.define('some-element', CustomElement); >- >- document.write('<!DOCTYPE html><html><body><some-element title="some title"></some-element></body></html>'); >- document.close(); >- >- assert_true(executed, 'Must immediately process custom element reactions for setting attributes'); >- return {frameElement, window, document, exception}; >-} >- >-promise_test(async function () { >- const result = await custom_element_reactions_in_parser(this, (document) => document.open()); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >-}, 'document.open() must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const result = await custom_element_reactions_in_parser(this, (document) => document.open('text/html')); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >-}, 'document.open("text/html") must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open-window >-promise_test(async function () { >- let load_promise = new Promise((resolve) => window.onmessage = (event) => resolve(event.data)); >- const result = await custom_element_reactions_in_parser(this, (document, window) => document.open('resources/navigation-destination.html', '_self', '')); >- assert_equals(result.exception, null); >- assert_equals(await load_promise, 'didNavigate'); >-}, 'document.open(URL) must NOT throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const result = await custom_element_reactions_in_parser(this, (document) => document.close()); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >-}, 'document.close() must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const result = await custom_element_reactions_in_parser(this, (document) => document.write('<b>some text</b>')); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >- assert_equals(result.document.querySelector('b'), null, 'Must not insert new content'); >- assert_false(result.document.documentElement.innerHTML.includes('some text'), 'Must not insert new content'); >-}, 'document.write must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const result = await custom_element_reactions_in_parser(this, (document) => document.writeln('<b>some text</b>')); >- assert_throws({name: 'InvalidStateError'}, () => { throw result.exception; }, 'Must throw an InvalidStateError'); >- assert_equals(result.document.querySelector('b'), null, 'Must not insert new content'); >- assert_false(result.document.documentElement.innerHTML.includes('some text'), 'Must not insert new content'); >-}, 'document.writeln must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await custom_element_reactions_in_parser(this, (document) => another_window.document.open()); >- assert_equals(result.exception, null); >-}, 'document.open() of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await custom_element_reactions_in_parser(this, (document) => another_window.document.open('text/html')); >- assert_equals(result.exception, null); >-}, 'document.open("text/html") of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await custom_element_reactions_in_parser(this, (document) => another_window.document.close()); >- assert_equals(result.exception, null); >-}, 'document.close() of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await custom_element_reactions_in_parser(this, (document) => another_window.document.write('<b>some text</b>')); >- assert_equals(result.exception, null); >- assert_equals(another_window.document.querySelector('b').outerHTML, '<b>some text</b>'); >-}, 'document.write of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-promise_test(async function () { >- const another_window = await create_window_in_test(this); >- const result = await custom_element_reactions_in_parser(this, (document) => another_window.document.writeln('<b>some text</b>')); >- assert_equals(result.exception, null); >- assert_equals(another_window.document.querySelector('b').outerHTML, '<b>some text</b>'); >-}, 'document.writeln of another document must not throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element'); >- >-</script> >-</body> >-</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188390
: 346734