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

Unified Diff: shell/external_application_listener_unittest.cc

Issue 775343004: Move //mojo/shell to //shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/external_application_listener_posix.cc ('k') | shell/external_application_listener_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/external_application_listener_unittest.cc
diff --git a/mojo/shell/external_application_listener_unittest.cc b/shell/external_application_listener_unittest.cc
similarity index 81%
rename from mojo/shell/external_application_listener_unittest.cc
rename to shell/external_application_listener_unittest.cc
index c69406545c0d8c8e538c95703df98dbeff35fdf6..5a76f607500b835118fd3e0248898998913dbd53 100644
--- a/mojo/shell/external_application_listener_unittest.cc
+++ b/shell/external_application_listener_unittest.cc
@@ -14,12 +14,12 @@
#include "mojo/public/interfaces/application/application.mojom.h"
#include "mojo/public/interfaces/application/service_provider.mojom.h"
#include "mojo/public/interfaces/application/shell.mojom.h"
-#include "mojo/shell/domain_socket/net_errors.h"
-#include "mojo/shell/domain_socket/test_completion_callback.h"
-#include "mojo/shell/domain_socket/unix_domain_client_socket_posix.h"
-#include "mojo/shell/external_application_listener_posix.h"
-#include "mojo/shell/external_application_registrar.mojom.h"
-#include "mojo/shell/external_application_registrar_connection.h"
+#include "shell/domain_socket/net_errors.h"
+#include "shell/domain_socket/test_completion_callback.h"
+#include "shell/domain_socket/unix_domain_client_socket_posix.h"
+#include "shell/external_application_listener_posix.h"
+#include "shell/external_application_registrar.mojom.h"
+#include "shell/external_application_registrar_connection.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -106,11 +106,9 @@ void ConnectOnIOThread(const base::FilePath& socket_path,
TEST_F(ExternalApplicationListenerTest, ConnectConnection) {
listener_->ListenInBackground(socket_path_, base::Bind(&DoLocalRegister));
listener_->WaitForListening();
- io_thread_.task_runner()->PostTask(FROM_HERE,
- base::Bind(&ConnectOnIOThread,
- socket_path_,
- loop_.task_runner(),
- run_loop_.QuitClosure()));
+ io_thread_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&ConnectOnIOThread, socket_path_,
+ loop_.task_runner(), run_loop_.QuitClosure()));
run_loop_.Run();
}
@@ -151,10 +149,10 @@ class FakeExternalApplication {
// application_impl is the the actual implementation to be registered.
void Register(scoped_ptr<InterfaceImpl<Application>> application_impl,
base::Closure register_complete_callback) {
- connection_->Register(GURL(url_),
- base::Bind(&FakeExternalApplication::OnRegister,
- base::Unretained(this),
- register_complete_callback));
+ connection_->Register(
+ GURL(url_),
+ base::Bind(&FakeExternalApplication::OnRegister, base::Unretained(this),
+ register_complete_callback));
application_impl_ = application_impl.Pass();
}
@@ -197,8 +195,8 @@ void ConnectAndRegisterOnIOThread(const base::FilePath& socket_path,
// connector will use this implementation of the Mojo Application interface
// once registration complete.
scoped_ptr<QuitLoopOnConnectApplicationImpl> connector_app_impl(
- new QuitLoopOnConnectApplicationImpl(
- connector->url(), loop, quit_callback));
+ new QuitLoopOnConnectApplicationImpl(connector->url(), loop,
+ quit_callback));
// Since connectee won't be ready when connector is done registering, pass
// in a do-nothing callback.
connector->Register(connector_app_impl.Pass(), base::Bind(&NoOp));
@@ -206,8 +204,8 @@ void ConnectAndRegisterOnIOThread(const base::FilePath& socket_path,
// Connect the second app to the registrar.
connectee->ConnectSynchronously(socket_path);
scoped_ptr<QuitLoopOnConnectApplicationImpl> connectee_app_impl(
- new QuitLoopOnConnectApplicationImpl(
- connectee->url(), loop, quit_callback));
+ new QuitLoopOnConnectApplicationImpl(connectee->url(), loop,
+ quit_callback));
// After connectee is successfully registered, connector should be
// able to connect to is by URL. Pass in a callback to attempt the
// app -> app connection.
@@ -241,20 +239,16 @@ TEST_F(ExternalApplicationListenerTest, ConnectTwoExternalApplications) {
new FakeExternalApplication("http://my.awesome.app"));
// Connecting and talking to the registrar has to happen on the IO thread.
- io_thread_.task_runner()->PostTask(FROM_HERE,
- base::Bind(&ConnectAndRegisterOnIOThread,
- socket_path_,
- loop_.task_runner(),
- run_loop_.QuitClosure(),
- supersweet_app.get(),
- awesome_app.get()));
+ io_thread_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&ConnectAndRegisterOnIOThread, socket_path_,
+ loop_.task_runner(), run_loop_.QuitClosure(),
+ supersweet_app.get(), awesome_app.get()));
run_loop_.Run();
// The apps need to be destroyed on the thread where they did socket stuff.
- io_thread_.task_runner()->PostTask(FROM_HERE,
- base::Bind(&DestroyOnIOThread,
- base::Passed(&supersweet_app),
- base::Passed(&awesome_app)));
+ io_thread_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&DestroyOnIOThread, base::Passed(&supersweet_app),
+ base::Passed(&awesome_app)));
}
} // namespace shell
« no previous file with comments | « shell/external_application_listener_posix.cc ('k') | shell/external_application_listener_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698