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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/sendbeacon/beacon-allowance-no-limit.html

Issue 2753863003: Clarify Beacon transmission limit checking. (Closed)
Patch Set: rebased upto r459528 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Settings.json5 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/sendbeacon/beacon-allowance-no-limit.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/sendbeacon/beacon-allowance-no-limit.html b/third_party/WebKit/LayoutTests/http/tests/sendbeacon/beacon-allowance-no-limit.html
new file mode 100644
index 0000000000000000000000000000000000000000..bd4fdf36e173f8dabda2db18bcc4f24936abff36
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/sendbeacon/beacon-allowance-no-limit.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<script src="/js-test-resources/testharness.js"></script>
+<script src="/js-test-resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ if (!window.internals)
+ return;
+
+ // Any negative value will do to disable limit checks.
+ internals.settings.setMaxBeaconTransmission(-2);
+
+ let payload = new Uint8Array(128 * 1024);
+ assert_true(navigator.sendBeacon("resources/blank.txt", payload));
+ assert_true(navigator.sendBeacon("resources/blank.txt", payload));
+}, "If no beacon transmission limit is in effect, then navigator.sendBeacon()" +
+ " should succeed.");
+</script>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Settings.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698