Skip to content

Commit 1a1ac85

Browse files
committed
HTML: Too many calls to pushState/replaceState throws
See whatwg/html#11169
1 parent d951f4e commit 1a1ac85

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
<head>
4+
<title>history pushState too many calls</title>
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
</head>
8+
<body>
9+
<div id="log"></div>
10+
<script>
11+
test(function () {
12+
assert_throws_dom("SecurityError", function () {
13+
for (let i = 0; i < 500; i++) {
14+
window.history.pushState(null, null, i);
15+
}
16+
});
17+
});
18+
</script>
19+
</body>
20+
</html>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
<head>
4+
<title>history replaceState too many calls</title>
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
</head>
8+
<body>
9+
<div id="log"></div>
10+
<script>
11+
test(function () {
12+
assert_throws_dom("SecurityError", function () {
13+
for (let i = 0; i < 500; i++) {
14+
window.history.replaceState(null, null, i);
15+
}
16+
});
17+
});
18+
</script>
19+
</body>
20+
</html>

0 commit comments

Comments
 (0)