Chromium Code Reviews| Index: chrome/test/base/in_process_browser_test.cc |
| diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc |
| index d48f2b6b5ddf3514990b704fd00a11c80cc1ffd5..0ad920202dbe03aeaea69818889de72ff58402d5 100644 |
| --- a/chrome/test/base/in_process_browser_test.cc |
| +++ b/chrome/test/base/in_process_browser_test.cc |
| @@ -54,6 +54,13 @@ |
| #include "base/mac/scoped_nsautorelease_pool.h" |
| #endif |
| +#if defined(OS_WIN) && defined(USE_AURA) |
| +#include "base/win/scoped_com_initializer.h" |
| +#include "base/win/windows_version.h" |
| +#include "ui/base/win/atl_module.h" |
| +#include "win8/test/metro_registration_helper.h" |
| +#endif |
| + |
| #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| #include "chrome/browser/captive_portal/captive_portal_service.h" |
| #endif |
| @@ -116,6 +123,15 @@ void InProcessBrowserTest::SetUp() { |
| ASSERT_TRUE(SetUpUserDataDirectory()) |
| << "Could not set up user data directory."; |
| +#if defined(OS_WIN) && defined(USE_AURA) |
| + if (base::win::GetVersion() >= base::win::VERSION_WIN8 && |
|
grt (UTC plus 2)
2013/05/29 02:22:51
this only needs to happen once per process rather
gab
2013/05/29 14:52:20
Right, these are static methods though so they can
grt (UTC plus 2)
2013/05/29 15:51:03
This is their raison d'être; see https://code.goog
gab
2013/05/29 23:09:42
I see.
|
| + command_line->HasSwitch(switches::kAshBrowserTests)) { |
| + com_initializer_.reset(new base::win::ScopedCOMInitializer()); |
| + ui::win::CreateATLModuleIfNeeded(); |
| + ASSERT_TRUE(win8::MakeTestDefaultBrowserSynchronously()); |
| + } |
| +#endif |
| + |
| // Single-process mode is not set in BrowserMain, so process it explicitly, |
| // and set up renderer. |
| if (command_line->HasSwitch(switches::kSingleProcess)) { |
| @@ -212,6 +228,9 @@ bool InProcessBrowserTest::CreateUserDataDirectory() { |
| void InProcessBrowserTest::TearDown() { |
| DCHECK(!g_browser_process); |
| +#if defined(OS_WIN) && defined(USE_AURA) |
|
grt (UTC plus 2)
2013/05/29 02:22:51
likewise, TearDownTestCase
gab
2013/05/29 14:52:20
Done.
|
| + com_initializer_.reset(); |
| +#endif |
| BrowserTestBase::TearDown(); |
| } |