summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome_frame/test/data/fulltab_before_unload_event_main.html3
-rw-r--r--chrome_frame/test/data/fulltab_before_unload_event_test.html4
-rw-r--r--chrome_frame/test/test_mock_with_web_server.cc3
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;