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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/custom-elements/instantiating-custom-elements/changing-is-attribute.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>Changing IS attribute of the custom element must not affect this element' s custom element type, after element is instantiated</title> 4 <title>Changing IS attribute of the custom element must not affect this element' s custom element type, after element is instantiated</title>
5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru"> 5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
6 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru "> 6 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru ">
7 <meta name="assert" content="After a custom element is instantiated, changing th e value of the IS attribute must not affect this element's custom element type"> 7 <meta name="assert" content="After a custom element is instantiated, changing th e value of the IS attribute must not affect this element's custom element type">
8 <link rel="help" href="http://www.w3.org/TR/custom-elements/#instantiating-custo m-elements"> 8 <link rel="help" href="http://www.w3.org/TR/custom-elements/#instantiating-custo m-elements">
9 <script src="../../../../resources/testharness.js"></script> 9 <script src="../../../../resources/testharness.js"></script>
10 <script src="../../../../resources/testharnessreport.js"></script> 10 <script src="../../../../resources/testharnessreport.js"></script>
11 <script src="../testcommon.js"></script> 11 <script src="../testcommon.js"></script>
12 <link rel="stylesheet" href="../../../../resources/testharness.css">
13 </head> 12 </head>
14 <body> 13 <body>
15 <div id="log"></div> 14 <div id="log"></div>
16 <script> 15 <script>
17 test(function() { 16 test(function() {
18 var doc = newHTMLDocument(); 17 var doc = newHTMLDocument();
19 var GeneratedConstructor = doc.registerElement('x-a'); 18 var GeneratedConstructor = doc.registerElement('x-a');
20 var customElement = new GeneratedConstructor(); 19 var customElement = new GeneratedConstructor();
21 doc.registerElement('x-b'); 20 doc.registerElement('x-b');
22 customElement.setAttribute('is', 'x-b'); 21 customElement.setAttribute('is', 'x-b');
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 doc.body.innerHTML = '<a id="x-i" is="x-i"></a>'; 149 doc.body.innerHTML = '<a id="x-i" is="x-i"></a>';
151 var customElement = doc.querySelector('#x-i'); 150 var customElement = doc.querySelector('#x-i');
152 customElement.removeAttribute('is'); 151 customElement.removeAttribute('is');
153 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.pro totype, 152 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.pro totype,
154 'Custom element type should be x-i'); 153 'Custom element type should be x-i');
155 }, 'Test custom element type, after removing IS attribute value. ' + 154 }, 'Test custom element type, after removing IS attribute value. ' +
156 'Element is HTML5 element with IS attribute referring to custom element type '); 155 'Element is HTML5 element with IS attribute referring to custom element type ');
157 </script> 156 </script>
158 </body> 157 </body>
159 </html> 158 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698