ate('state2','');
}, 'history.pushState support is needed for this testcase');
test(function () {
  assert_equals( history.state, 'state2' );
}, 'history.state should reflect pushed state');
if( history.pushState ) { history.go(-1); }
window.onload = function () {
  test(function () {
    assert_true( !!popfired );
  }, 'popstate event should fire before onload fires');
  test(function () {
    assert_equals( popfired, 'state1' );
  }, 'the correct state should be restored when navigating during initial loa