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

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

Issue 2867063002: Stability instrumentation Crashpad integration (Closed)
Patch Set: merge Created 3 years, 6 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') | chrome/install_static/product_install_details.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 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_FALSE(IsProcessTypeInitialized());
265 InitializeProcessType(); 264 InitializeProcessType();
266 EXPECT_FALSE(IsNonBrowserProcess()); 265 EXPECT_FALSE(IsNonBrowserProcess());
267 } 266 }
268 267
269 class InstallStaticUtilTest 268 class InstallStaticUtilTest
270 : public ::testing::TestWithParam< 269 : public ::testing::TestWithParam<
271 std::tuple<InstallConstantIndex, const char*>> { 270 std::tuple<InstallConstantIndex, const char*>> {
272 protected: 271 protected:
273 InstallStaticUtilTest() 272 InstallStaticUtilTest()
274 : system_level_(std::string(std::get<1>(GetParam())) != "user"), 273 : 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"))); 537 testing::Values("user")));
539 #else // GOOGLE_CHROME_BUILD 538 #else // GOOGLE_CHROME_BUILD
540 // Chromium supports user and system levels. 539 // Chromium supports user and system levels.
541 INSTANTIATE_TEST_CASE_P(Chromium, 540 INSTANTIATE_TEST_CASE_P(Chromium,
542 InstallStaticUtilTest, 541 InstallStaticUtilTest,
543 testing::Combine(testing::Values(CHROMIUM_INDEX), 542 testing::Combine(testing::Values(CHROMIUM_INDEX),
544 testing::Values("user", "system"))); 543 testing::Values("user", "system")));
545 #endif // !GOOGLE_CHROME_BUILD 544 #endif // !GOOGLE_CHROME_BUILD
546 545
547 } // namespace install_static 546 } // namespace install_static
OLDNEW
« no previous file with comments | « chrome/install_static/install_util.cc ('k') | chrome/install_static/product_install_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698