3 <script src="../js/resources/js-test-pre.js"></script>
7 <div id="description"></div>
8 <div id="console"></div>
11 description("Tests aborting XMLHttpRequest 'arraybuffer' loading with the .responseType and .response attributes.");
16 testPassed("abort() was called.");
18 // For aborted 'arraybuffer' the .response should not yet exist.
20 testPassed("'arraybuffer' .response does not exist after aborted load.");
22 testFailed("'arraybuffer' .response should not exist after aborted load.");
29 testFailed("onload() should not be called since loading was aborted.");
36 if (window.layoutTestController) {
37 layoutTestController.dumpAsText();
38 layoutTestController.waitUntilDone();
41 xhr = new XMLHttpRequest();
44 xhr.open("GET", "../../http/tests/resources/balls-of-the-orient.aif", true);
47 if ("responseType" in xhr)
48 testPassed("responseType property exists.");
50 if ("response" in xhr)
51 testPassed("response property exists.");
53 // Make sure we can set responseType to "arraybuffer" before send() is called.
55 xhr.responseType = "arraybuffer";
56 if (xhr.responseType == "arraybuffer")
57 testPassed("xhr.responseType has been correctly set to 'arraybuffer'.");
59 testFailed("unable to set xhr.responseType to 'arraybuffer' " + e + ".");
62 testFailed("Caught exception " + e + ".");
67 window.jsTestIsAsync = true;
74 <script src="../js/resources/js-test-post.js"></script>