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

Side by Side Diff: chrome/common/service_process_util_unittest.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 "chrome/common/service_process_util.h" 5 #include "chrome/common/service_process_util.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 g_good_shutdown = true; 56 g_good_shutdown = true;
57 loop->task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); 57 loop->task_runner()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 TEST(ServiceProcessUtilTest, ScopedVersionedName) { 62 TEST(ServiceProcessUtilTest, ScopedVersionedName) {
63 std::string test_str = "test"; 63 std::string test_str = "test";
64 std::string scoped_name = GetServiceProcessScopedVersionedName(test_str); 64 std::string scoped_name = GetServiceProcessScopedVersionedName(test_str);
65 chrome::VersionInfo version_info; 65 chrome::VersionInfo version_info;
66 EXPECT_TRUE(EndsWith(scoped_name, test_str, true)); 66 EXPECT_TRUE(base::EndsWith(scoped_name, test_str, true));
67 EXPECT_NE(std::string::npos, scoped_name.find(version_info.Version())); 67 EXPECT_NE(std::string::npos, scoped_name.find(version_info.Version()));
68 } 68 }
69 69
70 class ServiceProcessStateTest : public base::MultiProcessTest { 70 class ServiceProcessStateTest : public base::MultiProcessTest {
71 public: 71 public:
72 ServiceProcessStateTest(); 72 ServiceProcessStateTest();
73 ~ServiceProcessStateTest() override; 73 ~ServiceProcessStateTest() override;
74 void SetUp() override; 74 void SetUp() override;
75 base::SingleThreadTaskRunner* IOMessageLoopProxy() { 75 base::SingleThreadTaskRunner* IOMessageLoopProxy() {
76 return io_thread_.task_runner().get(); 76 return io_thread_.task_runner().get();
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 ScopedAttributesRestorer restorer(bundle_path(), 0777); 416 ScopedAttributesRestorer restorer(bundle_path(), 0777);
417 GetIOMessageLoopProxy()->PostTask( 417 GetIOMessageLoopProxy()->PostTask(
418 FROM_HERE, 418 FROM_HERE,
419 base::Bind(&ChangeAttr, bundle_path(), 0222)); 419 base::Bind(&ChangeAttr, bundle_path(), 0222));
420 Run(); 420 Run();
421 ASSERT_TRUE(mock_launchd()->remove_called()); 421 ASSERT_TRUE(mock_launchd()->remove_called());
422 ASSERT_TRUE(mock_launchd()->delete_called()); 422 ASSERT_TRUE(mock_launchd()->delete_called());
423 } 423 }
424 424
425 #endif // !OS_MACOSX 425 #endif // !OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/common/importer/firefox_importer_utils.cc ('k') | chrome/common/variations/experiment_labels.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698