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

Side by Side Diff: LayoutTests/imported/web-platform-tests/custom-elements/registering-custom-elements/element-registration-algorithm-no-registry.html

Issue 560893005: First checked-in import of the W3C's test suites. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add new expectations for newly failing w3c tests Created 6 years, 3 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>If document has no registry NotSupportedError is thrown</title>
5 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru ">
6 <meta name="assert" content="If REGISTRY does not exist, set ERROR to NoRegistry and stop.">
7 <link rel="help" href="http://www.w3.org/TR/custom-elements/#dfn-element-registr ation-algorithm">
8 <script src="../../../../resources/testharness.js"></script>
9 <script src="../../../../resources/testharnessreport.js"></script>
10 <script src="../testcommon.js"></script>
11 <link rel="stylesheet" href="../../../../resources/testharness.css">
12 </head>
13 <body>
14 <div id="log"></div>
15 <script>
16 test(function() {
17 var doc = document.implementation.createDocument(null, 'test', null);
18 assert_throws('NotSupportedError', function(){
19 doc.registerElement('x-a');
20 }, 'Registering valid custom element in document ' +
21 'without registry should throw NotSupportedError');
22
23 }, 'Registering valid custom element without options in document ' +
24 'without registry should throw NotSupportedError');
25
26
27 test(function() {
28 var doc = document.implementation.createDocument(null, 'test', null);
29 var proto = Object.create(HTMLElement.prototype);
30
31 assert_throws('NotSupportedError', function(){
32 doc.registerElement('x-b', { prototype: proto, extends: 'a '});
33 }, 'Registering valid custom element in document ' +
34 'without registry should throw NotSupportedError');
35
36 }, 'Registering valid custom element with options in document ' +
37 'without registry should throw NotSupportedError');
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698