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

Side by Side Diff: services/js/pingpong_apptest.cc

Issue 780213002: Put code in //services/js in namespace js (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 unified diff | Download patch
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 "services/js/test/js_application_test_base.h" 5 #include "services/js/test/js_application_test_base.h"
6 #include "services/js/test/pingpong_service.mojom.h" 6 #include "services/js/test/pingpong_service.mojom.h"
7 7
8 namespace mojo { 8 namespace js {
9 namespace { 9 namespace {
10 10
11 class PingPongClientImpl : public PingPongClient { 11 class PingPongClientImpl : public PingPongClient {
12 public: 12 public:
13 PingPongClientImpl() : last_pong_value_(0) {}; 13 PingPongClientImpl() : last_pong_value_(0) {};
14 ~PingPongClientImpl() override {}; 14 ~PingPongClientImpl() override {};
15 15
16 int16_t last_pong_value() const { return last_pong_value_; } 16 int16_t last_pong_value() const { return last_pong_value_; }
17 17
18 // PingPongClient overrides. 18 // PingPongClient overrides.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 TEST_F(JSPingPongTest, PingTargetApp) { 73 TEST_F(JSPingPongTest, PingTargetApp) {
74 bool returned_value = false; 74 bool returned_value = false;
75 PingTargetCallback callback(&returned_value); 75 PingTargetCallback callback(&returned_value);
76 pingpong_service_->PingTarget(JSAppURL("pingpong_target.js"), 10, callback); 76 pingpong_service_->PingTarget(JSAppURL("pingpong_target.js"), 10, callback);
77 EXPECT_TRUE(pingpong_service_.WaitForIncomingMethodCall()); 77 EXPECT_TRUE(pingpong_service_.WaitForIncomingMethodCall());
78 EXPECT_TRUE(returned_value); 78 EXPECT_TRUE(returned_value);
79 pingpong_service_->Quit(); 79 pingpong_service_->Quit();
80 } 80 }
81 81
82 } // namespace 82 } // namespace
83 } // namespace mojo 83 } // namespace js
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698