diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 23:59:57 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 23:59:57 +0000 |
commit | 05c52c546db0063c3deeea613b4b427de30c6d68 (patch) | |
tree | 42075f7aea412f84976b2024d657d4ec9c63a2bb /chrome/browser/extensions/extension_uitest.cc | |
parent | 0f9f7c59cebc0a34a83aacf7321e44972e222f26 (diff) | |
download | chromium_src-05c52c546db0063c3deeea613b4b427de30c6d68.zip chromium_src-05c52c546db0063c3deeea613b4b427de30c6d68.tar.gz chromium_src-05c52c546db0063c3deeea613b4b427de30c6d68.tar.bz2 |
Give UITest ability to have MessageLoopforUI message loop instead of the default one.
ExternalTabContainer tests create the host window and the automationproxy in the main thread, that will cause deadlock (especially when host window is visible).
Added test for openening popup windows.
TEST=ui_tests
Review URL: http://codereview.chromium.org/661028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_uitest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_uitest.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_uitest.cc b/chrome/browser/extensions/extension_uitest.cc index 5537dc4..1235b60 100644 --- a/chrome/browser/extensions/extension_uitest.cc +++ b/chrome/browser/extensions/extension_uitest.cc @@ -71,6 +71,9 @@ class ExtensionUITest : public ExternalTabUITest { void SetUp() { ExternalTabUITest::SetUp(); + // TabProxy::NavigateInExternalTab is a sync call and can cause a deadlock + // if host window is visible. + mock_->host_window_style_ &= ~WS_VISIBLE; tab_ = mock_->CreateTabWithUrl(GURL()); tab_->SetEnableExtensionAutomation(functions_enabled_); } @@ -125,6 +128,8 @@ TEST_F(ExtensionTestSimpleApiCall, RunTest) { ASSERT_THAT(mock_, testing::NotNull()); EXPECT_CALL(*mock_, OnDidNavigate(_, _)).Times(1); + EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) + .Times(testing::AnyNumber()); std::string message_received; EXPECT_CALL(*mock_, OnForwardMessageToExternalHost( @@ -259,6 +264,9 @@ TEST_F(ExtensionTestRoundtripApiCall, RunTest) { ASSERT_THAT(mock_, testing::NotNull()); EXPECT_CALL(*mock_, OnDidNavigate(_, _)).Times(1); + EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) + .Times(testing::AnyNumber()); + EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber()); EXPECT_CALL(*mock_, OnForwardMessageToExternalHost( _, _, keys::kAutomationOrigin, keys::kAutomationRequestTarget)) @@ -444,6 +452,9 @@ TEST_F(ExtensionTestBrowserEvents, RunTest) { ASSERT_THAT(mock_, testing::NotNull()); EXPECT_CALL(*mock_, OnDidNavigate(_, _)).Times(1); + EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) + .Times(testing::AnyNumber()); + EXPECT_CALL(*mock_, OnLoad(_, _)).Times(testing::AnyNumber()); EXPECT_CALL(*mock_, OnForwardMessageToExternalHost( _, _, keys::kAutomationOrigin, _)) |