diff options
| author | jl@opera.com <jl@opera.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2014-02-03 19:36:48 +0000 |
|---|---|---|
| committer | jl@opera.com <jl@opera.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2014-02-03 19:36:48 +0000 |
| commit | 3af118bcf7b9b7a8ee71ea553d66e3c27c05bc06 (patch) | |
| tree | 691aa8d23049775733b73b6042b95d9d20f93066 | |
| parent | ccbf4cb3a6b8e249a2c1a564be97f70785142769 (diff) | |
| download | chromium_src-3af118bcf7b9b7a8ee71ea553d66e3c27c05bc06.zip chromium_src-3af118bcf7b9b7a8ee71ea553d66e3c27c05bc06.tar.gz chromium_src-3af118bcf7b9b7a8ee71ea553d66e3c27c05bc06.tar.bz2 | |
Clean up and deflake history navigation test
When returning from having navigated to navigate-back.html, both
runSecondStageOfTest() and the popstate event handler would set a
timeout that called history.back(). The first navigation would
trigger the hashchange event handler that signaled a pass, the
second ought to have had no effect.
In practice, the test occasionally timed out or crashed instead,
for unknown reasons. Removing the extra history.back() timeout
apparently avoids this.
BUG=339265
Review URL: https://codereview.chromium.org/148453014
git-svn-id: svn://svn.chromium.org/blink/trunk@166325 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed, 2 insertions, 19 deletions
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 768384c8..5e6f576 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations @@ -881,7 +881,6 @@ crbug.com/339259 fast/flexbox/box-orient-button.html [ Pass Failure ] crbug.com/339238 inspector/layer-tree-model.html [ Pass Failure ] crbug.com/339539 http/tests/workers/terminate-during-sync-operation.html [ Pass Timeout ] crbug.com/339394 [ Win Debug ] virtual/threaded/animations/animation-matrix-negative-scale-unmatrix.html [ Pass Failure ] -crbug.com/339265 fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html [ Pass Timeout Crash ] crbug.com/339592 media/track/opera/interfaces/TextTrackList/onaddtrack.html [ Pass Crash ] crbug.com/339597 http/tests/navigation/back-to-redirect-with-frame.php [ Pass Timeout ] diff --git a/third_party/WebKit/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt b/third_party/WebKit/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt index 3f38371..0e18671 100644 --- a/third_party/WebKit/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt @@ -7,7 +7,6 @@ ALERT: hashChanged - Last path component of location is document-destroyed-navig ALERT: Navigating back... main frame - has 1 onunload handler(s) ALERT: LOADED -ALERT: Last path component of location is document-destroyed-navigate-back-with-fragment-scroll.html#SecondEntryWillLaterBeReactivated ALERT: State popped - SecondEntryWillLaterBeReactivated (type string) ALERT: State popped - FirstEntryWillLaterBeReactivated (type string) ALERT: hashChanged - Last path component of location is document-destroyed-navigate-back-with-fragment-scroll.html#FirstEntryWillLaterBeReactivated diff --git a/third_party/WebKit/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html b/third_party/WebKit/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html index 67bf15c..eb9e3ee 100644 --- a/third_party/WebKit/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html +++ b/third_party/WebKit/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html @@ -18,34 +18,19 @@ function hashOf(url) { return url.substring(url.lastIndexOf('#')); } - + function runFirstStageOfTest() -{ +{ history.replaceState("FirstEntry", null, "#FirstEntry"); history.pushState("SecondEntry", null, "#SecondEntry"); history.back(); } -function runSecondStageOfTest() -{ - alert("Last path component of location is " + lastPathComponent(location.href)); - setTimeout("history.back();", 0); -} - -function runThirdStageOfTest() -{ - alert("Final stage of test loaded"); -} - function runTest() { alert("LOADED"); if (!sessionStorage.stage) runFirstStageOfTest(); - else if (sessionStorage.stage == 2) - runSecondStageOfTest(); - else if (sessionStorage.stage == 3) - runThirdStageOfTest(); } onpopstate = function() |
