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

Side by Side Diff: shell/shell_test_base_unittest.cc

Issue 815993004: Run shell tests on android. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: move shell_test_base_android.cc 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 unified diff | Download patch
« shell/shell_test_base.cc ('K') | « shell/shell_test_base.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "shell/shell_test_base.h" 5 #include "shell/shell_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 shell_context()->application_manager()->TerminateShellConnections(); 153 shell_context()->application_manager()->TerminateShellConnections();
154 message_loop()->Run(); // Waits for all connections to die. 154 message_loop()->Run(); // Waits for all connections to die.
155 } 155 }
156 156
157 // Tests that trying to connect to a service over network fails preoprly 157 // Tests that trying to connect to a service over network fails preoprly
158 // if the service doesn't exist. 158 // if the service doesn't exist.
159 // TODO(tim): Disabled because network service leaks NSS at exit, meaning 159 // TODO(tim): Disabled because network service leaks NSS at exit, meaning
160 // subsequent tests can't init properly. 160 // subsequent tests can't init properly.
161 TEST_F(ShellTestBaseTest, DISABLED_ConnectInvalidServiceNetwork) { 161 TEST_F(ShellTestBaseTest, DISABLED_ConnectInvalidServiceNetwork) {
162 InterfacePtr<TestService> test_service; 162 InterfacePtr<TestService> test_service;
163 ConnectToServiceViaNetwork(GURL("mojo:non_existent_service"), &test_service); 163 ConnectToService(GURL("http://example.com/non_existent_service"),
164 &test_service);
164 QuitMessageLoopErrorHandler quitter; 165 QuitMessageLoopErrorHandler quitter;
165 test_service.set_error_handler(&quitter); 166 test_service.set_error_handler(&quitter);
166 bool was_run = false; 167 bool was_run = false;
167 test_service->Ping(SetAndQuit<bool>(&was_run, true)); 168 test_service->Ping(SetAndQuit<bool>(&was_run, true));
168 message_loop()->Run(); 169 message_loop()->Run();
169 EXPECT_TRUE(test_service.encountered_error()); 170 EXPECT_TRUE(test_service.encountered_error());
170 171
171 // TODO(tim): crbug.com/392685. Calling this explicitly shouldn't be 172 // TODO(tim): crbug.com/392685. Calling this explicitly shouldn't be
172 // necessary once the shell terminates if the primordial app exits, which 173 // necessary once the shell terminates if the primordial app exits, which
173 // we could enforce here by resetting |service|. 174 // we could enforce here by resetting |service|.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 EXPECT_EQ(TestTimeService::Name_, reports[1].service_name); 300 EXPECT_EQ(TestTimeService::Name_, reports[1].service_name);
300 EXPECT_EQ(1U, reports[1].total_requests); 301 EXPECT_EQ(1U, reports[1].total_requests);
301 EXPECT_EQ(TestTimeService::Name_, reports[2].service_name); 302 EXPECT_EQ(TestTimeService::Name_, reports[2].service_name);
302 EXPECT_EQ(20U, reports[2].total_requests); 303 EXPECT_EQ(20U, reports[2].total_requests);
303 } 304 }
304 305
305 } // namespace 306 } // namespace
306 } // namespace test 307 } // namespace test
307 } // namespace shell 308 } // namespace shell
308 } // namespace mojo 309 } // namespace mojo
OLDNEW
« shell/shell_test_base.cc ('K') | « shell/shell_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698