diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 23:24:10 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 23:24:10 +0000 |
commit | 4d783f716f1355b8f3725424b25f6c2b98657e80 (patch) | |
tree | 11f122fb493661474e19022a83049b8965efd0d2 /chrome_frame/test | |
parent | bc3ef7faa993606415465cc3a036b5f3af9de660 (diff) | |
download | chromium_src-4d783f716f1355b8f3725424b25f6c2b98657e80.zip chromium_src-4d783f716f1355b8f3725424b25f6c2b98657e80.tar.gz chromium_src-4d783f716f1355b8f3725424b25f6c2b98657e80.tar.bz2 |
Attempt to fix the flakiness with the ChromeFrame FullTabModeIE_KeyboardTest and the FullTabModeIE_WindowOpenInChrome test. We need to set focus to the
Chrome renderer window.
Review URL: http://codereview.chromium.org/1736014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.cc | 2 | ||||
-rw-r--r-- | chrome_frame/test/data/full_tab_post_mshtml.html | 6 | ||||
-rw-r--r-- | chrome_frame/test/test_mock_with_web_server.cc | 9 |
3 files changed, 11 insertions, 6 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index aedc583..a174a6b 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -634,6 +634,8 @@ HRESULT WebBrowserEventSink::LaunchIEAndNavigate( EXPECT_TRUE(hr == S_OK); hr = Navigate(navigate_url); } + + DLOG_IF(WARNING, FAILED(hr)) << "Failed to launch IE. Error:" << hr; return hr; } diff --git a/chrome_frame/test/data/full_tab_post_mshtml.html b/chrome_frame/test/data/full_tab_post_mshtml.html index 48e506e..7170e8a 100644 --- a/chrome_frame/test/data/full_tab_post_mshtml.html +++ b/chrome_frame/test/data/full_tab_post_mshtml.html @@ -7,15 +7,15 @@ <script type="text/javascript"> function onLoad() { - if (isRunningInChrome()) { + if (isRunningInChrome()) {
location.href = "/quit?unexpectedly_running_in_chrome";
} else {
- document.getElementById("myform").submit(); + document.getElementById("myform").submit();
} } </script> - <body onload="onLoad();"> + <body onload="setTimeout(onLoad, 100);"> <form id="myform" action="full_tab_post_target_cf.html" method="POST"> Field nr 1: <input type="text" name="field1" value="test1"/><br/> Field nr 2: <input type="text" name="field1" value="test2"/><br/> diff --git a/chrome_frame/test/test_mock_with_web_server.cc b/chrome_frame/test/test_mock_with_web_server.cc index dcbbc27..5a5d0f8 100644 --- a/chrome_frame/test/test_mock_with_web_server.cc +++ b/chrome_frame/test/test_mock_with_web_server.cc @@ -335,7 +335,9 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_KeyboardTest) { const wchar_t* input = L"Chrome"; EXPECT_CALL(mock, OnLoad(testing::StrEq(kKeyEventUrl))) - .WillOnce(DelaySendString(&loop, 500, input)); + .WillOnce(testing::DoAll( + DelaySendMouseClick(&mock, &loop, 0, 10, 10, simulate_input::LEFT), + DelaySendString(&loop, 500, input))); EXPECT_CALL(mock, OnMessage(testing::StrEq(input), _, _)) .WillOnce(CloseBrowserMock(&mock)); @@ -400,8 +402,9 @@ TEST_F(ChromeFrameTestWithWebServer, FLAKY_FullTabModeIE_WindowOpenInChrome) { const wchar_t* input = L"A"; EXPECT_CALL(mock, OnLoad(testing::StrCaseEq(kWindowOpenUrl))) - .WillOnce(DelaySendChar(&loop, 500, 'A', simulate_input::NONE)); - + .WillOnce(testing::DoAll( + DelaySendMouseClick(&mock, &loop, 0, 10, 10, simulate_input::LEFT), + DelaySendChar(&loop, 500, 'A', simulate_input::NONE))); // Watch for new window mock.ExpectNewWindow(&new_window_mock); |