From c9f8a4f1c96ffa319698778e53aa08d9ea39a91d Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Fri, 23 Apr 2010 00:15:39 +0000 Subject: Continuing attempt to fix chrome frame tests crashes. Moving the ComObjectstackEx instances which handle new IE windows to before the message loop to ensure that they remain valid when the message loop is destroyed. Bug=41980 Review URL: http://codereview.chromium.org/1761005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45387 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/test/test_mock_with_web_server.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome_frame/test/test_mock_with_web_server.cc b/chrome_frame/test/test_mock_with_web_server.cc index 5545b3c..dcbbc27 100644 --- a/chrome_frame/test/test_mock_with_web_server.cc +++ b/chrome_frame/test/test_mock_with_web_server.cc @@ -393,6 +393,7 @@ const wchar_t kWindowOpenPopupUrl[] = TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_WindowOpenInChrome) { CloseIeAtEndOfScope last_resort_close_ie; ComStackObjectWithUninitialize mock; + ComStackObjectWithUninitialize new_window_mock; chrome_frame_test::TimedMsgLoop loop; mock.ExpectNavigationAndSwitch(kWindowOpenUrl); @@ -402,7 +403,6 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_WindowOpenInChrome) { .WillOnce(DelaySendChar(&loop, 500, 'A', simulate_input::NONE)); // Watch for new window - ComStackObjectWithUninitialize new_window_mock; mock.ExpectNewWindow(&new_window_mock); EXPECT_CALL(new_window_mock, OnLoad(testing::StrCaseEq(kWindowOpenPopupUrl))) @@ -574,6 +574,7 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_AboutChromeFrame) { CloseIeAtEndOfScope last_resort_close_ie; ComStackObjectWithUninitialize mock; + ComStackObjectWithUninitialize new_window_mock; chrome_frame_test::TimedMsgLoop loop; mock.ExpectNavigationAndSwitch(kSubFrameUrl1); @@ -584,7 +585,6 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_AboutChromeFrame) { SendExtendedKeysEnter(&loop, 500, VK_UP, 1, simulate_input::NONE))); // Watch for new window - ComStackObjectWithUninitialize new_window_mock; mock.ExpectNewWindow(&new_window_mock); EXPECT_CALL(new_window_mock, OnLoad(testing::StrCaseEq(kAboutVersion))) @@ -802,6 +802,7 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_BackForwardAnchor) { TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_ViewSource) { CloseIeAtEndOfScope last_resort_close_ie; ComStackObjectWithUninitialize mock; + ComStackObjectWithUninitialize view_source_mock; chrome_frame_test::TimedMsgLoop loop; ::testing::InSequence sequence; // Everything in sequence @@ -824,7 +825,6 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_ViewSource) { std::wstring url_in_new_window = kChromeProtocolPrefix; url_in_new_window += view_source_url; - ComStackObjectWithUninitialize view_source_mock; mock.ExpectNewWindow(&view_source_mock); EXPECT_CALL(view_source_mock, OnLoad(testing::StrCaseEq(view_source_url))) .WillOnce(testing::DoAll( @@ -1011,6 +1011,7 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_ContextMenuViewSource) { CloseIeAtEndOfScope last_resort_close_ie; ComStackObjectWithUninitialize mock; + ComStackObjectWithUninitialize view_source_mock; chrome_frame_test::TimedMsgLoop loop; ::testing::InSequence sequence; // Everything in sequence @@ -1030,7 +1031,6 @@ TEST_F(ChromeFrameTestWithWebServer, std::wstring url_in_new_window = kChromeProtocolPrefix; url_in_new_window += view_source_url; - ComStackObjectWithUninitialize view_source_mock; mock.ExpectNewWindow(&view_source_mock); EXPECT_CALL(view_source_mock, OnLoad(testing::StrCaseEq(view_source_url))) .WillOnce(testing::DoAll( -- cgit v1.1