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

Side by Side Diff: mojo/runner/shell_test_base_unittest.cc

Issue 1107233002: Move runner stuff into a runner namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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 | « mojo/runner/shell_test_base_android.cc ('k') | mojo/runner/shell_test_main.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 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 "mojo/runner/shell_test_base.h" 5 #include "mojo/runner/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"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "mojo/public/cpp/bindings/error_handler.h" 12 #include "mojo/public/cpp/bindings/error_handler.h"
13 #include "mojo/public/cpp/bindings/interface_ptr.h" 13 #include "mojo/public/cpp/bindings/interface_ptr.h"
14 #include "mojo/public/cpp/system/core.h" 14 #include "mojo/public/cpp/system/core.h"
15 #include "mojo/services/test_service/test_request_tracker.mojom.h" 15 #include "mojo/services/test_service/test_request_tracker.mojom.h"
16 #include "mojo/services/test_service/test_service.mojom.h" 16 #include "mojo/services/test_service/test_service.mojom.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "url/gurl.h" 18 #include "url/gurl.h"
19 19
20 using mojo::test::ServiceReport; 20 using mojo::test::ServiceReport;
21 using mojo::test::ServiceReportPtr; 21 using mojo::test::ServiceReportPtr;
22 using mojo::test::TestService; 22 using mojo::test::TestService;
23 using mojo::test::TestTimeService; 23 using mojo::test::TestTimeService;
24 using mojo::test::TestServicePtr; 24 using mojo::test::TestServicePtr;
25 using mojo::test::TestTimeServicePtr; 25 using mojo::test::TestTimeServicePtr;
26 using mojo::test::TestTrackedRequestService; 26 using mojo::test::TestTrackedRequestService;
27 using mojo::test::TestTrackedRequestServicePtr; 27 using mojo::test::TestTrackedRequestServicePtr;
28 28
29 namespace mojo { 29 namespace mojo {
30 namespace shell { 30 namespace runner {
31 namespace test { 31 namespace test {
32 namespace { 32 namespace {
33 33
34 void GetReportCallback(base::MessageLoop* loop, 34 void GetReportCallback(base::MessageLoop* loop,
35 std::vector<ServiceReport>* reports_out, 35 std::vector<ServiceReport>* reports_out,
36 Array<ServiceReportPtr> report) { 36 Array<ServiceReportPtr> report) {
37 for (size_t i = 0; i < report.size(); i++) 37 for (size_t i = 0; i < report.size(); i++)
38 reports_out->push_back(*report[i]); 38 reports_out->push_back(*report[i]);
39 loop->QuitWhenIdle(); 39 loop->QuitWhenIdle();
40 } 40 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 EXPECT_EQ(TestService::Name_, reports[0].service_name); 298 EXPECT_EQ(TestService::Name_, reports[0].service_name);
299 EXPECT_EQ(6U, reports[0].total_requests); 299 EXPECT_EQ(6U, reports[0].total_requests);
300 EXPECT_EQ(TestTimeService::Name_, reports[1].service_name); 300 EXPECT_EQ(TestTimeService::Name_, reports[1].service_name);
301 EXPECT_EQ(1U, reports[1].total_requests); 301 EXPECT_EQ(1U, reports[1].total_requests);
302 EXPECT_EQ(TestTimeService::Name_, reports[2].service_name); 302 EXPECT_EQ(TestTimeService::Name_, reports[2].service_name);
303 EXPECT_EQ(20U, reports[2].total_requests); 303 EXPECT_EQ(20U, reports[2].total_requests);
304 } 304 }
305 305
306 } // namespace 306 } // namespace
307 } // namespace test 307 } // namespace test
308 } // namespace shell 308 } // namespace runner
309 } // namespace mojo 309 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/shell_test_base_android.cc ('k') | mojo/runner/shell_test_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698