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

Side by Side Diff: LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter.html

Issue 1223473004: Prohibit createShadowRoot({mode: 'open'}) on existing shadow root. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter-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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="resources/shadow-dom.js"></script> 5 <script src="resources/shadow-dom.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <div id="host1"></div> 8 <div id="host1"></div>
9 <div id="host2"></div> 9 <div id="host2"></div>
10 <div id="host3"></div> 10 <div id="host3"></div>
(...skipping 19 matching lines...) Expand all
30 var host4 = document.querySelector('#host4'); 30 var host4 = document.querySelector('#host4');
31 shouldThrow("host4.createShadowRoot({mode: 'illegal'})"); 31 shouldThrow("host4.createShadowRoot({mode: 'illegal'})");
32 32
33 debug('Create open shadow root with shadow-dom.js utility.'); 33 debug('Create open shadow root with shadow-dom.js utility.');
34 document.body.appendChild( 34 document.body.appendChild(
35 createDOM('div', {id: 'host5'}, 35 createDOM('div', {id: 'host5'},
36 createShadowRoot({mode: 'open'}))); 36 createShadowRoot({mode: 'open'})));
37 var host5 = document.querySelector('#host5'); 37 var host5 = document.querySelector('#host5');
38 var root5 = host5.shadowRoot; 38 var root5 = host5.shadowRoot;
39 shouldBeNonNull(root5); 39 shouldBeNonNull(root5);
40
41 debug('Create shadow root on already shadowed host will raise InvalidStateError exception.');
42 shouldThrow("host1.createShadowRoot({mode: 'open'})");
40 </script> 43 </script>
41 </html> 44 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698