The ChromeFrame JavascriptWindowOpen test tries to open a popup in the onload notification, which is blocked on
IE7/8 by the popup blocker thus causing this test to consistently fail. Fix is to open the popup in the ondblclick notification and to fire dummy mouse down events to the IE window to trigger this event. TBR=amit Review URL: http://codereview.chromium.org/2866013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50458 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
chrome_frame/test
@ -1,12 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
function popup() {
|
||||
window.open("empty.html", "test");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<body ondblclick="popup();">
|
||||
Calling window.open...
|
||||
</body>
|
||||
</html>
|
@ -136,7 +136,12 @@ TEST_F(NoInterferenceTest, FLAKY_JavascriptWindowOpen) {
|
||||
testing::StrictMock<MockWebBrowserEventSink> > new_window_mock;
|
||||
|
||||
mock_.ExpectNavigationInIE(kWindowOpenUrl);
|
||||
EXPECT_CALL(mock_, OnIELoad(testing::StrCaseEq(kWindowOpenUrl)));
|
||||
EXPECT_CALL(mock_, OnIELoad(testing::StrCaseEq(kWindowOpenUrl)))
|
||||
.WillOnce(testing::DoAll(
|
||||
DelaySendMouseClickToIE(&mock_, &loop_, 0, 100, 100,
|
||||
simulate_input::LEFT),
|
||||
DelaySendMouseClickToIE(&mock_, &loop_, 0, 100, 100,
|
||||
simulate_input::LEFT)));
|
||||
|
||||
mock_.ExpectNewWindowWithIE(empty_page_url(), &new_window_mock);
|
||||
EXPECT_CALL(new_window_mock, OnIELoad(testing::StrCaseEq(empty_page_url())))
|
||||
|
@ -203,11 +203,6 @@ ACTION_P6(DelaySendMouseClick, mock, loop, delay, x, y, button) {
|
||||
&MockWebBrowserEventSink::SendMouseClick, x, y, button), delay);
|
||||
}
|
||||
|
||||
ACTION_P4(DelaySendChar, loop, delay, c, mod) {
|
||||
loop->PostDelayedTask(FROM_HERE, NewRunnableFunction(
|
||||
simulate_input::SendCharA, c, mod), delay);
|
||||
}
|
||||
|
||||
ACTION_P3(DelaySendString, loop, delay, str) {
|
||||
loop->PostDelayedTask(FROM_HERE, NewRunnableFunction(
|
||||
simulate_input::SendStringW, str), delay);
|
||||
|
@ -123,6 +123,11 @@ ACTION_P5(ValidateWindowSize, mock, left, top, width, height) {
|
||||
EXPECT_EQ(actual_height, height);
|
||||
}
|
||||
|
||||
ACTION_P4(DelaySendChar, loop, delay, c, mod) {
|
||||
loop->PostDelayedTask(FROM_HERE, NewRunnableFunction(
|
||||
simulate_input::SendCharA, c, mod), delay);
|
||||
}
|
||||
|
||||
} // namespace chrome_frame_test
|
||||
|
||||
#endif // CHROME_FRAME_TEST_MOCK_WITH_WEB_SERVER_H_
|
||||
|
Reference in New Issue
Block a user