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

Side by Side Diff: chrome/install_static/install_util_unittest.cc

Issue 2884333004: Relocate Windows ProcessNeedsProfileDir to install_static (Closed)
Patch Set: typo Created 3 years, 7 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/install_static/install_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/install_static/install_util.h" 5 #include "chrome/install_static/install_util.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 EXPECT_EQ(L"123 456\tabc\\def", tokenized[0]); 254 EXPECT_EQ(L"123 456\tabc\\def", tokenized[0]);
255 EXPECT_EQ(L"ghi", tokenized[1]); 255 EXPECT_EQ(L"ghi", tokenized[1]);
256 256
257 tokenized = TokenizeCommandLineToArray(L"123\"456\"\tabc"); 257 tokenized = TokenizeCommandLineToArray(L"123\"456\"\tabc");
258 ASSERT_EQ(2u, tokenized.size()); 258 ASSERT_EQ(2u, tokenized.size());
259 EXPECT_EQ(L"123\"456\"", tokenized[0]); 259 EXPECT_EQ(L"123\"456\"", tokenized[0]);
260 EXPECT_EQ(L"abc", tokenized[1]); 260 EXPECT_EQ(L"abc", tokenized[1]);
261 } 261 }
262 262
263 TEST(InstallStaticTest, BrowserProcessTest) { 263 TEST(InstallStaticTest, BrowserProcessTest) {
264 EXPECT_EQ(ProcessType::UNINITIALIZED, g_process_type); 264 EXPECT_FALSE(IsProcessTypeInitialized());
265 InitializeProcessType(); 265 InitializeProcessType();
266 EXPECT_FALSE(IsNonBrowserProcess()); 266 EXPECT_FALSE(IsNonBrowserProcess());
267 } 267 }
268 268
269 class InstallStaticUtilTest 269 class InstallStaticUtilTest
270 : public ::testing::TestWithParam< 270 : public ::testing::TestWithParam<
271 std::tuple<InstallConstantIndex, const char*>> { 271 std::tuple<InstallConstantIndex, const char*>> {
272 protected: 272 protected:
273 InstallStaticUtilTest() 273 InstallStaticUtilTest()
274 : system_level_(std::string(std::get<1>(GetParam())) != "user"), 274 : system_level_(std::string(std::get<1>(GetParam())) != "user"),
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 testing::Values("user"))); 538 testing::Values("user")));
539 #else // GOOGLE_CHROME_BUILD 539 #else // GOOGLE_CHROME_BUILD
540 // Chromium supports user and system levels. 540 // Chromium supports user and system levels.
541 INSTANTIATE_TEST_CASE_P(Chromium, 541 INSTANTIATE_TEST_CASE_P(Chromium,
542 InstallStaticUtilTest, 542 InstallStaticUtilTest,
543 testing::Combine(testing::Values(CHROMIUM_INDEX), 543 testing::Combine(testing::Values(CHROMIUM_INDEX),
544 testing::Values("user", "system"))); 544 testing::Values("user", "system")));
545 #endif // !GOOGLE_CHROME_BUILD 545 #endif // !GOOGLE_CHROME_BUILD
546 546
547 } // namespace install_static 547 } // namespace install_static
OLDNEW
« no previous file with comments | « chrome/install_static/install_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698