Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / w3c / web-platform-tests / html-imports / document / document-method-changes.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>The import attribute</title>
5 <link rel="help" href="http://w3c.github.io/webcomponents/spec/imports/#interface-import">
6 <script src="../../../../resources/testharness.js"></script>
7 <script src="../../../../resources/testharnessreport.js"></script>
8 <link rel="stylesheet" href="../../../../resources/testharness.css">
9
10 <link id="importLink" rel="import" href="resources/body-only.html">
11 <link                 rel="import" href="resources/test-in-import.html">
12 </head>
13 <body>
14 <div id="log"></div>
15 <script>
16 test(function() {
17    assert_throws('INVALID_STATE_ERR', function() { importLink.import.open(); }, 'document.open()');
18    assert_throws('INVALID_STATE_ERR', function() { importLink.import.write('Hello'); }, 'document.write()');
19    assert_throws('INVALID_STATE_ERR', function() { importLink.import.open(); }, 'document.close()');
20 }, 'Throws an InvalidStateError exception if the Document is an import: From the master document');
21 </script>
22 </body>
23 </html>