diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 18:57:48 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 18:57:48 +0000 |
commit | f56e69453eced97f31dc23bc72ae883f9e260eee (patch) | |
tree | c17552ac780d04082e530551658c1e463256ce7a | |
parent | 74f2958aec0f8d1da9df8e2e6ff0b0da846c7e01 (diff) | |
download | chromium_src-f56e69453eced97f31dc23bc72ae883f9e260eee.zip chromium_src-f56e69453eced97f31dc23bc72ae883f9e260eee.tar.gz chromium_src-f56e69453eced97f31dc23bc72ae883f9e260eee.tar.bz2 |
Attempt 2 at fixing the chrome frame net tests hang on the builders. This hang occurs because of a race condition
in registering the http/https protocol factories. The net tests registers a protocol factory and the Chrome
AutomationResourceMessageFilter also registers factories. If the net tests ends up being first in the chain then
the requests are incorrectly dropped.
Fix is to register the net tests protocol factory before instantiating the AutomationResourceMessageFilter.
TBR=stoyan
Review URL: http://codereview.chromium.org/2959013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52366 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome_frame/test/net/test_automation_provider.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome_frame/test/net/test_automation_provider.cc b/chrome_frame/test/net/test_automation_provider.cc index 563a8c1..ef5528a 100644 --- a/chrome_frame/test/net/test_automation_provider.cc +++ b/chrome_frame/test/net/test_automation_provider.cc @@ -29,11 +29,16 @@ TestAutomationProvider::TestAutomationProvider( Profile* profile, TestAutomationProviderDelegate* delegate) : AutomationProvider(profile), tab_handle_(-1), delegate_(delegate) { - filter_ = new TestAutomationResourceMessageFilter(this); + // We need to register the protocol factory before the + // AutomationResourceMessageFilter registers the automation job factory to + // ensure that we don't inadvarently end up handling http requests which + // we don't expect. The initial chrome frame page for the network tests + // issues http requests which our test factory should not handle. URLRequest::RegisterProtocolFactory("http", TestAutomationProvider::Factory); URLRequest::RegisterProtocolFactory("https", TestAutomationProvider::Factory); + filter_ = new TestAutomationResourceMessageFilter(this); g_provider_instance_ = this; } |