summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/history/the-history-interface/history_state.html
blob: 2ee2356b1acdde48ee03bd18d644857bb9fc1062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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>