blob: e834b61055d228cb631e5dff7f56a5cdcb828eb1 [file] [log] [blame]
Philip Jägenstedtc053f402014-01-22 17:02:181<!doctype html>
2<html>
3 <head>
4 <title>XMLHttpRequest: send() - unserializable Document</title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
Ms2ger91fef142014-11-01 09:24:377 <link rel="help" href="https://xhr.spec.whatwg.org/#dom-XMLHttpRequest-send-document" data-tested-assertations="following::p[3]" />
Philip Jägenstedtc053f402014-01-22 17:02:188 </head>
9 <body>
10 <div id="log"></div>
11 <script>
12 function request_throws(input) {
13 test(function() {
14 var client = new XMLHttpRequest()
15 client.open("POST", "resources/content.py", false)
16 assert_throws("InvalidStateError", function() { client.send(input) })
17 })
18 }
19 var doc = document.implementation.createDocument(null, null, null)
20 while(doc.childNodes.length) {
21 doc.removeChild(doc.childNodes[0])
22 }
23 request_throws(doc)
24 </script>
25 </body>
26</html>