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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/navigation/beacon-cross-origin-redirect-blob.html

Issue 2177383006: Update and fix sendBeacon() redirect behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment spelling Created 4 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
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="/js-test-resources/js-test.js"></script>
tyoshino (SeeGerritForStatus) 2016/07/28 07:21:57 mkwst@ has sent a mail encouraging use of testharn
sof 2016/07/28 08:28:19 No, I don't think we should for one beacon test.
tyoshino (SeeGerritForStatus) 2016/07/28 12:03:20 For consistency with existing tests? Then, ok.
5 <script>
6 description("Verifying navigator.sendBeacon(Blob) non-CORS cross-origin redirect handling.");
7
8 window.jsTestIsAsync = true;
9
10 var blob;
11 function test() {
12 if (window.testRunner) {
13 testRunner.dumpAsText();
14 testRunner.dumpPingLoaderCallbacks();
15 }
16
17 blob = new Blob(["Cross", "Origin"], {type: "text/plain;from-beacon=true"});
18 shouldBeTrue('navigator.sendBeacon("http://127.0.0.1:8080/navigation/resourc es/redirection-response.php?status=302&simple=true&target=non-existent.php", blo b);');
19 // Wait a while for the redirect response handling to happen before finishin g up.
20 setTimeout(function () {
21 blob = new Blob([new Uint8Array(20)], {type: "application/octet-stream"} );
22 shouldBeTrue('navigator.sendBeacon("http://127.0.0.1:8080/navigation/res ources/redirection-response.php?status=302&simple=false&target=non-existent.php" , blob);');
23 setTimeout(finishJSTest, 200);
24 }, 200);
25 }
26 </script>
27 </head>
28 <body onload="test();">
29 </body>
30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698