| 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 "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "extensions/browser/mojo/stash_backend.h" | 8 #include "extensions/browser/mojo/stash_backend.h" |
| 9 #include "extensions/common/mojo/stash.mojom.h" | 9 #include "extensions/common/mojo/stash.mojom.h" |
| 10 #include "extensions/renderer/api_test_base.h" | 10 #include "extensions/renderer/api_test_base.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 env->service_provider()->AddService(base::Bind( | 30 env->service_provider()->AddService(base::Bind( |
| 31 &StashBackend::BindToRequest, base::Unretained(stash_backend_.get()))); | 31 &StashBackend::BindToRequest, base::Unretained(stash_backend_.get()))); |
| 32 } | 32 } |
| 33 | 33 |
| 34 scoped_ptr<StashBackend> stash_backend_; | 34 scoped_ptr<StashBackend> stash_backend_; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(StashClientTest); | 37 DISALLOW_COPY_AND_ASSIGN(StashClientTest); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 // https://crbug.com/599898 |
| 41 #if defined(LEAK_SANITIZER) |
| 42 #define MAYBE_StashAndRestore DISABLED_StashAndRestore |
| 43 #else |
| 44 #define MAYBE_StashAndRestore StashAndRestore |
| 45 #endif |
| 40 // Test that stashing and restoring work correctly. | 46 // Test that stashing and restoring work correctly. |
| 41 TEST_F(StashClientTest, StashAndRestore) { | 47 TEST_F(StashClientTest, MAYBE_StashAndRestore) { |
| 42 ASSERT_NO_FATAL_FAILURE(RunTest("stash_client_unittest.js", "testStash")); | 48 ASSERT_NO_FATAL_FAILURE(RunTest("stash_client_unittest.js", "testStash")); |
| 43 scoped_ptr<ModuleSystemTestEnvironment> restore_test_env(CreateEnvironment()); | 49 scoped_ptr<ModuleSystemTestEnvironment> restore_test_env(CreateEnvironment()); |
| 44 ApiTestEnvironment restore_environment(restore_test_env.get()); | 50 ApiTestEnvironment restore_environment(restore_test_env.get()); |
| 45 PrepareEnvironment(&restore_environment); | 51 PrepareEnvironment(&restore_environment); |
| 46 restore_environment.RunTest("stash_client_unittest.js", "testRetrieve"); | 52 restore_environment.RunTest("stash_client_unittest.js", "testRetrieve"); |
| 47 } | 53 } |
| 48 | 54 |
| 49 } // namespace extensions | 55 } // namespace extensions |
| OLD | NEW |