diff options
author | commit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2010-08-13 23:35:34 +0000 |
---|---|---|
committer | commit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2010-08-13 23:35:34 +0000 |
commit | b29b7235f9d978c5ddf6e8530e558150f314ee5a (patch) | |
tree | acabfaf8e8b616152fbc9a0016ffb3bab71deb8a /third_party/WebKit/LayoutTests/security | |
parent | 26ed3cdb76cd4d44ca0147052a30f396a216379a (diff) | |
download | chromium_src-b29b7235f9d978c5ddf6e8530e558150f314ee5a.zip chromium_src-b29b7235f9d978c5ddf6e8530e558150f314ee5a.tar.gz chromium_src-b29b7235f9d978c5ddf6e8530e558150f314ee5a.tar.bz2 |
2010-08-13 Mihai Parparita <mihaip@chromium.org>
Reviewed by Dimitri Glazkov.
Session history should skip over JS redirects
https://bugs.webkit.org/show_bug.cgi?id=42861
Lock the back/forward list for location changes and form submits that
happen before the onload event fires that are not the result of user
gestures.
http/tests/history tests now pass, their expectations were updated
accordingly. Other tests needed a setTimeout wrapper around location
changes and form submits during onload, otherwise they would not
generate history entries as expected anymore.
* fast/css/target-fragment-match.html:
* fast/dom/location-hash.html:
* fast/dom/Geolocation/resources/cached-page-1.html:
* fast/dom/Window/timer-resume-on-navigation-back.html:
* fast/events/pageshow-pagehide-on-back-cached-with-frames-expected.txt:
* fast/events/pageshow-pagehide-on-back-cached-with-frames.html:
* fast/forms/button-state-restore.html:
* fast/forms/state-restore-to-non-autocomplete-form.html:
* fast/forms/state-restore-to-non-edited-controls.html:
* fast/frames/resources/cached-page-1.html:
* fast/frames/resources/cached-page-2.html:
* fast/harness/resources/cached-page-1.html:
* fast/harness/resources/cached-page-with-data-urls.html:
* fast/history/gesture-before-onload-expected.txt: Added.
* fast/history/gesture-before-onload.html: Added.
* fast/history/history-length.html:
* fast/history/resources/gesture-before-onload-target.html: Added.
* fast/history/saves-state-after-fragment-nav.html:
* fast/loader/input-element-page-cache-crash.html:
* fast/loader/stateobjects/document-destroyed-navigate-back.html:
* fast/loader/stateobjects/pushstate-clears-forward-history.html:
* fast/loader/subframe-navigate-during-main-frame-load.html:
* http/tests/history/back-to-post.php:
* http/tests/history/redirect-js-document-location-before-load-expected.txt:
* http/tests/history/redirect-js-form-submit-before-load-expected.txt:
* http/tests/history/redirect-js-location-assign-before-load-expected.txt:
* http/tests/history/redirect-js-location-before-load-expected.txt:
* http/tests/history/redirect-js-location-href-before-load-expected.txt:
* http/tests/loading/307-after-303-after-post-expected.txt:
* http/tests/loading/redirect-methods-expected.txt:
* http/tests/navigation/resources/back-send-referrer-helper.php:
* http/tests/navigation/resources/document-location.js:
(start):
* http/tests/navigation/resources/submit-to-fragment.pl:
* security/autocomplete-cleared-on-back.html:
* storage/hash-change-with-xhr.js:
(updateDatabase):
(invokeBack):
(runTest):
(runTestsInner):
2010-08-13 Mihai Parparita <mihaip@chromium.org>
Reviewed by Dimitri Glazkov.
Session history should skip over JS redirects
https://bugs.webkit.org/show_bug.cgi?id=42861
Lock the back/forward list for location changes and form submits that
happen before the onload event fires that are not the result of user
gestures.
Made form submission (at the ScheduledFormSubmission level) more similar
to ScheduledURLNavigation by having it call clientRedirected too, fixing
a long-standing FIXME.
Test: fast/history/gesture-before-onload-location-href.html,
fast/history/gesture-before-onload-form-submit.html and updated
expectations for http/tests/history tests that used to fail.
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::requestURL):
(WebCore::FormSubmission::populateFrameLoadRequest):
* loader/FormSubmission.h:
* loader/RedirectScheduler.cpp:
(WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
(WebCore::ScheduledFormSubmission::fire):
(WebCore::ScheduledFormSubmission::didStartTimer):
(WebCore::ScheduledFormSubmission::didStopTimer):
(WebCore::RedirectScheduler::scheduleRedirect):
(WebCore::RedirectScheduler::mustLockBackForwardList):
(WebCore::RedirectScheduler::scheduleLocationChange):
(WebCore::RedirectScheduler::scheduleFormSubmission):
* loader/RedirectScheduler.h:
git-svn-id: svn://svn.chromium.org/blink/trunk@65340 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/security')
-rw-r--r-- | third_party/WebKit/LayoutTests/security/autocomplete-cleared-on-back.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/WebKit/LayoutTests/security/autocomplete-cleared-on-back.html b/third_party/WebKit/LayoutTests/security/autocomplete-cleared-on-back.html index 0801881..96c9d81 100644 --- a/third_party/WebKit/LayoutTests/security/autocomplete-cleared-on-back.html +++ b/third_party/WebKit/LayoutTests/security/autocomplete-cleared-on-back.html @@ -19,7 +19,8 @@ function runTest() if (!sessionStorage.secondPageReached) { document.getElementById("firstInput").value = "SuperSeekritValue"; document.getElementById("secondInput").value = "SuperSeekritValue"; - window.location = "resources/autocomplete-cleared-on-back2.html"; + // Location changes need to happen outside the onload handler to generate history entries. + setTimeout(function() {window.location = "resources/autocomplete-cleared-on-back2.html";}, 0); return; } |