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

Side by Side Diff: LayoutTests/fast/dom/custom/registration-context-delete-during-register-base-constructor-retrieval.html

Issue 1069953002: Implement Custom Element's class side inheritance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed context delete test case Created 5 years, 8 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 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <script src="testutils.js"></script> 3 <script src="testutils.js"></script>
4 <body> 4 <body>
5 <script> 5 <script>
6 if (fork()) { 6 if (fork()) {
7 // The controlling parent frame 7 // The controlling parent frame
8 description('Tests destroying a context during registration at the point whe n the created callback is retrieved.'); 8 description('Tests destroying a context during registration at the' +
9 ' point when the prototype\'s constructor property is retrieved.');
9 jsTestIsAsync = true; 10 jsTestIsAsync = true;
10 successfullyParsed = true; 11 successfullyParsed = true;
11 } else { 12 } else {
12 // The child frame 13 // The child frame
13
14 var proto = Object.create(HTMLElement.prototype, { 14 var proto = Object.create(HTMLElement.prototype, {
15 createdCallback: { 15 constructor: {
16 configurable: true,
16 get: function () { 17 get: function () {
17 destroyContext(); 18 destroyContext();
18 return function () { } 19 return HTMLElement;
19 } 20 }
20 } 21 }
21 }); 22 });
22 23
23 try { 24 try {
24 document.registerElement('x-a', {prototype: proto}); 25 var element = document.registerElement('x-a', {prototype: proto});
25 log('FAIL expected register to throw an exception'); 26 log('FAIL expected register to throw an exception');
26 } catch (ex) { 27 } catch (ex) {
27 log('PASS caught expected exception "' + ex + '"'); 28 log('PASS caught expected exception "' + ex + '"');
28 } 29 }
29 done(); 30 done();
30 } 31 }
31 </script> 32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698