summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/events/fire-popstate-event.html
blob: c3f340df30d6509b3edca29e6b250501ae2f5183 (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
25
26
27
28
29
30

<html>
<script src="../js/resources/js-test-pre.js"></script>
<body style="min-width: 5000px; min-height: 5000px">
<script>
description('Checks that the popstate event fires when dispatched via createEvent');

onpopstate = function(event)
{
    if(!!event.state && !!event.state.testValue)
    {
        testPassed('Popstate state: (' + event.state.testValue +')');
    }
}

onload = function()
{
    var evt = document.createEvent("PopStateEvent");
    evt.initPopStateEvent("popstate", false, false, { testValue: "Success"} );
    window.dispatchEvent(evt);
}

setTimeout(finishJSTest, 500);

var successfullyParsed = true;
var jsTestIsAsync = true;
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>