OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/crx_installer.h" | 9 #include "chrome/browser/extensions/crx_installer.h" |
10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 using extensions::Extension; | 26 using extensions::Extension; |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 const char* kExtensionId = "bjjcibdiodkkeanflmiijlcfieiemced"; | 30 const char* kExtensionId = "bjjcibdiodkkeanflmiijlcfieiemced"; |
31 | 31 |
32 // This class tests that the Native Client plugin is blocked unless the | 32 // This class tests that the Native Client plugin is blocked unless the |
33 // .nexe is part of an extension from the Chrome Webstore. | 33 // .nexe is part of an extension from the Chrome Webstore. |
34 class NaClExtensionTest : public ExtensionBrowserTest { | 34 class NaClExtensionTest : public ExtensionBrowserTest { |
35 public: | 35 public: |
36 NaClExtensionTest() { | 36 NaClExtensionTest() {} |
37 EnableDOMAutomation(); | |
38 } | |
39 | 37 |
40 protected: | 38 protected: |
41 enum InstallType { | 39 enum InstallType { |
42 INSTALL_TYPE_COMPONENT, | 40 INSTALL_TYPE_COMPONENT, |
43 INSTALL_TYPE_UNPACKED, | 41 INSTALL_TYPE_UNPACKED, |
44 INSTALL_TYPE_FROM_WEBSTORE, | 42 INSTALL_TYPE_FROM_WEBSTORE, |
45 INSTALL_TYPE_NON_WEBSTORE, | 43 INSTALL_TYPE_NON_WEBSTORE, |
46 }; | 44 }; |
47 | 45 |
48 const Extension* InstallExtension(InstallType install_type) { | 46 const Extension* InstallExtension(InstallType install_type) { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, UnpackedExtension) { | 145 IN_PROC_BROWSER_TEST_F(NaClExtensionTest, UnpackedExtension) { |
148 ASSERT_TRUE(test_server()->Start()); | 146 ASSERT_TRUE(test_server()->Start()); |
149 | 147 |
150 const Extension* extension = InstallExtension(INSTALL_TYPE_UNPACKED); | 148 const Extension* extension = InstallExtension(INSTALL_TYPE_UNPACKED); |
151 ASSERT_TRUE(extension); | 149 ASSERT_TRUE(extension); |
152 ASSERT_EQ(extension->location(), Extension::LOAD); | 150 ASSERT_EQ(extension->location(), Extension::LOAD); |
153 CheckPluginsCreated(extension, true); | 151 CheckPluginsCreated(extension, true); |
154 } | 152 } |
155 | 153 |
156 } // namespace | 154 } // namespace |
OLD | NEW |