diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-21 23:32:42 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-21 23:32:42 +0000 |
commit | fbcb94913ce9ad658d542ee1718b406746e50abf (patch) | |
tree | f9403ff0a4c5682ddea43ae944546a17182aaf64 /chrome_frame/test | |
parent | 369396c946a4221efc200f821b05327a39a6ed0b (diff) | |
download | chromium_src-fbcb94913ce9ad658d542ee1718b406746e50abf.zip chromium_src-fbcb94913ce9ad658d542ee1718b406746e50abf.tar.gz chromium_src-fbcb94913ce9ad658d542ee1718b406746e50abf.tar.bz2 |
The ChromeFrame unit tests which use gmock exit with unexpected mock calls warnings, which seem
to be harmless at this point. Updated the relevant tests to expect these calls and ignore them.
The changes to chrome_frame_automation_mock.cc are based on the review comments to the previous
CL from phajdan.
Review URL: http://codereview.chromium.org/504078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/chrome_frame_automation_mock.cc | 8 | ||||
-rw-r--r-- | chrome_frame/test/chrome_frame_unittests.cc | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/chrome_frame/test/chrome_frame_automation_mock.cc b/chrome_frame/test/chrome_frame_automation_mock.cc index a44c83b..815f871 100644 --- a/chrome_frame/test/chrome_frame_automation_mock.cc +++ b/chrome_frame/test/chrome_frame_automation_mock.cc @@ -14,7 +14,7 @@ TEST(ChromeFrame, Launch) { mock_launch.Navigate("about:blank"); loop.Run(NULL); - EXPECT_EQ(true, mock_launch.launch_result()); + EXPECT_TRUE(mock_launch.launch_result()); } TEST(ChromeFrame, Navigate) { @@ -23,7 +23,7 @@ TEST(ChromeFrame, Navigate) { mock_navigate.NavigateRelativeFile(L"postmessage_basic_frame.html"); loop.Run(NULL); - EXPECT_EQ(false, mock_navigate.navigation_result()); + EXPECT_FALSE(mock_navigate.navigation_result()); } TEST(ChromeFrame, PostMessage) { @@ -32,7 +32,7 @@ TEST(ChromeFrame, PostMessage) { mock_postmessage.NavigateRelativeFile(L"postmessage_basic_frame.html"); loop.Run(NULL); - EXPECT_EQ(false, mock_postmessage.postmessage_result()); + EXPECT_FALSE(mock_postmessage.postmessage_result()); } TEST(ChromeFrame, RequestStart) { @@ -42,6 +42,6 @@ TEST(ChromeFrame, RequestStart) { mock_request_start.NavigateRelative(L"postmessage_basic_frame.html"); loop.Run(NULL); - EXPECT_EQ(true, mock_request_start.request_start_result()); + EXPECT_TRUE(mock_request_start.request_start_result()); } diff --git a/chrome_frame/test/chrome_frame_unittests.cc b/chrome_frame/test/chrome_frame_unittests.cc index 4ba494f..0aab3f2 100644 --- a/chrome_frame/test/chrome_frame_unittests.cc +++ b/chrome_frame/test/chrome_frame_unittests.cc @@ -941,6 +941,8 @@ TEST(CFACWithChrome, NavigateOk) { client.get(), &ChromeFrameAutomationClient::InitiateNavigation, url, std::string(), false)))); + EXPECT_CALL(cfd, GetBounds(testing::_)).Times(testing::AnyNumber()); + // cfd.SetOnNavigationStateChanged(); EXPECT_CALL(cfd, OnNavigationStateChanged(testing::_, testing::_)) @@ -1115,6 +1117,8 @@ TEST_F(CFACMockTest, MockedCreateTabOk) { EXPECT_CALL(cfd_, OnAutomationServerReady()) .WillOnce(QUIT_LOOP(loop_)); + EXPECT_CALL(proxy_, CancelAsync(testing::_)).Times(testing::AnyNumber()); + // Here we go! EXPECT_TRUE(client_->Initialize(&cfd_, timeout, false, profile_, L"", false)); loop_.RunFor(10); @@ -1136,6 +1140,8 @@ TEST_F(CFACMockTest, MockedCreateTabFailed) { EXPECT_CALL(proxy_, CreateTabProxy(testing::_)).Times(0); + EXPECT_CALL(proxy_, CancelAsync(testing::_)).Times(testing::AnyNumber()); + Set_CFD_LaunchFailed(AUTOMATION_CREATE_TAB_FAILED); // Here we go! |