Changeset 208360 in webkit
- Timestamp:
- Nov 3, 2016 6:37:01 PM (7 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 2 deleted
- 11 edited
- 21 copied
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208359 r208360 1 2016-11-03 Ryosuke Niwa <rniwa@webkit.org> 2 3 Update custom elements tests 4 https://bugs.webkit.org/show_bug.cgi?id=164352 5 6 Reviewed by Antti Koivisto. 7 8 Removed tests that have been back imported via web-platform-tests. 9 10 * fast/custom-elements/custom-element-reaction-queue-expected.txt: Removed. 11 * fast/custom-elements/custom-element-reaction-queue.html: Removed. 12 * fast/custom-elements/reactions-for-webkit-extensions.html: 13 * fast/custom-elements/reactions/: Removed. 14 * fast/custom-elements/resources/additional-helpers.js: Removed. 15 * fast/custom-elements/upgrading-enqueue-reactions-expected.txt: Removed. 16 * fast/custom-elements/upgrading-enqueue-reactions.html: Removed. 17 1 18 2016-11-03 Brady Eidson <beidson@apple.com> 2 19 -
trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions.html
r208082 r208360 10 10 <script src="../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 11 <script src="../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="resources/additional-helpers.js"></script>13 12 </head> 14 13 <body> -
trunk/LayoutTests/imported/w3c/ChangeLog
r208359 r208360 1 2016-11-03 Ryosuke Niwa <rniwa@webkit.org> 2 3 Update custom elements tests 4 https://bugs.webkit.org/show_bug.cgi?id=164352 5 6 Reviewed by Antti Koivisto. 7 8 Reimported the custom elements tests as of 5047c27a5c61cc12eab75ac72b86125ec3cc8527. 9 10 * web-platform-tests/custom-elements/custom-element-reaction-queue-expected.txt: Added. 11 * web-platform-tests/custom-elements/custom-element-reaction-queue.html: Added. 12 * web-platform-tests/custom-elements/htmlconstructor/newtarget.html: 13 * web-platform-tests/custom-elements/reactions/CSSStyleDeclaration-expected.txt: Moved from fast/custom-elements/reactions/. 14 * web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html: Ditto. 15 * web-platform-tests/custom-elements/reactions/Document.html: Updated. 16 * web-platform-tests/custom-elements/reactions/HTMLAnchorElement-expected.txt: Moved from fast/custom-elements/reactions/. 17 * web-platform-tests/custom-elements/reactions/HTMLAnchorElement.html: Ditto. 18 * web-platform-tests/custom-elements/reactions/HTMLOptionElement-expected.txt: Ditto. 19 * web-platform-tests/custom-elements/reactions/HTMLOptionElement.html: Ditto. 20 * web-platform-tests/custom-elements/reactions/HTMLOptionsCollection-expected.txt: Ditto. 21 * web-platform-tests/custom-elements/reactions/HTMLOptionsCollection.html: Ditto. 22 * web-platform-tests/custom-elements/reactions/HTMLOutputElement-expected.txt: Ditto. 23 * web-platform-tests/custom-elements/reactions/HTMLOutputElement.html: Ditto. 24 * web-platform-tests/custom-elements/reactions/HTMLSelectElement-expected.txt: Ditto. 25 * web-platform-tests/custom-elements/reactions/HTMLSelectElement.html: Ditto. 26 * web-platform-tests/custom-elements/reactions/HTMLTableElement-expected.txt: Ditto. 27 * web-platform-tests/custom-elements/reactions/HTMLTableElement.html: Ditto. 28 * web-platform-tests/custom-elements/reactions/HTMLTableRowElement-expected.txt: Ditto. 29 * web-platform-tests/custom-elements/reactions/HTMLTableRowElement.html: Ditto. 30 * web-platform-tests/custom-elements/reactions/HTMLTableSectionElement-expected.txt: Ditto. 31 * web-platform-tests/custom-elements/reactions/HTMLTableSectionElement.html: Ditto. 32 * web-platform-tests/custom-elements/reactions/HTMLTitleElement-expected.txt: Ditto. 33 * web-platform-tests/custom-elements/reactions/HTMLTitleElement.html: Ditto. 34 * web-platform-tests/custom-elements/reactions/ShadowRoot-expected.txt: Ditto. 35 * web-platform-tests/custom-elements/reactions/ShadowRoot.html: Ditto. 36 * web-platform-tests/custom-elements/reactions/resources/reactions.js: 37 * web-platform-tests/custom-elements/reactions/w3c-import.log: 38 * web-platform-tests/custom-elements/resources/custom-elements-helpers.js: 39 * web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions-expected.txt: Moved from fast/custom-elements/. 40 * web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions.html: Ditto. 41 * web-platform-tests/custom-elements/upgrading/w3c-import.log: 42 * web-platform-tests/custom-elements/w3c-import.log: 43 1 44 2016-11-03 Brady Eidson <beidson@apple.com> 2 45 -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-reaction-queue.html
r208359 r208360 6 6 <meta name="assert" content="Each element must have its own custom element reaction queue"> 7 7 <meta name="help" content="https://html.spec.whatwg.org/multipage/scripting.html#custom-element-reaction-queue"> 8 <script src=" ../../resources/testharness.js"></script>9 <script src=" ../../resources/testharnessreport.js"></script>10 <script src=". ./../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script>8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="./resources/custom-elements-helpers.js"></script> 11 11 </head> 12 12 <body> 13 13 <div id="log"></div> 14 14 <script> 15 16 function create_constructor_log(element) {17 return {type: 'constructed', element: element};18 }19 20 function assert_constructor_log_entry(log, element) {21 assert_equals(log.type, 'constructed');22 assert_equals(log.element, element);23 }24 25 function assert_adopted_log_entry(log, element) {26 assert_equals(log.type, 'adopted');27 assert_equals(log.element, element);28 }29 30 function create_adopted_callback_log(element) {31 return {type: 'adopted', element: element};32 }33 34 function create_connected_callback_log(element) {35 return {type: 'connected', element: element};36 }37 38 function assert_connected_log_entry(log, element) {39 assert_equals(log.type, 'connected');40 assert_equals(log.element, element);41 }42 15 43 16 test_with_window(function (contentWindow) { … … 93 66 super(); 94 67 log.push(create_constructor_log(this)); 95 if (this == element1) 68 if (this == element1) { 69 element2.setAttribute('title', 'hi'); 70 element2.removeAttribute('title'); 96 71 element2.setAttribute('class', 'foo'); 72 } 97 73 } 98 74 connectedCallback(...args) { … … 102 78 log.push(create_attribute_changed_callback_log(this, ...args)); 103 79 } 104 static get observedAttributes() { return ['id', 'class' ]; }80 static get observedAttributes() { return ['id', 'class', 'title']; } 105 81 } 106 82 contentWindow.customElements.define('test-element', TestElement); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html
r207520 r208360 102 102 const o = Reflect.construct(w.HTMLParagraphElement, [], new.target); 103 103 104 assert_equals(Object.getPrototypeOf(o), window.HTMLParagraphElement ,104 assert_equals(Object.getPrototypeOf(o), window.HTMLParagraphElement.prototype, 105 105 "Must use the HTMLParagraphElement from the realm of NewTarget"); 106 assert_not_equals(Object.getPrototypeOf(o), w.HTMLParagraphElement ,106 assert_not_equals(Object.getPrototypeOf(o), w.HTMLParagraphElement.prototype, 107 107 "Must not use the HTMLParagraphElement from the realm of the active function object (w.HTMLParagraphElement)"); 108 108 -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration-expected.txt
r208359 r208360 10 10 PASS setProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important and the style attribute is observed 11 11 PASS setProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important but the style attribute is not observed 12 FAIL setPropertyValue on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute instance.style.setPropertyValue is not a function. (In 'instance.style.setPropertyValue(propertyName, value)', 'instance.style.setPropertyValue' is undefined) 13 FAIL setPropertyValue on CSSStyleDeclaration must not enqueue an attributeChanged reaction when it adds the style attribute but the style attribute is not observed instance.style.setPropertyValue is not a function. (In 'instance.style.setPropertyValue(propertyName, value)', 'instance.style.setPropertyValue' is undefined) 14 FAIL setPropertyValue on CSSStyleDeclaration must enqueue an attributeChanged reaction when it mutates the observed style attribute instance.style.setPropertyValue is not a function. (In 'instance.style.setPropertyValue(propertyName, value)', 'instance.style.setPropertyValue' is undefined) 15 FAIL setPropertyValue on CSSStyleDeclaration must not enqueue an attributeChanged reaction when it mutates the style attribute but the style attribute is not observed instance.style.setPropertyValue is not a function. (In 'instance.style.setPropertyValue(propertyName, value)', 'instance.style.setPropertyValue' is undefined) 16 FAIL setPropertyPriority on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important and the style attribute is observed instance.style.setPropertyPriority is not a function. (In 'instance.style.setPropertyPriority(propertyName, isImportant ? 'important': '')', 'instance.style.setPropertyPriority' is undefined) 17 FAIL setPropertyPriority on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important but the style attribute is not observed instance.style.setPropertyPriority is not a function. (In 'instance.style.setPropertyPriority(propertyName, isImportant ? 'important': '')', 'instance.style.setPropertyPriority' is undefined) 12 18 PASS removeProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it removes a property from the observed style attribute 13 19 PASS removeProperty on CSSStyleDeclaration must not enqueue an attributeChanged reaction when it removes a property from the style attribute but the style attribute is not observed -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document-expected.txt
r207703 r208360 4 4 PASS adoptNode on Document must enqueue an adopted reaction when importing a custom element 5 5 PASS execCommand on Document must enqueue a disconnected reaction when deleting a custom element from a contenteditable element 6 PASS title on Document must enqueue disconnectedCallback when removing a custom element 7 PASS body on Document must enqueue disconnectedCallback when removing a custom element 8 PASS body on Document must enqueue connectedCallback when inserting a custom element 9 PASS open on Document must enqueue disconnectedCallback when removing a custom element 10 PASS write on Document must enqueue disconnectedCallback when removing a custom element 11 PASS write on Document must enqueue connectedCallback after constructing a custom element 12 PASS writeln on Document must enqueue disconnectedCallback when removing a custom element 13 PASS writeln on Document must enqueue connectedCallback after constructing a custom element 6 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document.html
r207703 r208360 16 16 <script> 17 17 18 test (function () {19 var element = define_new_custom_element();20 var instance = document.createElement(element.name);18 test_with_window(function (contentWindow, contentDocument) { 19 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 const instance = contentDocument.createElement('custom-element'); 21 21 assert_array_equals(element.takeLog().types(), ['constructed']); 22 22 23 var newDoc = document.implementation.createHTMLDocument();23 const newDoc = contentDocument.implementation.createHTMLDocument(); 24 24 newDoc.importNode(instance); 25 25 … … 27 27 }, 'importNode on Document must not construct a new custom element when importing a custom element into a window-less document'); 28 28 29 test (function () {30 var element = define_new_custom_element();31 var template = document.createElement('template');32 template.innerHTML = `<${element.name}></${element.name}>`;29 test_with_window(function (contentWindow, contentDocument) { 30 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 31 const template = contentDocument.createElement('template'); 32 template.innerHTML = '<custom-element></custom-element>'; 33 33 assert_array_equals(element.takeLog().types(), []); 34 document.importNode(template.content, true);34 contentDocument.importNode(template.content, true); 35 35 assert_array_equals(element.takeLog().types(), ['constructed']); 36 36 }, 'importNode on Document must construct a new custom element when importing a custom element from a template'); 37 37 38 test (function () {39 var element = define_new_custom_element();40 var instance = document.createElement(element.name);38 test_with_window(function (contentWindow, contentDocument) { 39 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 40 const instance = contentDocument.createElement('custom-element'); 41 41 assert_array_equals(element.takeLog().types(), ['constructed']); 42 42 43 var newDoc = document.implementation.createHTMLDocument();43 const newDoc = contentDocument.implementation.createHTMLDocument(); 44 44 newDoc.adoptNode(instance); 45 45 46 varlogEntries = element.takeLog();46 const logEntries = element.takeLog(); 47 47 assert_array_equals(logEntries.types(), ['adopted']); 48 assert_equals(logEntries.last().oldDocument, document);48 assert_equals(logEntries.last().oldDocument, contentDocument); 49 49 assert_equals(logEntries.last().newDocument, newDoc); 50 50 }, 'adoptNode on Document must enqueue an adopted reaction when importing a custom element'); 51 51 52 test (function () {53 var element = define_new_custom_element();54 var instance = document.createElement(element.name);52 test_with_window(function (contentWindow, contentDocument) { 53 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 54 const instance = contentDocument.createElement('custom-element'); 55 55 56 var container = document.createElement('div');56 const container = contentDocument.createElement('div'); 57 57 container.contentEditable = true; 58 58 container.appendChild(instance); 59 document.body.appendChild(container);59 contentDocument.body.appendChild(container); 60 60 61 61 assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); 62 62 63 63 container.focus(); 64 document.execCommand('delete', false, null);64 contentDocument.execCommand('delete', false, null); 65 65 66 66 assert_array_equals(element.takeLog().types(), ['disconnected']); 67 67 }, 'execCommand on Document must enqueue a disconnected reaction when deleting a custom element from a contenteditable element'); 68 68 69 test_with_window(function (contentWindow, contentDocument) { 70 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 71 72 contentDocument.title = ''; 73 const title = contentDocument.querySelector('title'); 74 const instance = contentDocument.createElement('custom-element'); 75 title.appendChild(instance); 76 instance.textContent = 'hello'; 77 78 assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); 79 assert_equals(title.innerHTML, '<custom-element>hello</custom-element>'); 80 81 title.text = 'world'; 82 assert_equals(title.innerHTML, 'world'); 83 assert_array_equals(element.takeLog().types(), ['disconnected']); 84 }, 'title on Document must enqueue disconnectedCallback when removing a custom element'); 85 86 test_with_window(function (contentWindow, contentDocument) { 87 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 88 89 const body = contentDocument.body; 90 body.innerHTML = '<custom-element>hello</custom-element>'; 91 92 assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); 93 assert_equals(body.innerHTML, '<custom-element>hello</custom-element>'); 94 95 contentDocument.body = contentDocument.createElement('body'); 96 assert_array_equals(element.takeLog().types(), ['disconnected']); 97 }, 'body on Document must enqueue disconnectedCallback when removing a custom element'); 98 99 test_with_window(function (contentWindow, contentDocument) { 100 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 101 102 const instance = contentDocument.createElement('custom-element'); 103 const body = contentDocument.createElement('body'); 104 body.appendChild(instance); 105 106 assert_array_equals(element.takeLog().types(), ['constructed']); 107 assert_equals(body.innerHTML, '<custom-element></custom-element>'); 108 109 contentDocument.body = body; 110 assert_array_equals(element.takeLog().types(), ['connected']); 111 }, 'body on Document must enqueue connectedCallback when inserting a custom element'); 112 113 test_with_window(function (contentWindow, contentDocument) { 114 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 115 contentDocument.body.innerHTML = '<custom-element></custom-element>'; 116 assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); 117 118 contentDocument.open(); 119 assert_array_equals(element.takeLog().types(), ['disconnected']); 120 }, 'open on Document must enqueue disconnectedCallback when removing a custom element'); 121 122 test_with_window(function (contentWindow, contentDocument) { 123 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 124 contentDocument.body.innerHTML = '<custom-element></custom-element>'; 125 assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); 126 127 contentDocument.write(''); 128 assert_array_equals(element.takeLog().types(), ['disconnected']); 129 }, 'write on Document must enqueue disconnectedCallback when removing a custom element'); 130 131 test_with_window(function (contentWindow, contentDocument) { 132 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 133 contentWindow.document.write('<custom-element></custom-element>'); 134 assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); 135 }, 'write on Document must enqueue connectedCallback after constructing a custom element'); 136 137 test_with_window(function (contentWindow, contentDocument) { 138 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 139 contentDocument.body.innerHTML = '<custom-element></custom-element>'; 140 assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); 141 142 contentDocument.writeln(''); 143 assert_array_equals(element.takeLog().types(), ['disconnected']); 144 }, 'writeln on Document must enqueue disconnectedCallback when removing a custom element'); 145 146 test_with_window(function (contentWindow) { 147 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 148 contentWindow.document.writeln('<custom-element></custom-element>'); 149 assert_array_equals(element.takeLog().types(), ['constructed', 'connected']); 150 }, 'writeln on Document must enqueue connectedCallback after constructing a custom element'); 151 69 152 </script> 70 153 </body> -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAnchorElement.html
r208359 r208360 6 6 <meta name="assert" content="text of HTMLAnchorElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 contentDocument.body.innerHTML = `<a><custom-element>hello</custom-element></a>`; 23 20 const anchor = contentDocument.querySelector('a'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptionElement.html
r208359 r208360 6 6 <meta name="assert" content="text of HTMLOptionElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 contentDocument.body.innerHTML = `<select><option></option></select>`; 23 20 const option = contentDocument.querySelector('option'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptionsCollection.html
r208359 r208360 6 6 <meta name="assert" content="length, the indexed setter, add, and remove of HTMLOptionsCollection interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 contentDocument.body.innerHTML = `<select><option></option></select>`; 23 20 const option = contentDocument.querySelector('option'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOutputElement.html
r208359 r208360 6 6 <meta name="assert" content="value and defaultValue of HTMLOutputElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 contentDocument.body.innerHTML = `<output><custom-element>hello</custom-element></output>`; 23 20 const anchor = contentDocument.querySelector('output'); … … 31 28 }, 'value on HTMLOutputElement must enqueue disconnectedCallback when removing a custom element'); 32 29 33 test_with_window(function (contentWindow ) {30 test_with_window(function (contentWindow, contentDocument) { 34 31 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 35 36 const contentDocument = contentWindow.document;37 32 contentDocument.body.innerHTML = `<output><custom-element>hello</custom-element></output>`; 38 33 const anchor = contentDocument.querySelector('output'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLSelectElement.html
r208359 r208360 6 6 <meta name="assert" content="length, add, remove, and the setter of HTMLSelectElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 contentDocument.body.innerHTML = `<select><option></option></select>`; 23 20 const option = contentDocument.querySelector('option'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableElement.html
r208359 r208360 6 6 <meta name="assert" content="caption, deleteCaption, thead, deleteTHead, tFoot, deleteTFoot, and deleteRow of HTMLTableElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 contentDocument.body.innerHTML = `<table></table>`; 23 20 const table = contentDocument.querySelector('table'); … … 34 31 }, 'caption on HTMLTableElement must enqueue connectedCallback when inserting a custom element'); 35 32 36 test_with_window(function (contentWindow ) {33 test_with_window(function (contentWindow, contentDocument) { 37 34 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 38 39 const contentDocument = contentWindow.document;40 35 contentDocument.body.innerHTML = `<table><caption><custom-element>hello</custom-element></caption></table>`; 41 36 const caption = contentDocument.querySelector('caption'); … … 51 46 }, 'caption on HTMLTableElement must enqueue disconnectedCallback when removing a custom element'); 52 47 53 test_with_window(function (contentWindow ) {48 test_with_window(function (contentWindow, contentDocument) { 54 49 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 55 56 const contentDocument = contentWindow.document;57 50 contentDocument.body.innerHTML = `<table><caption><custom-element>hello</custom-element></caption></table>`; 58 51 const caption = contentDocument.querySelector('caption'); … … 69 62 70 63 71 test_with_window(function (contentWindow ) {64 test_with_window(function (contentWindow, contentDocument) { 72 65 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 73 74 const contentDocument = contentWindow.document;75 66 contentDocument.body.innerHTML = `<table></table>`; 76 67 const table = contentDocument.querySelector('table'); … … 87 78 }, 'tHead on HTMLTableElement must enqueue connectedCallback when inserting a custom element'); 88 79 89 test_with_window(function (contentWindow ) {80 test_with_window(function (contentWindow, contentDocument) { 90 81 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 91 92 const contentDocument = contentWindow.document;93 82 contentDocument.body.innerHTML = `<table><thead><tr><td><custom-element>hello</custom-element></td></tr></thead></table>`; 94 83 const thead = contentDocument.querySelector('thead'); … … 104 93 }, 'tHead on HTMLTableElement must enqueue disconnectedCallback when removing a custom element'); 105 94 106 test_with_window(function (contentWindow ) {95 test_with_window(function (contentWindow, contentDocument) { 107 96 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 108 109 const contentDocument = contentWindow.document;110 97 contentDocument.body.innerHTML = `<table><thead><tr><td><custom-element>hello</custom-element></td></tr></thead></table>`; 111 98 const thead = contentDocument.querySelector('thead'); … … 121 108 122 109 123 test_with_window(function (contentWindow ) {110 test_with_window(function (contentWindow, contentDocument) { 124 111 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 125 126 const contentDocument = contentWindow.document;127 112 contentDocument.body.innerHTML = `<table></table>`; 128 113 const table = contentDocument.querySelector('table'); … … 139 124 }, 'tFoot on HTMLTableElement must enqueue connectedCallback when inserting a custom element'); 140 125 141 test_with_window(function (contentWindow ) {126 test_with_window(function (contentWindow, contentDocument) { 142 127 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 143 144 const contentDocument = contentWindow.document;145 128 contentDocument.body.innerHTML = `<table><tfoot><tr><td><custom-element>hello</custom-element></td></tr></tfoot></table>`; 146 129 const tfoot = contentDocument.querySelector('tfoot'); … … 156 139 }, 'tFoot on HTMLTableElement must enqueue disconnectedCallback when removing a custom element'); 157 140 158 test_with_window(function (contentWindow ) {141 test_with_window(function (contentWindow, contentDocument) { 159 142 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 160 161 const contentDocument = contentWindow.document;162 143 contentDocument.body.innerHTML = `<table><tfoot><tr><td><custom-element>hello</custom-element></td></tr></tfoot></table>`; 163 144 const tfoot = contentDocument.querySelector('tfoot'); … … 173 154 174 155 175 test_with_window(function (contentWindow ) {156 test_with_window(function (contentWindow, contentDocument) { 176 157 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 177 178 const contentDocument = contentWindow.document;179 158 contentDocument.body.innerHTML = `<table><tr><td><custom-element>hello</custom-element></td></tr></table>`; 180 159 const tr = contentDocument.querySelector('tr'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableRowElement.html
r208359 r208360 6 6 <meta name="assert" content="deleteCell of HTMLTableRowElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 contentDocument.body.innerHTML = `<table><tr><td><custom-element>hello</custom-element></td></tr></table>`; 23 20 const td = contentDocument.querySelector('td'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableSectionElement.html
r208359 r208360 6 6 <meta name="assert" content="deleteRow of HTMLTableSectionElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 contentDocument.body.innerHTML = `<table><thead><tr><td><custom-element>hello</custom-element></td></tr></thead></table>`; 23 20 const thead = contentDocument.querySelector('thead'); … … 31 28 }, 'deleteRow() on HTMLTableSectionElement on thead must enqueue disconnectedCallback when removing a custom element'); 32 29 33 test_with_window(function (contentWindow ) {30 test_with_window(function (contentWindow, contentDocument) { 34 31 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 35 36 const contentDocument = contentWindow.document;37 32 contentDocument.body.innerHTML = `<table><tfoot><tr><td><custom-element>hello</custom-element></td></tr></tfoot></table>`; 38 33 const tfoot = contentDocument.querySelector('tfoot'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTitleElement.html
r208359 r208360 6 6 <meta name="assert" content="text of HTMLTitleElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 19 const instance = contentWindow.document.createElement(element.name); … … 22 21 23 22 contentWindow.document.title = 'hello'; 24 var titleElement = contentWindow.document.querySelector('title');23 const titleElement = contentDocument.querySelector('title'); 25 24 titleElement.appendChild(instance); 26 25 assert_array_equals(element.takeLog().types(), ['connected']); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ShadowRoot.html
r208359 r208360 6 6 <meta name="assert" content="innerHTML of ShadowRoot interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../../resources/testharness.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script> 10 <script src="../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js"></script> 12 <script src="../resources/additional-helpers.js"></script> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 11 <script src="./resources/reactions.js"></script> 13 12 </head> 14 13 <body> … … 16 15 <script> 17 16 18 test_with_window(function (contentWindow ) {17 test_with_window(function (contentWindow, contentDocument) { 19 18 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 20 21 const contentDocument = contentWindow.document;22 19 const host = contentDocument.createElement('div'); 23 20 const shadowRoot = host.attachShadow({mode: 'closed'}); … … 27 24 }, 'innerHTML on ShadowRoot must upgrade a custom element'); 28 25 29 test_with_window(function (contentWindow ) {26 test_with_window(function (contentWindow, contentDocument) { 30 27 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 31 32 const contentDocument = contentWindow.document;33 28 const host = contentDocument.createElement('div'); 34 29 contentDocument.body.appendChild(host); … … 39 34 }, 'innerHTML on ShadowRoot must enqueue connectedCallback on newly upgraded custom elements when the shadow root is connected'); 40 35 41 test_with_window(function (contentWindow ) {36 test_with_window(function (contentWindow, contentDocument) { 42 37 const element = define_custom_element_in_window(contentWindow, 'custom-element', []); 43 44 const contentDocument = contentWindow.document;45 38 const host = contentDocument.createElement('div'); 46 39 contentDocument.body.appendChild(host); -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js
r207703 r208360 261 261 }, name + ' must not enqueue an attributeChanged reaction when removing an existing unobserved attribute'); 262 262 } 263 264 function test_mutating_style_property_value(testFunction, name, options) { 265 const propertyName = (options || {}).propertyName || 'color'; 266 const idlName = (options || {}).idlName || 'color'; 267 const value1 = (options || {}).value1 || 'blue'; 268 const rule1 = `${propertyName}: ${value1};`; 269 const value2 = (options || {}).value2 || 'red'; 270 const rule2 = `${propertyName}: ${value2};`; 271 272 test(function () { 273 var element = define_new_custom_element(['style']); 274 var instance = document.createElement(element.name); 275 assert_array_equals(element.takeLog().types(), ['constructed']); 276 testFunction(instance, propertyName, idlName, value1); 277 assert_equals(instance.getAttribute('style'), rule1); 278 var logEntries = element.takeLog(); 279 assert_array_equals(logEntries.types(), ['attributeChanged']); 280 assert_attribute_log_entry(logEntries.last(), {name: 'style', oldValue: null, newValue: rule1, namespace: null}); 281 }, name + ' must enqueue an attributeChanged reaction when it adds the observed style attribute'); 282 283 test(function () { 284 var element = define_new_custom_element(['title']); 285 var instance = document.createElement(element.name); 286 assert_array_equals(element.takeLog().types(), ['constructed']); 287 testFunction(instance, propertyName, idlName, value1); 288 assert_equals(instance.getAttribute('style'), rule1); 289 assert_array_equals(element.takeLog().types(), []); 290 }, name + ' must not enqueue an attributeChanged reaction when it adds the style attribute but the style attribute is not observed'); 291 292 test(function () { 293 var element = define_new_custom_element(['style']); 294 var instance = document.createElement(element.name); 295 testFunction(instance, propertyName, idlName, value1); 296 assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); 297 testFunction(instance, propertyName, idlName, value2); 298 assert_equals(instance.getAttribute('style'), rule2); 299 var logEntries = element.takeLog(); 300 assert_array_equals(logEntries.types(), ['attributeChanged']); 301 assert_attribute_log_entry(logEntries.last(), {name: 'style', oldValue: rule1, newValue: rule2, namespace: null}); 302 }, name + ' must enqueue an attributeChanged reaction when it mutates the observed style attribute'); 303 304 test(function () { 305 var element = define_new_custom_element([]); 306 var instance = document.createElement(element.name); 307 testFunction(instance, propertyName, idlName, value1); 308 assert_array_equals(element.takeLog().types(), ['constructed']); 309 testFunction(instance, propertyName, idlName, value2); 310 assert_equals(instance.getAttribute('style'), rule2); 311 assert_array_equals(element.takeLog().types(), []); 312 }, name + ' must not enqueue an attributeChanged reaction when it mutates the style attribute but the style attribute is not observed'); 313 } 314 315 function test_removing_style_property_value(testFunction, name) { 316 test(function () { 317 var element = define_new_custom_element(['style']); 318 var instance = document.createElement(element.name); 319 instance.setAttribute('style', 'color: red; display: none;'); 320 assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); 321 testFunction(instance, 'color', 'color'); 322 assert_equals(instance.getAttribute('style'), 'display: none;'); // Don't make this empty since browser behaviors are inconsistent now. 323 var logEntries = element.takeLog(); 324 assert_array_equals(logEntries.types(), ['attributeChanged']); 325 assert_attribute_log_entry(logEntries.last(), {name: 'style', oldValue: 'color: red; display: none;', newValue: 'display: none;', namespace: null}); 326 }, name + ' must enqueue an attributeChanged reaction when it removes a property from the observed style attribute'); 327 328 test(function () { 329 var element = define_new_custom_element(['class']); 330 var instance = document.createElement(element.name); 331 instance.setAttribute('style', 'color: red; display: none;'); 332 assert_array_equals(element.takeLog().types(), ['constructed']); 333 testFunction(instance, 'color', 'color'); 334 assert_equals(instance.getAttribute('style'), 'display: none;'); // Don't make this empty since browser behaviors are inconsistent now. 335 assert_array_equals(element.takeLog().types(), []); 336 }, name + ' must not enqueue an attributeChanged reaction when it removes a property from the style attribute but the style attribute is not observed'); 337 } 338 339 function test_mutating_style_property_priority(testFunction, name) { 340 test(function () { 341 var element = define_new_custom_element(['style']); 342 var instance = document.createElement(element.name); 343 instance.setAttribute('style', 'color: red'); 344 assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); 345 testFunction(instance, 'color', 'color', true); 346 assert_equals(instance.getAttribute('style'), 'color: red !important;'); 347 var logEntries = element.takeLog(); 348 assert_array_equals(logEntries.types(), ['attributeChanged']); 349 assert_attribute_log_entry(logEntries.last(), {name: 'style', oldValue: 'color: red', newValue: 'color: red !important;', namespace: null}); 350 }, name + ' must enqueue an attributeChanged reaction when it makes a property important and the style attribute is observed'); 351 352 test(function () { 353 var element = define_new_custom_element(['id']); 354 var instance = document.createElement(element.name); 355 instance.setAttribute('style', 'color: red'); 356 assert_array_equals(element.takeLog().types(), ['constructed']); 357 testFunction(instance, 'color', 'color', true); 358 assert_equals(instance.getAttribute('style'), 'color: red !important;'); 359 assert_array_equals(element.takeLog().types(), []); 360 }, name + ' must enqueue an attributeChanged reaction when it makes a property important but the style attribute is not observed'); 361 } -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/w3c-import.log
r207520 r208360 17 17 List of files: 18 18 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Attr.html 19 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html 19 20 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ChildNode.html 20 21 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap.html … … 23 24 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element.html 24 25 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable.html 26 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAnchorElement.html 25 27 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html 28 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptionElement.html 29 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptionsCollection.html 30 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOutputElement.html 31 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLSelectElement.html 32 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableElement.html 33 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableRowElement.html 34 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTableSectionElement.html 35 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLTitleElement.html 26 36 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap.html 27 37 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Node.html … … 29 39 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range.html 30 40 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection.html 41 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ShadowRoot.html -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js
r207520 r208360 17 17 return create_window_in_test(t, srcdoc) 18 18 .then((w) => { 19 f(w );19 f(w, w.document); 20 20 }); 21 21 }, name); 22 } 23 24 function define_custom_element_in_window(window, name, observedAttributes) { 25 let log = []; 26 27 class CustomElement extends window.HTMLElement { 28 constructor() { 29 super(); 30 log.push(create_constructor_log(this)); 31 } 32 attributeChangedCallback(...args) { 33 log.push(create_attribute_changed_callback_log(this, ...args)); 34 } 35 connectedCallback() { log.push(create_connected_callback_log(this)); } 36 disconnectedCallback() { log.push(create_disconnected_callback_log(this)); } 37 adoptedCallback(oldDocument, newDocument) { log.push({type: 'adopted', element: this, oldDocument: oldDocument, newDocument: newDocument}); } 38 } 39 CustomElement.observedAttributes = observedAttributes; 40 41 window.customElements.define(name, CustomElement); 42 43 return { 44 name: name, 45 class: CustomElement, 46 takeLog: function () { 47 let currentLog = log; log = []; 48 currentLog.types = () => currentLog.map((entry) => entry.type); 49 currentLog.last = () => currentLog[currentLog.length - 1]; 50 return currentLog; 51 } 52 }; 53 } 54 55 function create_constructor_log(element) { 56 return {type: 'constructed', element: element}; 57 } 58 59 function assert_constructor_log_entry(log, element) { 60 assert_equals(log.type, 'constructed'); 61 assert_equals(log.element, element); 62 } 63 64 function create_connected_callback_log(element) { 65 return {type: 'connected', element: element}; 66 } 67 68 function assert_connected_log_entry(log, element) { 69 assert_equals(log.type, 'connected'); 70 assert_equals(log.element, element); 71 } 72 73 function create_disconnected_callback_log(element) { 74 return {type: 'disconnected', element: element}; 75 } 76 77 function assert_disconnected_log_entry(log, element) { 78 assert_equals(log.type, 'disconnected'); 79 assert_equals(log.element, element); 80 } 81 82 function assert_adopted_log_entry(log, element) { 83 assert_equals(log.type, 'adopted'); 84 assert_equals(log.element, element); 85 } 86 87 function create_adopted_callback_log(element) { 88 return {type: 'adopted', element: element}; 22 89 } 23 90 -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions-expected.txt
r208359 r208360 1 CONSOLE MESSAGE: line 1 40: Exception thrown as a part of test1 CONSOLE MESSAGE: line 139: Exception thrown as a part of test 2 2 3 3 PASS Upgrading a custom element must enqueue attributeChangedCallback on each attribute -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions.html
r208359 r208360 2 2 <html> 3 3 <head> 4 <title>Custom Elements: CEReactions on Attr interface</title>4 <title>Custom Elements: Upgrading custom elements should enqueue attributeChanged and connected callbacks</title> 5 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> 6 <meta name="assert" content="value of Attr interface must have CEReactions"> 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 <script src="../../resources/testharness.js"></script> 9 <script src="../../resources/testharnessreport.js"></script> 10 <script src="../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js"></script> 11 <script src="resources/additional-helpers.js"></script> 6 <meta name="assert" content="Upgrading custom elements should enqueue attributeChanged and connected callbacksml"> 7 <meta name="help" content="https://html.spec.whatwg.org/#upgrades"> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="../resources/custom-elements-helpers.js"></script> 12 11 </head> 13 12 <body> -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/w3c-import.log
r207703 r208360 17 17 List of files: 18 18 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html 19 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions.html 19 20 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log
r207703 r208360 23 23 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/attribute-changed-callback.html 24 24 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/connected-callbacks.html 25 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-reaction-queue.html 25 26 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/disconnected-callbacks.html 26 27 /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reaction-timing.html
Note: See TracChangeset
for help on using the changeset viewer.