diff options
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_frame.gyp | 9 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 11 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_automation.h | 1 | ||||
-rw-r--r-- | chrome_frame/test/automation_client_mock.cc | 4 | ||||
-rw-r--r-- | chrome_frame/test/net/test_automation_provider.cc | 2 |
5 files changed, 18 insertions, 9 deletions
diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp index 0cfe895..8db3abd 100644 --- a/chrome_frame/chrome_frame.gyp +++ b/chrome_frame/chrome_frame.gyp @@ -335,7 +335,7 @@ }, }, 'dependencies': [ - '../chrome/chrome.gyp:crash_service', + '../chrome/chrome.gyp:crash_service', '../chrome/chrome.gyp:automation', '../chrome/chrome.gyp:installer_util', '../google_update/google_update.gyp:google_update', @@ -429,7 +429,7 @@ 'dependencies': [ '../breakpad/breakpad.gyp:breakpad_handler', '../chrome/chrome.gyp:automation', - '../chrome/chrome.gyp:crash_service', + '../chrome/chrome.gyp:crash_service', '../chrome/chrome.gyp:installer_util', '../google_update/google_update.gyp:google_update', ], @@ -497,7 +497,7 @@ 'dependencies': [ '../breakpad/breakpad.gyp:breakpad_handler', '../chrome/chrome.gyp:automation', - '../chrome/chrome.gyp:crash_service', + '../chrome/chrome.gyp:crash_service', '../chrome/chrome.gyp:chrome_dll_version', '../chrome/chrome.gyp:installer_util', '../google_update/google_update.gyp:google_update', @@ -550,7 +550,10 @@ 'test/win_event_receiver.h', 'chrome_tab.h', '../base/test/test_file_util_win.cc', + '../chrome/test/automation/proxy_launcher.cc', + '../chrome/test/automation/proxy_launcher.h', '../chrome/test/ui/ui_test.cc', + '../chrome/test/ui/ui_test.h', '../chrome/test/ui/ui_test_suite.cc', '../chrome/test/ui/ui_test_suite.h', '../chrome/test/chrome_process_util.cc', diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 7a49f18..94d30b8 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -144,10 +144,13 @@ class ChromeFrameAutomationProxyImpl::CFMsgDispatcher }; ChromeFrameAutomationProxyImpl::ChromeFrameAutomationProxyImpl( - AutomationProxyCacheEntry* entry, int launch_timeout) + AutomationProxyCacheEntry* entry, + std::string channel_id, int launch_timeout) : AutomationProxy(launch_timeout, false), proxy_entry_(entry) { TRACE_EVENT_BEGIN("chromeframe.automationproxy", this, ""); + InitializeChannel(channel_id, false); + sync_ = new CFMsgDispatcher(); message_filter_ = new TabProxyNotificationMessageFilter(tracker_.get()); @@ -271,8 +274,10 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params, // destruction notification. // At same time we must destroy/stop the thread from another thread. + std::string channel_id = AutomationProxy::GenerateChannelID(); ChromeFrameAutomationProxyImpl* proxy = - new ChromeFrameAutomationProxyImpl(this, params->launch_timeout()); + new ChromeFrameAutomationProxyImpl(this, channel_id, + params->launch_timeout()); // Ensure that the automation proxy actually respects our choice on whether // or not to check the version. @@ -282,7 +287,7 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params, scoped_ptr<CommandLine> command_line( chrome_launcher::CreateLaunchCommandLine()); command_line->AppendSwitchASCII(switches::kAutomationClientChannelID, - proxy->channel_id()); + channel_id); // Run Chrome in Chrome Frame mode. In practice, this modifies the paths // and registry keys that Chrome looks in via the BrowserDistribution diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h index cb1b282..5cf1304 100644 --- a/chrome_frame/chrome_frame_automation.h +++ b/chrome_frame/chrome_frame_automation.h @@ -92,6 +92,7 @@ class ChromeFrameAutomationProxyImpl protected: friend class AutomationProxyCacheEntry; ChromeFrameAutomationProxyImpl(AutomationProxyCacheEntry* entry, + std::string channel_id, int launch_timeout); class CFMsgDispatcher; diff --git a/chrome_frame/test/automation_client_mock.cc b/chrome_frame/test/automation_client_mock.cc index 7e8f317..2cf981b 100644 --- a/chrome_frame/test/automation_client_mock.cc +++ b/chrome_frame/test/automation_client_mock.cc @@ -315,7 +315,8 @@ class TestChromeFrameAutomationProxyImpl public: TestChromeFrameAutomationProxyImpl() // 1 is an unneeded timeout. - : ChromeFrameAutomationProxyImpl(NULL, 1) { + : ChromeFrameAutomationProxyImpl( + NULL, AutomationProxy::GenerateChannelID(), 1) { } MOCK_METHOD3( SendAsAsync, @@ -469,4 +470,3 @@ TEST_F(CFACMockTest, NavigateTwiceAfterInitToSameUrl) { EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); client_->Uninitialize(); } - diff --git a/chrome_frame/test/net/test_automation_provider.cc b/chrome_frame/test/net/test_automation_provider.cc index 5b8a9a6..d6a0676 100644 --- a/chrome_frame/test/net/test_automation_provider.cc +++ b/chrome_frame/test/net/test_automation_provider.cc @@ -119,7 +119,7 @@ TestAutomationProvider* TestAutomationProvider::NewAutomationProvider( Profile* p, const std::string& channel, TestAutomationProviderDelegate* delegate) { TestAutomationProvider* automation = new TestAutomationProvider(p, delegate); - automation->ConnectToChannel(channel); + automation->InitializeChannel(channel); automation->SetExpectedTabCount(1); return automation; } |