| Index: third_party/WebKit/LayoutTests/fast/dom/webtiming-navigate-within-document.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/webtiming-navigate-within-document.html b/third_party/WebKit/LayoutTests/fast/dom/webtiming-navigate-within-document.html
|
| index c1782883256ad9ae652de9ea7f61a998a4c5de8e..0c0a6483ba64951c59ddf73f9a88a320092fabdb 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/webtiming-navigate-within-document.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/webtiming-navigate-within-document.html
|
| @@ -4,6 +4,43 @@
|
| <script src="../../resources/js-test.js"></script>
|
| </head>
|
| <body>
|
| -<script src="script-tests/webtiming-navigate-within-document.js"></script>
|
| +<script>
|
| +description("This test checks that navigating within the document does not reset Web Timing numbers.");
|
| +
|
| +window.performance = window.performance || {};
|
| +var timing = performance.timing || {};
|
| +
|
| +function checkTimingNotChanged()
|
| +{
|
| + var properties = getAllPropertyNames(timing);
|
| + for (var i = 0; i < properties.length; ++i) {
|
| + var property = properties[i];
|
| + if (timing[property] === initialTiming[property])
|
| + testPassed(property + " is unchanged.");
|
| + else
|
| + testFailed(property + " changed.");
|
| + }
|
| + finishJSTest();
|
| +}
|
| +
|
| +var initialTiming = {};
|
| +function saveTimingAfterLoad()
|
| +{
|
| + for (var property in timing) {
|
| + initialTiming[property] = timing[property];
|
| + }
|
| + window.location.href = "#1";
|
| + setTimeout("checkTimingNotChanged()", 0);
|
| +}
|
| +
|
| +function loadHandler()
|
| +{
|
| + window.removeEventListener("load", loadHandler);
|
| + setTimeout("saveTimingAfterLoad()", 0);
|
| +}
|
| +window.addEventListener("load", loadHandler, false);
|
| +
|
| +jsTestIsAsync = true;
|
| +</script>
|
| </body>
|
| </html>
|
|
|