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

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

Issue 132203012: Make Custom Element registration context creation explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nicer. Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/registration-context-isolation-expected.txt » ('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 <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 TestRegistrationContextIsolation(windowA, documentA, 7 function TestRegistrationContextIsolation(windowA, documentA,
8 windowB, documentB) { 8 windowB, documentB) {
9 this.windowA = windowA; 9 this.windowA = windowA;
10 this.documentA = documentA; 10 this.documentA = documentA;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 var tester = new TestRegistrationContextIsolation( 141 var tester = new TestRegistrationContextIsolation(
142 frame.contentWindow, documentA, 142 frame.contentWindow, documentA,
143 frame.contentWindow, documentB); 143 frame.contentWindow, documentB);
144 tester.testRegistrationContextIsNotShared(); 144 tester.testRegistrationContextIsNotShared();
145 frame.remove(); 145 frame.remove();
146 t.done(); 146 t.done();
147 })); 147 }));
148 148
149 })(); 149 })();
150 150
151 (function () {
152
153 var t = async_test('registration context should not be created by ' +
154 'DOMImplementation-created documents');
155
156 withFrame(t.step_func(function (frame) {
157 // Test transitively sloughing off a registration context through
158 // multiple createDocument/createHTMLDocument steps.
159
160 var documentA = frame.contentDocument;
161
162 // This document is not HTML, XHTML; it will not process custom elements.
163 var documentB = documentA.implementation.createDocument(null, '');
164 assert_throws(
165 'NOT_SUPPORTED_ERR',
166 function() { documentB.registerElement('x-a'); });
167
168 // This document will not process custom elements because there is
169 // nothing to inherit from B.
170 var documentC = documentB.implementation.createHTMLDocument();
171 assert_throws(
172 'NOT_SUPPORTED_ERR',
173 function() { documentC.registerElement('x-b'); });
174
175 // Nor this one.
176 var documentD = documentC.implementation.createDocument(
177 'http://www.w3.org/1999/xhtml', 'html');
178 assert_throws(
179 'NOT_SUPPORTED_ERR',
180 function() { documentD.registerElement('x-c'); });
181
182 frame.remove();
183 t.done();
184 }));
185
186 })();
187
151 </script> 188 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/registration-context-isolation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698