OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/test/test_suite.h" | 5 #include "ash/test/test_suite.h" |
6 | 6 |
| 7 #include "ash/ash_switches.h" |
| 8 #include "base/command_line.h" |
7 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
8 #include "base/path_service.h" | 10 #include "base/path_service.h" |
9 #include "build/build_config.h" | 11 #include "build/build_config.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
12 #include "ui/base/ui_base_paths.h" | 14 #include "ui/base/ui_base_paths.h" |
13 #include "ui/compositor/compositor_setup.h" | 15 #include "ui/compositor/compositor_setup.h" |
14 #include "ui/compositor/test/compositor_test_support.h" | 16 #include "ui/compositor/test/compositor_test_support.h" |
15 #include "ui/gfx/gfx_paths.h" | 17 #include "ui/gfx/gfx_paths.h" |
16 | 18 |
(...skipping 12 matching lines...) Expand all Loading... |
29 namespace ash { | 31 namespace ash { |
30 namespace test { | 32 namespace test { |
31 | 33 |
32 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) | 34 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) |
33 : TestSuite(argc, argv) {} | 35 : TestSuite(argc, argv) {} |
34 | 36 |
35 void AuraShellTestSuite::Initialize() { | 37 void AuraShellTestSuite::Initialize() { |
36 base::TestSuite::Initialize(); | 38 base::TestSuite::Initialize(); |
37 | 39 |
38 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
39 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | 41 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && |
| 42 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 43 ash::switches::kForceAshToDesktop)) { |
40 ASSERT_TRUE(win8::RegisterTestDefaultBrowser( | 44 ASSERT_TRUE(win8::RegisterTestDefaultBrowser( |
41 win8::test::kDefaultTestAppUserModelId, | 45 win8::test::kDefaultTestAppUserModelId, |
42 win8::test::kDefaultTestExeName)); | 46 win8::test::kDefaultTestExeName)); |
43 | 47 |
44 ui::win::CreateATLModuleIfNeeded(); | 48 ui::win::CreateATLModuleIfNeeded(); |
45 | 49 |
46 std::vector<string16> choices; | 50 std::vector<string16> choices; |
47 win8::OpenWithDialogController controller; | 51 win8::OpenWithDialogController controller; |
48 controller.RunSynchronously(NULL, L"http", win8::test::kDefaultTestExeName, | 52 controller.RunSynchronously(NULL, L"http", win8::test::kDefaultTestExeName, |
49 &choices); | 53 &choices); |
(...skipping 15 matching lines...) Expand all Loading... |
65 } | 69 } |
66 | 70 |
67 void AuraShellTestSuite::Shutdown() { | 71 void AuraShellTestSuite::Shutdown() { |
68 ui::CompositorTestSupport::Terminate(); | 72 ui::CompositorTestSupport::Terminate(); |
69 ui::ResourceBundle::CleanupSharedInstance(); | 73 ui::ResourceBundle::CleanupSharedInstance(); |
70 base::TestSuite::Shutdown(); | 74 base::TestSuite::Shutdown(); |
71 } | 75 } |
72 | 76 |
73 } // namespace test | 77 } // namespace test |
74 } // namespace ash | 78 } // namespace ash |
OLD | NEW |