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

Unified Diff: shell/shell_apptest.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: shell/shell_apptest.cc
diff --git a/shell/shell_apptest.cc b/shell/shell_apptest.cc
index 2829155dada2a3223cfd366ff679d6bd0d58029c..09988e5bb6928b6c2074c02c2815fdf49f42c236 100644
--- a/shell/shell_apptest.cc
+++ b/shell/shell_apptest.cc
@@ -10,6 +10,7 @@
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "mojo/converters/base/base_type_converters.h"
#include "mojo/data_pipe_utils/data_pipe_utils.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/application_test_base.h"
@@ -45,7 +46,8 @@ class GetHandler : public http_server::HttpHandler {
const mojo::Callback<void(http_server::HttpResponsePtr)>&
callback) override {
http_server::HttpResponsePtr response;
- if (StartsWithASCII(request->relative_url, "/app", true)) {
+ if (base::StartsWith(request->relative_url.To<base::StringPiece>(), "/app",
+ base::CompareCase::SENSITIVE)) {
response = http_server::CreateHttpResponse(
200, std::string(shell::test::kPingable.data,
shell::test::kPingable.size));
@@ -188,7 +190,9 @@ TEST_F(ShellAppTest, MojoURLQueryHandling) {
application_impl()->ConnectToService("mojo:pingable_app?foo", &pingable);
auto callback = [](const String& app_url, const String& connection_url,
const String& message) {
- EXPECT_TRUE(EndsWith(app_url, "/pingable_app.mojo", true));
+ EXPECT_TRUE(base::EndsWith(app_url.To<base::StringPiece>(),
+ "/pingable_app.mojo",
+ base::CompareCase::SENSITIVE));
EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url);
EXPECT_EQ("hello", message);
base::MessageLoop::current()->Quit();
@@ -202,7 +206,9 @@ void TestApplicationConnector(mojo::ApplicationConnector* app_connector) {
ConnectToService(app_connector, "mojo:pingable_app", &pingable);
auto callback = [](const String& app_url, const String& connection_url,
const String& message) {
- EXPECT_TRUE(EndsWith(app_url, "/pingable_app.mojo", true));
+ EXPECT_TRUE(base::EndsWith(app_url.To<base::StringPiece>(),
+ "/pingable_app.mojo",
+ base::CompareCase::SENSITIVE));
EXPECT_EQ(app_url, connection_url);
EXPECT_EQ("hello", message);
base::MessageLoop::current()->Quit();
« no previous file with comments | « shell/filename_util.cc ('k') | testing/android/native_test/java/src/org/chromium/native_test/NativeUnitTestActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698