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

Unified Diff: LayoutTests/fast/events/event-on-xhr-document.html

Issue 206223005: Forbid setting responseType on all sync XHRs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests that set responseType on sync XHRs. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/event-on-xhr-document.html
diff --git a/LayoutTests/fast/events/event-on-xhr-document.html b/LayoutTests/fast/events/event-on-xhr-document.html
index b7e21cb1bd8aa4f399bc8fa10cbc855873201a65..9cb4e196c3e0c586ff76571d824fae3c58a269c8 100644
--- a/LayoutTests/fast/events/event-on-xhr-document.html
+++ b/LayoutTests/fast/events/event-on-xhr-document.html
@@ -31,16 +31,22 @@ function testEventsFiredOn(doc)
shouldBe("window.caughtFoo", "[]");
}
+window.jsTestIsAsync = true;
+
var xhrForXML = new XMLHttpRequest();
xhrForXML.open("GET", "resources/hello-xhr-event.xml", false);
xhrForXML.send();
testEventsFiredOn(xhrForXML.responseXML);
+// Must run asynchronous to use responseType.
var xhrForHTML = new XMLHttpRequest();
-xhrForHTML.open("GET", "resources/hello-xhr-event.html", false);
+xhrForHTML.open("GET", "resources/hello-xhr-event.html", true);
xhrForHTML.responseType = "document";
+xhrForHTML.onload = function() {
+ testEventsFiredOn(xhrForHTML.response);
+ finishJSTest();
+};
xhrForHTML.send();
-testEventsFiredOn(xhrForHTML.response);
</script>
</body>
« no previous file with comments | « no previous file | LayoutTests/fast/events/xhr-onclick-crash.html » ('j') | LayoutTests/fast/events/xhr-onclick-crash.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698