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

Side by Side Diff: third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html

Issue 2455483002: Use v8::TryCatch in toImplSequence (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Custom Elements: defineElement</title> 2 <title>Custom Elements: defineElement</title>
3 <link rel="help" href="https://html.spec.whatwg.org/multipage/scripting.html#cus tomelementsregistry"> 3 <link rel="help" href="https://html.spec.whatwg.org/multipage/scripting.html#cus tomelementsregistry">
4 <meta name="author" title="Dominic Cooney" href="mailto:dominicc@chromium.org"> 4 <meta name="author" title="Dominic Cooney" href="mailto:dominicc@chromium.org">
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="resources/custom-elements-helpers.js"></script> 7 <script src="resources/custom-elements-helpers.js"></script>
8 <body> 8 <body>
9 <script> 9 <script>
10 // TODO(dominicc): Merge these tests with 10 // TODO(dominicc): Merge these tests with
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // attributeChangedCallback is undefined. 403 // attributeChangedCallback is undefined.
404 test_with_window((w) => { 404 test_with_window((w) => {
405 let observedAttributes_invoked = false; 405 let observedAttributes_invoked = false;
406 let X = (function () {}).bind({}); 406 let X = (function () {}).bind({});
407 Object.defineProperty(X, 'observedAttributes', { 407 Object.defineProperty(X, 'observedAttributes', {
408 get() { observedAttributes_invoked = true; } 408 get() { observedAttributes_invoked = true; }
409 }); 409 });
410 assert_false( observedAttributes_invoked, 'Get(constructor, observedAttributes ) should not be invoked'); 410 assert_false( observedAttributes_invoked, 'Get(constructor, observedAttributes ) should not be invoked');
411 }, 'Get(constructor, observedAttributes) should not execute if ' + 411 }, 'Get(constructor, observedAttributes) should not execute if ' +
412 'attributeChangedCallback is undefined'); 412 'attributeChangedCallback is undefined');
413
414 test_with_window((w) => {
415 let attributes = {};
416 attributes[Symbol.iterator] = function*() {
417 throw new TypeError();
418 };
419 class X extends w.HTMLElement {
420 constructor() { super(); }
421 attributeChangedCallback() {}
422 static get observedAttributes() {
423 return attributes;
424 }
425 }
426 assert_throws(TypeError.prototype, () => {
427 w.customElements.define('x-x', X);
428 });
429 }, 'Throwing an exception in observedAttributes');
413 </script> 430 </script>
414 </body> 431 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698