| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |