diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 23:33:34 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 23:33:34 +0000 |
commit | 115d4ca4a7732b1aac2a8ab92e3ae827d106b7dd (patch) | |
tree | be94c5e3dd8d3827c9778b672526eb07368c8444 /chrome_frame/external_tab_test.cc | |
parent | 2094643ad5ab929efa56477fd95587ac4a8cecfe (diff) | |
download | chromium_src-115d4ca4a7732b1aac2a8ab92e3ae827d106b7dd.zip chromium_src-115d4ca4a7732b1aac2a8ab92e3ae827d106b7dd.tar.gz chromium_src-115d4ca4a7732b1aac2a8ab92e3ae827d106b7dd.tar.bz2 |
Fix ExternalTabProxy.CancelledCreateTab test.
TEST=ExternalTabProxy.CancelledCreateTab
Review URL: http://codereview.chromium.org/4022001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/external_tab_test.cc')
-rw-r--r-- | chrome_frame/external_tab_test.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome_frame/external_tab_test.cc b/chrome_frame/external_tab_test.cc index 8f9b918..0e49f95 100644 --- a/chrome_frame/external_tab_test.cc +++ b/chrome_frame/external_tab_test.cc @@ -157,6 +157,7 @@ TEST(ExternalTabProxy, CancelledCreateTab) { scoped_ptr<ExternalTabProxy> tab(new ExternalTabProxy()); AsyncEventCreator async_events(tab.get()); StrictMock<MockProxy>* proxy = new StrictMock<MockProxy>(); + TimedMsgLoop loop; tab->set_proxy_factory(&factory); EXPECT_CALL(factory, CreateProxy()).WillOnce(Return(proxy)); @@ -166,6 +167,9 @@ TEST(ExternalTabProxy, CancelledCreateTab) { proxy, base::TimeDelta::FromMilliseconds(30))), Return(1))); + EXPECT_CALL(*proxy, CreateTab(tab.get(), _)) + .WillOnce(QUIT_LOOP(loop)); + EXPECT_CALL(*proxy, RemoveDelegate(_)).WillOnce(DoAll( InvokeWithoutArgs(CreateFunctor(&async_events, &AsyncEventCreator::Fire_CompletedCreateTab, false, HWND(0), HWND(0), @@ -181,6 +185,8 @@ TEST(ExternalTabProxy, CancelledCreateTab) { tab_params.url = GURL("http://Xanadu.org"); tab->CreateTab(tab_params, &ui_delegate); + loop.RunFor(5); + EXPECT_FALSE(loop.WasTimedOut()); tab.reset(); } |