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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/sendbeacon/beacon-allowance-limit.html

Issue 2751953002: sendBeacon(): once transmission allowance has been reached, always fail. (Closed)
Patch Set: fix test description imprecision Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/PingLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src="/js-test-resources/testharness.js"></script>
3 <script src="/js-test-resources/testharnessreport.js"></script>
4 <script>
5 test(() => {
6 // Note: the limit used must be same as Settings#maxBeaconTransmission.
7 // First beacon request should go through, but with a zero allowance for
8 // any subsequent requests. Which must fail.
9 let payload = new Uint8Array(64 * 1024);
10 let result = navigator.sendBeacon("resources/blank.txt", payload);
11 assert_true(result);
12 result = navigator.sendBeacon("resources/blank.txt", payload);
13 assert_false(result);
14 }, "navigator.sendBeacon() with a payload size greater than " +
15 "remaining transfer allowance should fail.");
16 </script>
17 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/PingLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698