diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-13 19:35:44 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-13 19:35:44 +0000 |
commit | 5c8eda5e1a9d15c76cbce2d2e9ddacd9f3a6d282 (patch) | |
tree | 8c4ce384ee1d4993db65a8a8ffc1c642a3aa225b /chrome_frame | |
parent | f9dfd091405e6e43c0484dd6e5e92d4abeea3cd9 (diff) | |
download | chromium_src-5c8eda5e1a9d15c76cbce2d2e9ddacd9f3a6d282.zip chromium_src-5c8eda5e1a9d15c76cbce2d2e9ddacd9f3a6d282.tar.gz chromium_src-5c8eda5e1a9d15c76cbce2d2e9ddacd9f3a6d282.tar.bz2 |
Enable the test log collector for Chrome Frame integration tests.
BUG=none
TEST=none
R=erikwright@chromium.org
Review URL: http://codereview.chromium.org/9695041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_frame.gyp | 2 | ||||
-rw-r--r-- | chrome_frame/test/run_all_unittests.cc | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp index 108db7d..c45eb9f 100644 --- a/chrome_frame/chrome_frame.gyp +++ b/chrome_frame/chrome_frame.gyp @@ -193,6 +193,7 @@ '../chrome/chrome.gyp:browser', '../chrome/chrome.gyp:debugger', '../chrome/chrome.gyp:renderer', + '../chrome/chrome.gyp:test_support_common', '../chrome/installer/upgrade_test.gyp:alternate_version_generator_lib', '../content/content.gyp:content_gpu', '../net/net.gyp:net', @@ -534,6 +535,7 @@ 'dependencies': [ '../base/base.gyp:test_support_base', '../build/temp_gyp/googleurl.gyp:googleurl', + '../chrome/chrome.gyp:test_support_common', '../net/net.gyp:net', '../net/net.gyp:net_test_support', '../testing/gmock.gyp:gmock', diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc index 7e23640..b5727e5 100644 --- a/chrome_frame/test/run_all_unittests.cc +++ b/chrome_frame/test/run_all_unittests.cc @@ -11,6 +11,7 @@ #include "base/threading/platform_thread.h" #include "base/win/scoped_com_initializer.h" #include "chrome/common/chrome_paths.h" +#include "chrome/test/logging/win/test_log_collector.h" #include "chrome_frame/crash_server_init.h" #include "chrome_frame/test/chrome_frame_test_utils.h" #include "chrome_frame/test/chrome_frame_ui_test_utils.h" @@ -35,6 +36,7 @@ class ChromeFrameUnittestsModule ChromeFrameUnittestsModule _AtlModule; const char kNoCrashService[] = "no-crash-service"; +const char kNoLogCollector[] = "no-log-collector"; const char kNoRegistrationSwitch[] = "no-registration"; void PureCall() { @@ -67,6 +69,13 @@ int main(int argc, char **argv) { breakpad.reset(InitializeCrashReporting(HEADLESS)); } + // Install the log collector before anything else that adds a Google Test + // event listener so that it's the last one to run after each test (the + // listeners are invoked in reverse order at the end of a test). This allows + // the collector to emit logs if other listeners ADD_FAILURE or EXPECT_*. + if (!CommandLine::ForCurrentProcess()->HasSwitch(kNoLogCollector)) + logging_win::InstallTestLogCollector(testing::UnitTest::GetInstance()); + chrome_frame_test::InstallTestScrubber(testing::UnitTest::GetInstance()); int ret = -1; |