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

Side by Side Diff: LayoutTests/imported/web-platform-tests/custom-elements/creating-and-passing-registries/new-registry-test.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>When an HTML Document is loaded in a browsing context, a new registry mus t be created and associated with this document</title>
5 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru ">
6 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
7 <meta name="assert" content="When an HTML Document is loaded in a browsing conte xt, a new registry must be created and associated with this document.">
8 <link rel="help" href="http://www.w3.org/TR/custom-elements/#creating-and-passin g-registries">
9 <script src="../../../../resources/testharness.js"></script>
10 <script src="../../../../resources/testharnessreport.js"></script>
11 <script src="../testcommon.js"></script>
12 <link rel="stylesheet" href="../../../../resources/testharness.css">
13 </head>
14 <body>
15 <div id="log"></div>
16 <script>
17 testInIFrame('../resources/blank.html', function(doc) {
18 try {
19 doc.registerElement('x-element');
20 } catch (e) {
21 assert_unreached('Unexpected exception, while registering a valid custom element');
22 }
23 }, 'Document, loaded into browsing context, must have a new empty registry');
24
25
26 testInIFrame('../resources/blank.html', function(loadedDocument) {
27 var createdDocument = document.implementation.createHTMLDocument('Test Docum ent');
28 // Let's check that loadedDocument and createdDocument use different registe ries.
29 createdDocument.registerElement('x-element');
30 try {
31 loadedDocument.registerElement('x-element');
32 } catch (e) {
33 assert_unreached('Unexpected exception while registering a custom elemen t ' +
34 'in a document, which has it\'s own registry');
35 }
36 }, 'Document, loaded into browsing context, must have a new empty registry, ' +
37 'which is different from other documents\' registries');
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698