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

Unified Diff: shell/shell_apptest.cc

Issue 1074963002: Add some |using mojo::...;|s to //shell .cc files. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « shell/context.cc ('k') | shell/shell_test_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/shell_apptest.cc
diff --git a/shell/shell_apptest.cc b/shell/shell_apptest.cc
index 4b336ec068d59616dfb52b1832e28697648b7a27..468e00c29831808a601636d65985a3afe9e2a89f 100644
--- a/shell/shell_apptest.cc
+++ b/shell/shell_apptest.cc
@@ -21,6 +21,8 @@
#include "shell/kPingable.h"
#include "shell/test/pingable.mojom.h"
+using mojo::String;
+
namespace {
std::string GetURL(uint16_t port, const std::string& path) {
@@ -114,14 +116,14 @@ class ShellHTTPAppTest : public ShellAppTest {
TEST_F(ShellHTTPAppTest, Http) {
PingablePtr pingable;
application_impl()->ConnectToService(GetURL("app"), &pingable);
- pingable->Ping("hello", [this](const mojo::String& app_url,
- const mojo::String& connection_url,
- const mojo::String& message) {
- EXPECT_EQ(GetURL("app"), app_url);
- EXPECT_EQ(GetURL("app"), connection_url);
- EXPECT_EQ("hello", message);
- base::MessageLoop::current()->Quit();
- });
+ pingable->Ping("hello",
+ [this](const String& app_url, const String& connection_url,
+ const String& message) {
+ EXPECT_EQ(GetURL("app"), app_url);
+ EXPECT_EQ(GetURL("app"), connection_url);
+ EXPECT_EQ("hello", message);
+ base::MessageLoop::current()->Quit();
+ });
base::RunLoop().Run();
}
@@ -130,14 +132,14 @@ TEST_F(ShellHTTPAppTest, Http) {
TEST_F(ShellHTTPAppTest, Redirect) {
PingablePtr pingable;
application_impl()->ConnectToService(GetURL("redirect"), &pingable);
- pingable->Ping("hello", [this](const mojo::String& app_url,
- const mojo::String& connection_url,
- const mojo::String& message) {
- EXPECT_EQ(GetURL("app"), app_url);
- EXPECT_EQ(GetURL("app"), connection_url);
- EXPECT_EQ("hello", message);
- base::MessageLoop::current()->Quit();
- });
+ pingable->Ping("hello",
+ [this](const String& app_url, const String& connection_url,
+ const String& message) {
+ EXPECT_EQ(GetURL("app"), app_url);
+ EXPECT_EQ(GetURL("app"), connection_url);
+ EXPECT_EQ("hello", message);
+ base::MessageLoop::current()->Quit();
+ });
base::RunLoop().Run();
}
@@ -155,9 +157,9 @@ TEST_F(ShellHTTPAppTest, MAYBE_QueryHandling) {
application_impl()->ConnectToService(GetURL("app?bar"), &pingable2);
int num_responses = 0;
- auto callback = [this, &num_responses](const mojo::String& app_url,
- const mojo::String& connection_url,
- const mojo::String& message) {
+ auto callback = [this, &num_responses](const String& app_url,
+ const String& connection_url,
+ const String& message) {
EXPECT_EQ(GetURL("app"), app_url);
EXPECT_EQ("hello", message);
++num_responses;
@@ -179,14 +181,13 @@ TEST_F(ShellHTTPAppTest, MAYBE_QueryHandling) {
TEST_F(ShellAppTest, MojoURLQueryHandling) {
PingablePtr pingable;
application_impl()->ConnectToService("mojo:pingable_app?foo", &pingable);
- auto callback =
- [this](const mojo::String& app_url, const mojo::String& connection_url,
- const mojo::String& message) {
- EXPECT_TRUE(EndsWith(app_url, "/pingable_app.mojo", true));
- EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url);
- EXPECT_EQ("hello", message);
- base::MessageLoop::current()->Quit();
- };
+ auto callback = [this](const String& app_url, const String& connection_url,
+ const String& message) {
+ EXPECT_TRUE(EndsWith(app_url, "/pingable_app.mojo", true));
+ EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url);
+ EXPECT_EQ("hello", message);
+ base::MessageLoop::current()->Quit();
+ };
pingable->Ping("hello", callback);
base::RunLoop().Run();
}
« no previous file with comments | « shell/context.cc ('k') | shell/shell_test_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698