Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/custom-elements-registry/define.html

Issue 2086283003: Update web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into wpt_import Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Custom Elements: Element definition</title> 2 <title>Custom Elements: Element definition</title>
3 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <body> 5 <body>
6 <div id="log"></div> 6 <div id="log"></div>
7 <iframe id="iframe"></iframe> 7 <iframe id="iframe"></iframe>
8 <script> 8 <script>
9 'use strict'; 9 'use strict';
10 (() => { 10 (() => {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 customElements.define('test-define-extend-' + name, class {}, { extends: name }); 157 customElements.define('test-define-extend-' + name, class {}, { extends: name });
158 }); 158 });
159 }, `If extends is ${name}, should throw a NotSupportedError`); 159 }, `If extends is ${name}, should throw a NotSupportedError`);
160 }); 160 });
161 161
162 // 8. Let observedAttributesIterable be Get(constructor, "observedAttributes") . 162 // 8. Let observedAttributesIterable be Get(constructor, "observedAttributes") .
163 // Rethrow any exceptions. 163 // Rethrow any exceptions.
164 test(() => { 164 test(() => {
165 class C { 165 class C {
166 static get observedAttributes() { throw_rethrown_error(); } 166 static get observedAttributes() { throw_rethrown_error(); }
167 attributeChangedCallback() {}
167 } 168 }
168 assert_rethrown(() => { 169 assert_rethrown(() => {
169 customElements.define('test-define-observedattributes-rethrow', C); 170 customElements.define('test-define-observedattributes-rethrow', C);
170 }); 171 });
171 }, 'If constructor.observedAttributes throws, should rethrow'); 172 }, 'If constructor.observedAttributes throws, should rethrow');
172 173
173 // 10. Let prototype be Get(constructor, "prototype"). Rethrow any exceptions. 174 // 10. Let prototype be Get(constructor, "prototype"). Rethrow any exceptions.
174 function assert_rethrown(func, description) { 175 function assert_rethrown(func, description) {
175 assert_throws({ name: 'rethrown' }, func, description); 176 assert_throws({ name: 'rethrown' }, func, description);
176 } 177 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 assert_throws(expectTypeError, () => { 245 assert_throws(expectTypeError, () => {
245 customElements.define(`test-define-${name.toLowerCase()}-${data.name }`, C); 246 customElements.define(`test-define-${name.toLowerCase()}-${data.name }`, C);
246 }); 247 });
247 } 248 }
248 }, `If constructor.prototype.${name} is ${data.name}, should ${data.succes s ? 'succeed' : 'throw a TypeError'}`); 249 }, `If constructor.prototype.${name} is ${data.name}, should ${data.succes s ? 'succeed' : 'throw a TypeError'}`);
249 }); 250 });
250 }); 251 });
251 })(); 252 })();
252 </script> 253 </script>
253 </body> 254 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698