Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: ash/test/test_suite.cc

Issue 684783004: Prefix CommandLine usage with base namespace (Part 4: ash/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/touch/touch_observer_hud_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 7 #include "ash/ash_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 19 matching lines...) Expand all
30 30
31 void AuraShellTestSuite::Initialize() { 31 void AuraShellTestSuite::Initialize() {
32 base::TestSuite::Initialize(); 32 base::TestSuite::Initialize();
33 gfx::GLSurface::InitializeOneOffForTests(); 33 gfx::GLSurface::InitializeOneOffForTests();
34 34
35 #if defined(OS_WIN) 35 #if defined(OS_WIN)
36 base::win::Version version = base::win::GetVersion(); 36 base::win::Version version = base::win::GetVersion();
37 // Although Ash officially is only supported for users on Win7+, we still run 37 // Although Ash officially is only supported for users on Win7+, we still run
38 // ash_unittests on Vista builders, so we still need to initialize COM. 38 // ash_unittests on Vista builders, so we still need to initialize COM.
39 if (version >= base::win::VERSION_VISTA && 39 if (version >= base::win::VERSION_VISTA &&
40 !CommandLine::ForCurrentProcess()->HasSwitch( 40 !base::CommandLine::ForCurrentProcess()->HasSwitch(
41 ash::switches::kForceAshToDesktop)) { 41 ash::switches::kForceAshToDesktop)) {
42 com_initializer_.reset(new base::win::ScopedCOMInitializer()); 42 com_initializer_.reset(new base::win::ScopedCOMInitializer());
43 ui::win::CreateATLModuleIfNeeded(); 43 ui::win::CreateATLModuleIfNeeded();
44 if (version >= base::win::VERSION_WIN8) 44 if (version >= base::win::VERSION_WIN8)
45 ASSERT_TRUE(win8::MakeTestDefaultBrowserSynchronously()); 45 ASSERT_TRUE(win8::MakeTestDefaultBrowserSynchronously());
46 } 46 }
47 #endif 47 #endif
48 48
49 gfx::RegisterPathProvider(); 49 gfx::RegisterPathProvider();
50 ui::RegisterPathProvider(); 50 ui::RegisterPathProvider();
51 51
52 // Force unittests to run using en-US so if we test against string 52 // Force unittests to run using en-US so if we test against string
53 // output, it'll pass regardless of the system language. 53 // output, it'll pass regardless of the system language.
54 ui::ResourceBundle::InitSharedInstanceWithLocale( 54 ui::ResourceBundle::InitSharedInstanceWithLocale(
55 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); 55 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
56 } 56 }
57 57
58 void AuraShellTestSuite::Shutdown() { 58 void AuraShellTestSuite::Shutdown() {
59 ui::ResourceBundle::CleanupSharedInstance(); 59 ui::ResourceBundle::CleanupSharedInstance();
60 #if defined(OS_WIN) 60 #if defined(OS_WIN)
61 com_initializer_.reset(); 61 com_initializer_.reset();
62 #endif 62 #endif
63 base::TestSuite::Shutdown(); 63 base::TestSuite::Shutdown();
64 } 64 }
65 65
66 } // namespace test 66 } // namespace test
67 } // namespace ash 67 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/touch/touch_observer_hud_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698