summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test_utils.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 23:07:08 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 23:07:08 +0000
commit0ba6f54e6f4cacbf58cf21444457130fbc5556fb (patch)
treec58dc8fcdeae96121fc4b21bfb0cd4b01344d537 /chrome_frame/test_utils.cc
parent3c8466f5a1bed3699980684243c43ff03c2130ee (diff)
downloadchromium_src-0ba6f54e6f4cacbf58cf21444457130fbc5556fb.zip
chromium_src-0ba6f54e6f4cacbf58cf21444457130fbc5556fb.tar.gz
chromium_src-0ba6f54e6f4cacbf58cf21444457130fbc5556fb.tar.bz2
Fixes for the flakiness in the chrome frame net tests run seen on the per user IE8 builder.
The flakiness occurs because IE starts up before chrome_frame_helper which results in a failure to register a BHO for the IE window. Fix is to make the ChromeFrame registrar object a member of the chrome frame net test suite. Rearranged some code which ensures that we can now run chrome_frame_net_tests in debug builds without annoying DCHECKs BUG=none TEST=chrome frame net tests. Review URL: http://codereview.chromium.org/6650003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test_utils.cc')
-rw-r--r--chrome_frame/test_utils.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome_frame/test_utils.cc b/chrome_frame/test_utils.cc
index 258b0fa..14149ab 100644
--- a/chrome_frame/test_utils.cc
+++ b/chrome_frame/test_utils.cc
@@ -45,8 +45,14 @@ FilePath GetChromeFrameBuildPath() {
return dll_path;
}
+bool ScopedChromeFrameRegistrar::register_chrome_path_provider_ = false;;
+
// static
void ScopedChromeFrameRegistrar::RegisterDefaults() {
+ if (!register_chrome_path_provider_) {
+ chrome::RegisterPathProvider();
+ register_chrome_path_provider_ = true;
+ }
FilePath dll_path = GetChromeFrameBuildPath();
RegisterAtPath(dll_path.value(), chrome_frame_test::GetTestBedType());
}
@@ -148,6 +154,11 @@ FilePath ScopedChromeFrameRegistrar::GetReferenceChromeFrameDllPath() {
ScopedChromeFrameRegistrar::ScopedChromeFrameRegistrar(
const std::wstring& path, RegistrationType registration_type)
: registration_type_(registration_type) {
+ if (!register_chrome_path_provider_) {
+ // Register paths needed by the ScopedChromeFrameRegistrar.
+ chrome::RegisterPathProvider();
+ register_chrome_path_provider_ = true;
+ }
original_dll_path_ = path;
RegisterChromeFrameAtPath(original_dll_path_);
}
@@ -155,6 +166,11 @@ ScopedChromeFrameRegistrar::ScopedChromeFrameRegistrar(
ScopedChromeFrameRegistrar::ScopedChromeFrameRegistrar(
RegistrationType registration_type)
: registration_type_(registration_type) {
+ if (!register_chrome_path_provider_) {
+ // Register paths needed by the ScopedChromeFrameRegistrar.
+ chrome::RegisterPathProvider();
+ register_chrome_path_provider_ = true;
+ }
original_dll_path_ = GetChromeFrameBuildPath().value();
RegisterChromeFrameAtPath(original_dll_path_);
}