Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/loader/stateobjects/spam-pushstate-then-throttled.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/loader/stateobjects/spam-pushstate-then-throttled.html b/third_party/WebKit/LayoutTests/fast/loader/stateobjects/spam-pushstate-then-throttled.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2805f86d57252faa95a653adb5022edc57ef793b |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/loader/stateobjects/spam-pushstate-then-throttled.html |
| @@ -0,0 +1,23 @@ |
| +<html> |
| +<head> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| +'use strict'; |
| + |
| +// This value must match that in Source/core/frame/History.cpp. |
| +const kStateUpdateLimit = 50; |
| +for (let i = 0; i < kStateUpdateLimit; ++i) { |
| + history.pushState("SpammyHistoryItem", "" + i); |
| +} |
| +assert_equals(kStateUpdateLimit, history.length); |
| + |
| +history.pushState("DiscardedSpamItem", "51"); |
|
kinuko
2017/07/11 00:38:04
I wanted to say this discarsion is impl-specific b
|
| +assert_equals(kStateUpdateLimit, history.length); |
| + |
| +done(); |
| +</script> |
| +</body> |
| +</html> |