diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 15:07:56 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 15:07:56 +0000 |
commit | 51808a91fef99c0d0849f143f772cb1bbc11f2e4 (patch) | |
tree | 4a638c7d0f3edaa899b2c93af667c79f66093239 /chrome_frame | |
parent | 8eb3ec7a02c8b90545a70cb28df263780ad9bcd3 (diff) | |
download | chromium_src-51808a91fef99c0d0849f143f772cb1bbc11f2e4.zip chromium_src-51808a91fef99c0d0849f143f772cb1bbc11f2e4.tar.gz chromium_src-51808a91fef99c0d0849f143f772cb1bbc11f2e4.tar.bz2 |
Fix flake in ProxyFactoryTest.CreateDifferentProfiles due to data race.
Google Mock isn't threadsafe on Windows!
BUG=122929
TEST=chrome_frame_tests.exe --gtest_filter=ProxyFactoryTest.CreateDifferentProfiles won't flake
Review URL: https://chromiumcodereview.appspot.com/10050014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/proxy_factory_mock.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome_frame/test/proxy_factory_mock.cc b/chrome_frame/test/proxy_factory_mock.cc index 4932b01..dc7e33f 100644 --- a/chrome_frame/test/proxy_factory_mock.cc +++ b/chrome_frame/test/proxy_factory_mock.cc @@ -77,8 +77,11 @@ TEST_F(ProxyFactoryTest, CreateSameProfile) { } TEST_F(ProxyFactoryTest, CreateDifferentProfiles) { + LaunchDelegateMock d2; + EXPECT_CALL(launch_delegate_mock_, - LaunchComplete(testing::NotNull(), testing::_)).Times(2); + LaunchComplete(testing::NotNull(), testing::_)); + EXPECT_CALL(d2, LaunchComplete(testing::NotNull(), testing::_)); scoped_refptr<ChromeFrameLaunchParams> params1( MakeLaunchParams(L"Adam.N.Epilinter")); @@ -89,10 +92,10 @@ TEST_F(ProxyFactoryTest, CreateDifferentProfiles) { void* i2 = NULL; proxy_factory_.GetAutomationServer(&launch_delegate_mock_, params1, &i1); - proxy_factory_.GetAutomationServer(&launch_delegate_mock_, params2, &i2); + proxy_factory_.GetAutomationServer(&d2, params2, &i2); EXPECT_NE(i1, i2); - proxy_factory_.ReleaseAutomationServer(i2, &launch_delegate_mock_); + proxy_factory_.ReleaseAutomationServer(i2, &d2); proxy_factory_.ReleaseAutomationServer(i1, &launch_delegate_mock_); } |