diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/history/the-history-interface/history_state.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/history/the-history-interface/history_state.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/history/the-history-interface/history_state.html b/testing/web-platform/tests/html/browsers/history/the-history-interface/history_state.html new file mode 100644 index 0000000000..2ee2356b1a --- /dev/null +++ b/testing/web-platform/tests/html/browsers/history/the-history-interface/history_state.html @@ -0,0 +1,24 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>history_state</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + <script> + test(function () { + var first; + var second; + + first = window.history.state; + window.history.pushState(1, document.title, '?x=1'); + + second = window.history.state; + assert_equals(first, null, "first"); + assert_equals(second, 1, "second"); + }, "history state"); + </script> + </body> +</html> |