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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/Element-interface-attachShadow.html

Issue 1854003004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 <html> 2 <html>
3 <head> 3 <head>
4 <title>Shadow DOM: Attaching a ShadowRoot</title> 4 <title>Shadow DOM: Attaching a ShadowRoot</title>
5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
6 <meta name="assert" content="Element.prototype.attachShadow should create an ins tance of ShadowRoot"> 6 <meta name="assert" content="Element.prototype.attachShadow should create an ins tance of ShadowRoot">
7 <link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#widl-Ele ment-attachShadow-ShadowRoot-ShadowRootInit-shadowRootInitDict"> 7 <link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#widl-Ele ment-attachShadow-ShadowRoot-ShadowRootInit-shadowRootInitDict">
8 <script src="../../../resources/testharness.js"></script> 8 <script src="../../../resources/testharness.js"></script>
9 <script src="../../../resources/testharnessreport.js"></script> 9 <script src="../../../resources/testharnessreport.js"></script>
10 <link rel='stylesheet' href='../../../resources/testharness.css'>
11 </head> 10 </head>
12 <body> 11 <body>
13 <div id="log"></div> 12 <div id="log"></div>
14 <script> 13 <script>
15 14
16 test(function () { 15 test(function () {
17 assert_true('attachShadow' in Element.prototype, 'Element.prototype.attachSh adow must exist'); 16 assert_true('attachShadow' in Element.prototype, 'Element.prototype.attachSh adow must exist');
18 assert_equals(typeof(document.createElement('div').attachShadow), 'function' , 'An instance of div must have attachShadow which is a function'); 17 assert_equals(typeof(document.createElement('div').attachShadow), 'function' , 'An instance of div must have attachShadow which is a function');
19 }, 'Check the existence of Element.attachShadow'); 18 }, 'Check the existence of Element.attachShadow');
20 19
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 85
87 assert_throws({'name': 'NotSupportedError'}, function () { 86 assert_throws({'name': 'NotSupportedError'}, function () {
88 document.createElement(elementName).attachShadow({mode: "closed"}); 87 document.createElement(elementName).attachShadow({mode: "closed"});
89 }, 'Calling attachShadow({mode: "closed"}) on ' + elementName + ' elemen t must throw'); 88 }, 'Calling attachShadow({mode: "closed"}) on ' + elementName + ' elemen t must throw');
90 } 89 }
91 }, 'Element.attachShadow must throw a NotSupportedError for button, details, inp ut, marquee, meter, progress, select, textarea, and keygen elements'); 90 }, 'Element.attachShadow must throw a NotSupportedError for button, details, inp ut, marquee, meter, progress, select, textarea, and keygen elements');
92 91
93 </script> 92 </script>
94 </body> 93 </body>
95 </html> 94 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698