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

Unified Diff: LayoutTests/fast/html/imports/import-defaultView.html

Issue 206223005: Forbid setting responseType on all sync XHRs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: waitUntilDone 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/html/imports/import-defaultView.html
diff --git a/LayoutTests/fast/html/imports/import-defaultView.html b/LayoutTests/fast/html/imports/import-defaultView.html
index 4c133ca870a0f6ddea4ac2f355b26b722539ea14..7b9b0f52c71cecfad9b9234f0bb23cea6ef5e878 100644
--- a/LayoutTests/fast/html/imports/import-defaultView.html
+++ b/LayoutTests/fast/html/imports/import-defaultView.html
@@ -8,14 +8,19 @@
<script>
shouldBe("importLink.import.defaultView", "document.defaultView");
+window.jsTestIsAsync = true;
+
var xhr = new XMLHttpRequest();
-xhr.open("GET", "resources/root.html", false);
+xhr.open("GET", "resources/root.html", true);
xhr.responseType = "document";
-xhr.send();
-shouldBeNull("xhr.response.defaultView");
+xhr.onload = function() {
+ shouldBeNull("xhr.response.defaultView");
-createdDoc = document.implementation.createHTMLDocument("Hello");
-shouldBeNull("createdDoc.defaultView");
+ createdDoc = document.implementation.createHTMLDocument("Hello");
+ shouldBeNull("createdDoc.defaultView");
+ finishJSTest();
+};
+xhr.send();
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698