2 <script src=
"../../../resources/testharness.js"></script>
3 <script src=
"../../../resources/testharnessreport.js"></script>
6 var doc
= document
.implementation
.createDocument(null, 'test', null);
9 function() { doc
.registerElement('x-element'); },
10 'Registering valid custom element in a document ' +
11 'without registry should fail');
12 }, 'Document of type other than HTML, not loaded into browsing context, must not have a registry');
14 async_test(function(t
) {
15 var request
= new XMLHttpRequest();
16 request
.onreadystatechange
= t
.step_func(function() {
17 if (request
.readyState
== 4) {
18 assert_equals(request
.status
, 200, 'Test document is not loaded correctly');
19 var doc
= request
.response
;
20 assert_true(doc
instanceof HTMLDocument
,
21 'XMLHttpRequest\'s asynchronous response should be HTML document');
24 function() { doc
.registerElement('x-element'); },
25 'Registering valid custom element in ' +
26 'an XMLHttpRequest\'s response document should fail');
31 request
.open('GET', 'resources/blank.html', true);
32 request
.responseType
= 'document';
34 }, 'XMLHttpRequest\'s asynchronous response HTML document must not have a registry');