diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-25 23:03:07 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-25 23:03:07 +0000 |
commit | bb2c9a816bfa5709c5b43624f24713bc1a4c3d19 (patch) | |
tree | 0fbe451492b676892ea85cc4014b88d52686a8f7 /chrome_frame | |
parent | c74eee96a9da828ca67a88abbfe67a0e998b3467 (diff) | |
download | chromium_src-bb2c9a816bfa5709c5b43624f24713bc1a4c3d19.zip chromium_src-bb2c9a816bfa5709c5b43624f24713bc1a4c3d19.tar.gz chromium_src-bb2c9a816bfa5709c5b43624f24713bc1a4c3d19.tar.bz2 |
Enabling the ChromeFrame unload event test which validates that unload handlers on the page are invoked correctly. To flag success or
failure we now set the state in the localStorage object instead of setting this via cookies as the cookies are set in IE on the UI thread
causing this test to fail.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=40814
Bug=40814
Review URL: http://codereview.chromium.org/2215001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
3 files changed, 4 insertions, 6 deletions
diff --git a/chrome_frame/test/data/fulltab_before_unload_event_main.html b/chrome_frame/test/data/fulltab_before_unload_event_main.html index 4cd6b56..d4bbc47 100644 --- a/chrome_frame/test/data/fulltab_before_unload_event_main.html +++ b/chrome_frame/test/data/fulltab_before_unload_event_main.html @@ -7,10 +7,9 @@ <script language=javascript> function onLoad() { if (isRunningInChrome()) { - if (/unload_success/.test(document.cookie)) { + if (window.localStorage.unload_success == 1) { window.externalHost.postMessage("Unload success"); } - eraseCookie("unload_success"); } } </script> diff --git a/chrome_frame/test/data/fulltab_before_unload_event_test.html b/chrome_frame/test/data/fulltab_before_unload_event_test.html index 4a1e439..562312a 100644 --- a/chrome_frame/test/data/fulltab_before_unload_event_test.html +++ b/chrome_frame/test/data/fulltab_before_unload_event_test.html @@ -8,8 +8,8 @@ <script type="text/javascript"> var new_window; function ValidateUserAgent() { - eraseCookie("unload_success"); if (isRunningInChrome()) { + window.localStorage.unload_success = 0; new_window = window.open("fulltab_before_unload_event_main.html", "_self"); } @@ -17,7 +17,7 @@ function onBeforeUnload() { if (isRunningInChrome()) { - createCookie("unload_success", 1, 1); + new_window.localStorage.unload_success = 1; } } </script> diff --git a/chrome_frame/test/test_mock_with_web_server.cc b/chrome_frame/test/test_mock_with_web_server.cc index 5ab180b..f869bb7 100644 --- a/chrome_frame/test/test_mock_with_web_server.cc +++ b/chrome_frame/test/test_mock_with_web_server.cc @@ -804,8 +804,7 @@ const wchar_t kBeforeUnloadTest[] = const wchar_t kBeforeUnloadMain[] = L"http://localhost:1337/files/fulltab_before_unload_event_main.html"; -// http://code.google.com/p/chromium/issues/detail?id=40814 -TEST_F(ChromeFrameTestWithWebServer, DISABLED_FullTabModeIE_UnloadEventTest) { +TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_UnloadEventTest) { CloseIeAtEndOfScope last_resort_close_ie; ComStackObjectWithUninitialize<MockWebBrowserEventSink> mock; chrome_frame_test::TimedMsgLoop loop; |