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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304.html

Issue 1558703002: Synchronous requests that get a 304 clobber the cached response body. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment Created 4 years, 11 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: third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304.html b/third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304.html
new file mode 100644
index 0000000000000000000000000000000000000000..3785987de1c2f1c2a711524ebe7feaaa32a6af96
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304.html
@@ -0,0 +1,16 @@
+Send 2 sync xhrs to the same url such that the 2nd should return a 304. Ensure that the responseText for the 2nd XHR is non-empty.<br>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+var xhr = new XMLHttpRequest();
+xhr.open("GET", "resources/etag.php", false);
+xhr.send(null);
+
+var xhr2 = new XMLHttpRequest();
+xhr2.open("GET", "resources/etag.php", false);
+xhr2.send(null);
+
+document.body.appendChild(document.createTextNode("xhr2.responseText: " + xhr2.responseText));
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698