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

Side by Side Diff: LayoutTests/fast/history/state-object-few-arguements-exception.html

Issue 1007113002: The history.pushState/replaceState should check for minimum arity exception. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script>
4
5 if (window.testRunner) {
6 testRunner.clearBackForwardList();
7 testRunner.dumpAsText();
8 }
9
10 function runPushStateTest()
11 {
12 shouldThrow('history.pushState()');
13 shouldThrow('history.pushState(null)');
14 shouldNotThrow('history.pushState(null, null)');
15 shouldNotThrow('history.pushState(null, null, null)');
16 }
17
18 function runReplaceStateTest()
19 {
20 shouldThrow('history.replaceState()');
21 shouldThrow('history.replaceState(null)');
22 shouldNotThrow('history.replaceState(null, null)');
23 shouldNotThrow('history.replaceState(null, null, null)');
24 }
25
26 function runTest()
27 {
28 description('This test makes sure that calls to pushState() and replaceState () with less than 2 arguments fail as expected.');
29 runPushStateTest();
30 runReplaceStateTest();
31 }
32
33 </script>
34 <body onload="runTest();">
35 <div id=console></div>
36 </body>
37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698