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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/response-array-buffer-abort-in-loading-state.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
1 <html> 1 <html>
2 <body> 2 <body>
3 <script src="/js-test-resources/js-test-pre.js"></script> 3 <script src="/js-test-resources/js-test.js"></script>
4 <script type="text/javascript"> 4 <script type="text/javascript">
5 description("Test that if responseType is set to arraybuffer, " + 5 description("Test that if responseType is set to arraybuffer, " +
6 "XMLHttpRequest.response is null in DONE state, after abort()-ed " + 6 "XMLHttpRequest.response is null in DONE state, after abort()-ed " +
7 "in LOADING state."); 7 "in LOADING state.");
8 8
9 window.jsTestIsAsync = true; 9 window.jsTestIsAsync = true;
10 10
11 var xhr = new XMLHttpRequest(); 11 var xhr = new XMLHttpRequest();
12 xhr.responseType = 'arraybuffer'; 12 xhr.responseType = 'arraybuffer';
13 xhr.open('GET', '../resources/test.ogv', true); 13 xhr.open('GET', '../resources/test.ogv', true);
14 xhr.onreadystatechange = function() { 14 xhr.onreadystatechange = function() {
15 if (this.readyState == this.LOADING) { 15 if (this.readyState == this.LOADING) {
16 shouldBe("xhr.status", "200"); 16 shouldBe("xhr.status", "200");
17 // readyState is not DONE. 17 // readyState is not DONE.
18 shouldBe("xhr.response", "null"); 18 shouldBe("xhr.response", "null");
19 xhr.abort(); 19 xhr.abort();
20 } else if (this.readyState == this.DONE) { 20 } else if (this.readyState == this.DONE) {
21 // readyState is DONE but error flag is set. 21 // readyState is DONE but error flag is set.
22 shouldBe("xhr.response", "null"); 22 shouldBe("xhr.response", "null");
23 finishJSTest(); 23 finishJSTest();
24 } 24 }
25 }; 25 };
26 xhr.send(null); 26 xhr.send(null);
27 </script> 27 </script>
28 </body> 28 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698