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

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-allowedState.html

Issue 478223002: XMLHttpRequest::overrideMimeType should throw InvalidStateError (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tyoshino-san review Created 6 years, 4 months 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-allowedState-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="/js-test-resources/js-test.js"></script>
3 <script>
4 jsTestIsAsync = true;
5
6 function testOverrideMimeType(xhr) {
7 debug("Testing overrideMimeType when readyState is " + xhr.readyState);
8
9 var isAllowed = xhr.readyState < XMLHttpRequest.LOADING;
10 if (isAllowed) {
11 shouldNotThrow("xhr.overrideMimeType('text/plain')");
12 } else {
13 shouldThrow("xhr.overrideMimeType('text/plain')");
14 }
15 }
16
17 var xhr = new XMLHttpRequest();
18 xhr.onreadystatechange = function() {
19 testOverrideMimeType(xhr);
20
21 if (xhr.readyState == XMLHttpRequest.DONE)
22 finishJSTest();
23 }
24
25 testOverrideMimeType(xhr);
26 xhr.open("GET", "resources/get.txt", true);
27 testOverrideMimeType(xhr);
28 xhr.send(null);
29 testOverrideMimeType(xhr);
30 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-allowedState-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698