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

Side by Side Diff: mojo/runner/shell_apptest.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
« no previous file with comments | « media/video/capture/video_capture_device.cc ('k') | net/base/mime_util.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 pingable2->Ping("hello", callback); 177 pingable2->Ping("hello", callback);
178 base::RunLoop().Run(); 178 base::RunLoop().Run();
179 } 179 }
180 180
181 // mojo: URLs can have querystrings too 181 // mojo: URLs can have querystrings too
182 TEST_F(ShellAppTest, MojoURLQueryHandling) { 182 TEST_F(ShellAppTest, MojoURLQueryHandling) {
183 InterfacePtr<Pingable> pingable; 183 InterfacePtr<Pingable> pingable;
184 application_impl()->ConnectToService("mojo:pingable_app?foo", &pingable); 184 application_impl()->ConnectToService("mojo:pingable_app?foo", &pingable);
185 auto callback = [this](const String& app_url, const String& connection_url, 185 auto callback = [this](const String& app_url, const String& connection_url,
186 const String& message) { 186 const String& message) {
187 EXPECT_TRUE(EndsWith(app_url, "/pingable_app.mojo", true)); 187 EXPECT_TRUE(base::EndsWith(app_url, "/pingable_app.mojo", true));
188 EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url); 188 EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url);
189 EXPECT_EQ("hello", message); 189 EXPECT_EQ("hello", message);
190 base::MessageLoop::current()->Quit(); 190 base::MessageLoop::current()->Quit();
191 }; 191 };
192 pingable->Ping("hello", callback); 192 pingable->Ping("hello", callback);
193 base::RunLoop().Run(); 193 base::RunLoop().Run();
194 } 194 }
195 195
196 } // namespace 196 } // namespace
197 } // namespace mojo 197 } // namespace mojo
OLDNEW
« no previous file with comments | « media/video/capture/video_capture_device.cc ('k') | net/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698