| <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"); |
| assert_equals(kStateUpdateLimit, history.length); |
| |
| done(); |
| </script> |
| </body> |
| </html> |