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

Side by Side Diff: chrome/test/unit/chrome_test_suite.h

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 months 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 | « chrome/test/ui/ui_test_suite.h ('k') | chrome/tools/test/image_diff/image_diff.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ 5 #ifndef CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_
6 #define CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ 6 #define CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include "base/stats_table.h" 10 #include "base/stats_table.h"
(...skipping 23 matching lines...) Expand all
34 TestSuite::Initialize(); 34 TestSuite::Initialize();
35 35
36 chrome::RegisterPathProvider(); 36 chrome::RegisterPathProvider();
37 g_browser_process = new TestingBrowserProcess; 37 g_browser_process = new TestingBrowserProcess;
38 38
39 // Notice a user data override, and otherwise default to using a custom 39 // Notice a user data override, and otherwise default to using a custom
40 // user data directory that lives alongside the current app. 40 // user data directory that lives alongside the current app.
41 // NOTE: The user data directory will be erased before each UI test that 41 // NOTE: The user data directory will be erased before each UI test that
42 // uses it, in order to ensure consistency. 42 // uses it, in order to ensure consistency.
43 std::wstring user_data_dir = 43 std::wstring user_data_dir =
44 CommandLine().GetSwitchValue(switches::kUserDataDir); 44 CommandLine::ForCurrentProcess()->GetSwitchValue(
45 switches::kUserDataDir);
45 if (user_data_dir.empty() && 46 if (user_data_dir.empty() &&
46 PathService::Get(base::DIR_EXE, &user_data_dir)) 47 PathService::Get(base::DIR_EXE, &user_data_dir))
47 file_util::AppendToPath(&user_data_dir, L"test_user_data"); 48 file_util::AppendToPath(&user_data_dir, L"test_user_data");
48 if (!user_data_dir.empty()) 49 if (!user_data_dir.empty())
49 PathService::Override(chrome::DIR_USER_DATA, user_data_dir); 50 PathService::Override(chrome::DIR_USER_DATA, user_data_dir);
50 51
51 #if defined(OS_WIN) 52 #if defined(OS_WIN)
52 // TODO(port): Remove the #ifdef when ResourceBundle is ported. 53 // TODO(port): Remove the #ifdef when ResourceBundle is ported.
53 // 54 //
54 // Force unittests to run using en-us so if we test against string 55 // Force unittests to run using en-us so if we test against string
(...skipping 20 matching lines...) Expand all
75 StatsTable::set_current(NULL); 76 StatsTable::set_current(NULL);
76 delete stats_table_; 77 delete stats_table_;
77 78
78 TestSuite::Shutdown(); 79 TestSuite::Shutdown();
79 } 80 }
80 81
81 StatsTable* stats_table_; 82 StatsTable* stats_table_;
82 }; 83 };
83 84
84 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_ 85 #endif // CHROME_TEST_UNIT_CHROME_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « chrome/test/ui/ui_test_suite.h ('k') | chrome/tools/test/image_diff/image_diff.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698