Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: chrome_frame/test/no_interference_test.cc

Issue 2866013: The ChromeFrame JavascriptWindowOpen test tries to open a popup in the onload... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome_frame/test/test_mock_with_web_server.h" 5 #include "chrome_frame/test/test_mock_with_web_server.h"
6 6
7 #include "base/scoped_variant_win.h" 7 #include "base/scoped_variant_win.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome_frame/test/simulate_input.h" 9 #include "chrome_frame/test/simulate_input.h"
10 #include "chrome_frame/test/test_with_web_server.h" 10 #include "chrome_frame/test/test_with_web_server.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 LaunchIEAndNavigate(empty_page_url()); 129 LaunchIEAndNavigate(empty_page_url());
130 } 130 }
131 131
132 // Javascript window.open should open a new window with an IE renderer. 132 // Javascript window.open should open a new window with an IE renderer.
133 TEST_F(NoInterferenceTest, FLAKY_JavascriptWindowOpen) { 133 TEST_F(NoInterferenceTest, FLAKY_JavascriptWindowOpen) {
134 const std::wstring kWindowOpenUrl = GetTestUrl(L"window_open.html"); 134 const std::wstring kWindowOpenUrl = GetTestUrl(L"window_open.html");
135 ComStackObjectWithUninitialize< 135 ComStackObjectWithUninitialize<
136 testing::StrictMock<MockWebBrowserEventSink> > new_window_mock; 136 testing::StrictMock<MockWebBrowserEventSink> > new_window_mock;
137 137
138 mock_.ExpectNavigationInIE(kWindowOpenUrl); 138 mock_.ExpectNavigationInIE(kWindowOpenUrl);
139 EXPECT_CALL(mock_, OnIELoad(testing::StrCaseEq(kWindowOpenUrl))); 139 EXPECT_CALL(mock_, OnIELoad(testing::StrCaseEq(kWindowOpenUrl)))
140 .WillOnce(testing::DoAll(
141 DelaySendMouseClickToIE(&mock_, &loop_, 0, 100, 100,
142 simulate_input::LEFT),
143 DelaySendMouseClickToIE(&mock_, &loop_, 0, 100, 100,
144 simulate_input::LEFT)));
140 145
141 mock_.ExpectNewWindowWithIE(empty_page_url(), &new_window_mock); 146 mock_.ExpectNewWindowWithIE(empty_page_url(), &new_window_mock);
142 EXPECT_CALL(new_window_mock, OnIELoad(testing::StrCaseEq(empty_page_url()))) 147 EXPECT_CALL(new_window_mock, OnIELoad(testing::StrCaseEq(empty_page_url())))
143 .WillOnce(testing::DoAll( 148 .WillOnce(testing::DoAll(
144 VerifyAddressBarUrl(&new_window_mock), 149 VerifyAddressBarUrl(&new_window_mock),
145 CloseBrowserMock(&new_window_mock))); 150 CloseBrowserMock(&new_window_mock)));
146 EXPECT_CALL(new_window_mock, OnQuit()) 151 EXPECT_CALL(new_window_mock, OnQuit())
147 .WillOnce(CloseBrowserMock(&mock_)); 152 .WillOnce(CloseBrowserMock(&mock_));
148 153
149 LaunchIEAndNavigate(kWindowOpenUrl); 154 LaunchIEAndNavigate(kWindowOpenUrl);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // TODO(kkania): Verifying the address bar is flaky with this, at least 231 // TODO(kkania): Verifying the address bar is flaky with this, at least
227 // on XP ie6. Fix. 232 // on XP ie6. Fix.
228 EXPECT_CALL(new_window_mock, OnIELoad(testing::StrCaseEq(empty_page_url()))) 233 EXPECT_CALL(new_window_mock, OnIELoad(testing::StrCaseEq(empty_page_url())))
229 .WillOnce(CloseBrowserMock(&new_window_mock)); 234 .WillOnce(CloseBrowserMock(&new_window_mock));
230 EXPECT_CALL(new_window_mock, OnQuit()).WillOnce(CloseBrowserMock(&mock_)); 235 EXPECT_CALL(new_window_mock, OnQuit()).WillOnce(CloseBrowserMock(&mock_));
231 236
232 LaunchIEAndNavigate(link_page_url()); 237 LaunchIEAndNavigate(link_page_url());
233 } 238 }
234 239
235 } // namespace 240 } // namespace
OLDNEW
« no previous file with comments | « chrome_frame/test/data/no_interference/window_open.html ('k') | chrome_frame/test/test_mock_with_web_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698