| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 #include "chrome/browser/extensions/extension_test_message_listener.h" | 6 #include "extensions/test/extension_test_message_listener.h" |
| 7 | 7 |
| 8 using extensions::Extension; | 8 using extensions::Extension; |
| 9 | 9 |
| 10 // NB: We use LoadExtension instead of InstallExtension for shared modules so | 10 // NB: We use LoadExtension instead of InstallExtension for shared modules so |
| 11 // the public-keys in their manifests are used to generate the extension ID, so | 11 // the public-keys in their manifests are used to generate the extension ID, so |
| 12 // it can be imported correctly. We use InstallExtension otherwise so the loads | 12 // it can be imported correctly. We use InstallExtension otherwise so the loads |
| 13 // happen through the CRX installer which validates imports. | 13 // happen through the CRX installer which validates imports. |
| 14 | 14 |
| 15 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, SharedModule) { | 15 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, SharedModule) { |
| 16 // import_pass depends on this shared module. | 16 // import_pass depends on this shared module. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 47 test_data_dir_.AppendASCII("shared_module").AppendASCII("import_pass"), | 47 test_data_dir_.AppendASCII("shared_module").AppendASCII("import_pass"), |
| 48 1)); | 48 1)); |
| 49 | 49 |
| 50 EXPECT_TRUE(listener1.WaitUntilSatisfied()); | 50 EXPECT_TRUE(listener1.WaitUntilSatisfied()); |
| 51 | 51 |
| 52 ExtensionTestMessageListener listener2("shared_module_updated", false); | 52 ExtensionTestMessageListener listener2("shared_module_updated", false); |
| 53 ReloadExtension(extension->id()); | 53 ReloadExtension(extension->id()); |
| 54 | 54 |
| 55 EXPECT_TRUE(listener2.WaitUntilSatisfied()); | 55 EXPECT_TRUE(listener2.WaitUntilSatisfied()); |
| 56 } | 56 } |
| OLD | NEW |