OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "extensions/browser/mojo/stash_backend.h" | 7 #include "extensions/browser/mojo/stash_backend.h" |
8 #include "extensions/common/mojo/stash.mojom.h" | 8 #include "extensions/common/mojo/stash.mojom.h" |
9 #include "extensions/renderer/api_test_base.h" | 9 #include "extensions/renderer/api_test_base.h" |
10 #include "gin/dictionary.h" | 10 #include "gin/dictionary.h" |
11 #include "grit/extensions_renderer_resources.h" | 11 #include "grit/extensions_renderer_resources.h" |
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/message_builder.h" | 12 #include "mojo/public/cpp/bindings/lib/message_builder.h" |
13 | 13 |
14 // A test launcher for tests for the stash client defined in | 14 // A test launcher for tests for the stash client defined in |
15 // extensions/test/data/stash_client_unittest.js. | 15 // extensions/test/data/stash_client_unittest.js. |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 class StashClientTest : public ApiTestBase { | 18 class StashClientTest : public ApiTestBase { |
19 public: | 19 public: |
20 StashClientTest() {} | 20 StashClientTest() {} |
21 | 21 |
22 void SetUp() override { | 22 void SetUp() override { |
(...skipping 16 matching lines...) Expand all Loading... |
39 // Test that stashing and restoring work correctly. | 39 // Test that stashing and restoring work correctly. |
40 TEST_F(StashClientTest, StashAndRestore) { | 40 TEST_F(StashClientTest, StashAndRestore) { |
41 ASSERT_NO_FATAL_FAILURE(RunTest("stash_client_unittest.js", "testStash")); | 41 ASSERT_NO_FATAL_FAILURE(RunTest("stash_client_unittest.js", "testStash")); |
42 scoped_ptr<ModuleSystemTestEnvironment> restore_test_env(CreateEnvironment()); | 42 scoped_ptr<ModuleSystemTestEnvironment> restore_test_env(CreateEnvironment()); |
43 ApiTestEnvironment restore_environment(restore_test_env.get()); | 43 ApiTestEnvironment restore_environment(restore_test_env.get()); |
44 PrepareEnvironment(&restore_environment); | 44 PrepareEnvironment(&restore_environment); |
45 restore_environment.RunTest("stash_client_unittest.js", "testRetrieve"); | 45 restore_environment.RunTest("stash_client_unittest.js", "testRetrieve"); |
46 } | 46 } |
47 | 47 |
48 } // namespace extensions | 48 } // namespace extensions |
OLD | NEW |