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

Unified Diff: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unload-sync.html

Issue 102353004: Allow resource loads inside page unload events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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/http/tests/xmlhttprequest/xmlhttprequest-unload-sync.html
diff --git a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unload-sync.html b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unload-sync.html
new file mode 100644
index 0000000000000000000000000000000000000000..b66a7cdc804c5ea64a16f98a9b1824d3242ce683
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unload-sync.html
@@ -0,0 +1,36 @@
+<html>
+<body>
+<p>Test behavior of sync XHR during unload</p>
+<script>
+var consoleMessages = document.createElement("ul");
+document.body.appendChild(consoleMessages);
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+
+function subframeLoaded()
+{
+ document.getElementById('ifr').contentWindow.location.assign("data:text/html,DONE");
+}
+
+function completed(msg)
+{
+ log(msg);
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+function log(message)
+{
+ var item = document.createElement("li");
+ item.appendChild(document.createTextNode(message));
+ consoleMessages.appendChild(item);
+}
+</script>
+<div id="framediv">
+<iframe id="ifr" src="resources/xmlhttprequest-in-unload-sync.html"></iframe>
+</div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698