| 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 "extensions/common/mojo/keep_alive.mojom.h" | 5 #include "extensions/common/mojo/keep_alive.mojom.h" |
| 6 #include "extensions/renderer/api_test_base.h" | 6 #include "extensions/renderer/api_test_base.h" |
| 7 #include "grit/extensions_renderer_resources.h" | 7 #include "grit/extensions_renderer_resources.h" |
| 8 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | 8 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 9 | 9 |
| 10 // A test launcher for tests for the stash client defined in | 10 // A test launcher for tests for the stash client defined in |
| 11 // extensions/test/data/keep_alive_client_unittest.js. | 11 // extensions/test/data/keep_alive_client_unittest.js. |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // A KeepAlive implementation that calls provided callbacks on creation and | 16 // A KeepAlive implementation that calls provided callbacks on creation and |
| 17 // destruction. | 17 // destruction. |
| 18 class TestKeepAlive : public KeepAlive { | 18 class TestKeepAlive : public KeepAlive { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 RunTest("keep_alive_client_unittest.js", "testKeepAliveWithSuccessfulCall"); | 87 RunTest("keep_alive_client_unittest.js", "testKeepAliveWithSuccessfulCall"); |
| 88 WaitForKeepAlive(); | 88 WaitForKeepAlive(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 TEST_F(KeepAliveClientTest, KeepAliveWithError) { | 91 TEST_F(KeepAliveClientTest, KeepAliveWithError) { |
| 92 RunTest("keep_alive_client_unittest.js", "testKeepAliveWithError"); | 92 RunTest("keep_alive_client_unittest.js", "testKeepAliveWithError"); |
| 93 WaitForKeepAlive(); | 93 WaitForKeepAlive(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace extensions | 96 } // namespace extensions |
| OLD | NEW |