summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/history/the-history-interface/combination_history_001.html
blob: 21ba22f6fe321573bbb9e5df29d0b18f5c4fa5d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE HTML>
<html>
  <head>
    <title>combination_history_001(Combine pushState and replaceSate methods.)</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
    <div id="log"></div>
    <script>
    test(function () {
      window.history.pushState(1, document.title, '?x=1');
      assert_equals(history.state, 1, "first");

      window.history.replaceState(2, document.title, '?x=1');
      assert_equals(history.state, 2, "second")
    }, "Combine pushState and replaceSate methods");
    </script>
  </body>
</html>