blob: b18dd2b85b6ea60a238189ab1218594f37adfb74 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
jsTestIsAsync = true;
description("Tests how the performance object works when it's owning window is not fully active due to navigation.");
var perfFromInitialFrame;
// Called by initialFrame.html
function initialFrameLoaded()
{
var otherWindow = document.getElementById("frame").contentWindow;
perfFromInitialFrame = otherWindow.performance;
otherWindow.location.href = "secondFrame.html";
}
// Called by secondFrame.html
function secondFrameLoaded()
{
// This should not crash.
value = perfFromInitialFrame.now();
shouldNotBe('value', 'undefined');
finishJSTest();
}
</script>
<script src="../../resources/js-test-post.js"></script>
<iframe id="frame" src="resources/initialFrame.html"></iframe>
</body>
</html>