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

Side by Side Diff: chrome/browser/component_updater/cld_component_installer_unittest.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 TEST_F(CldComponentInstallerTest, GetName) { 119 TEST_F(CldComponentInstallerTest, GetName) {
120 ASSERT_FALSE(traits_.GetName().empty()); 120 ASSERT_FALSE(traits_.GetName().empty());
121 } 121 }
122 122
123 TEST_F(CldComponentInstallerTest, ComponentReady) { 123 TEST_F(CldComponentInstallerTest, ComponentReady) {
124 scoped_ptr<base::DictionaryValue> manifest; 124 scoped_ptr<base::DictionaryValue> manifest;
125 const base::FilePath install_dir(FILE_PATH_LITERAL("/foo")); 125 const base::FilePath install_dir(FILE_PATH_LITERAL("/foo"));
126 const base::Version version("1.2.3.4"); 126 const base::Version version("1.2.3.4");
127 traits_.ComponentReady(version, install_dir, manifest.Pass()); 127 traits_.ComponentReady(version, install_dir, manifest.Pass());
128 base::FilePath result = CldComponentInstallerTraits::GetLatestCldDataFile(); 128 base::FilePath result = CldComponentInstallerTraits::GetLatestCldDataFile();
129 ASSERT_TRUE( 129 ASSERT_TRUE(base::StartsWith(result.AsUTF16Unsafe(),
130 StartsWith(result.AsUTF16Unsafe(), install_dir.AsUTF16Unsafe(), true)); 130 install_dir.AsUTF16Unsafe(), true));
131 ASSERT_TRUE(EndsWith(result.value(), kTestCldDataFileName, true)); 131 ASSERT_TRUE(EndsWith(result.value(), kTestCldDataFileName, true));
132 } 132 }
133 133
134 } // namespace component_updater 134 } // namespace component_updater
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system_logs/touch_log_source_ozone.cc ('k') | chrome/browser/enumerate_modules_model_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698