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

Side by Side Diff: LayoutTests/fast/dom/custom/registration-context-sharing.html

Issue 23009004: Process Custom Elements in post-order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing. Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script> 2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 <script src="test-harness-utils.js"></script> 4 <script src="test-harness-utils.js"></script>
5 <body> 5 <body>
6 <script> 6 <script>
7 function TestRegistrationContextSharing(window, documentA, documentB) { 7 function TestRegistrationContextSharing(window, documentA, documentB) {
8 this.window = window; 8 this.window = window;
9 this.documentA = documentA; 9 this.documentA = documentA;
10 this.documentB = documentB; 10 this.documentB = documentB;
(...skipping 19 matching lines...) Expand all
30 'tagged ' + this.prototypeTag); 30 'tagged ' + this.prototypeTag);
31 } 31 }
32 32
33 var protoU = Object.create(this.window.HTMLElement.prototype); 33 var protoU = Object.create(this.window.HTMLElement.prototype);
34 protoU.prototypeTag = 'U'; 34 protoU.prototypeTag = 'U';
35 protoU.createdCallback = created; 35 protoU.createdCallback = created;
36 this.documentB.register('x-u', {prototype: protoU}); 36 this.documentB.register('x-u', {prototype: protoU});
37 37
38 assert_array_equals( 38 assert_array_equals(
39 invocations, 39 invocations,
40 ['created document B upgrade candidate with prototype tagged U', 40 ['created document A upgrade candidate with prototype tagged U',
41 'created document A upgrade candidate with prototype tagged U'], 41 'created document B upgrade candidate with prototype tagged U'],
42 'the created callback should have been called for both elements ' + 42 'the created callback should have been called for both elements ' +
43 'in reverse creation order'); 43 'in creation order');
44 }; 44 };
45 45
46 TestRegistrationContextSharing.prototype. 46 TestRegistrationContextSharing.prototype.
47 testRegisterInAInstantiateInB_shouldActivateDefinition = function () { 47 testRegisterInAInstantiateInB_shouldActivateDefinition = function () {
48 var invocations = []; 48 var invocations = [];
49 function created() { 49 function created() {
50 invocations.push('created ' + this.dataset.name + ' with prototype ' + 50 invocations.push('created ' + this.dataset.name + ' with prototype ' +
51 'tagged ' + this.prototypeTag); 51 'tagged ' + this.prototypeTag);
52 } 52 }
53 53
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 var tester = new TestRegistrationContextSharing(window, 164 var tester = new TestRegistrationContextSharing(window,
165 documentA, documentB); 165 documentA, documentB);
166 tester.testRegistrationContextIsShared(); 166 tester.testRegistrationContextIsShared();
167 t.done(); 167 t.done();
168 }); 168 });
169 } 169 }
170 170
171 })(); 171 })();
172 172
173 </script> 173 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698