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 <map> | 5 #include <map> |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 continue; | 39 continue; |
40 found = b; | 40 found = b; |
41 } | 41 } |
42 return found; | 42 return found; |
43 } | 43 } |
44 | 44 |
45 } // namespace | 45 } // namespace |
46 | 46 |
47 class ExtensionManagementApiTest : public ExtensionApiTest { | 47 class ExtensionManagementApiTest : public ExtensionApiTest { |
48 public: | 48 public: |
49 void SetUpCommandLine(base::CommandLine* command_line) override { | |
50 ExtensionApiTest::SetUpCommandLine(command_line); | |
51 command_line->AppendSwitch(switches::kEnablePanels); | |
52 } | |
53 | |
54 virtual void LoadExtensions() { | 49 virtual void LoadExtensions() { |
55 base::FilePath basedir = test_data_dir_.AppendASCII("management"); | 50 base::FilePath basedir = test_data_dir_.AppendASCII("management"); |
56 | 51 |
57 // Load 5 enabled items. | 52 // Load 5 enabled items. |
58 LoadNamedExtension(basedir, "enabled_extension"); | 53 LoadNamedExtension(basedir, "enabled_extension"); |
59 LoadNamedExtension(basedir, "enabled_app"); | 54 LoadNamedExtension(basedir, "enabled_app"); |
60 LoadNamedExtension(basedir, "description"); | 55 LoadNamedExtension(basedir, "description"); |
61 LoadNamedExtension(basedir, "permissions"); | 56 LoadNamedExtension(basedir, "permissions"); |
62 LoadNamedExtension(basedir, "short_name"); | 57 LoadNamedExtension(basedir, "short_name"); |
63 | 58 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } | 324 } |
330 } | 325 } |
331 | 326 |
332 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) { | 327 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) { |
333 LoadExtensions(); | 328 LoadExtensions(); |
334 base::FilePath basedir = test_data_dir_.AppendASCII("management"); | 329 base::FilePath basedir = test_data_dir_.AppendASCII("management"); |
335 LoadNamedExtension(basedir, "packaged_app"); | 330 LoadNamedExtension(basedir, "packaged_app"); |
336 | 331 |
337 ASSERT_TRUE(RunExtensionSubtest("management/test", "launchType.html")); | 332 ASSERT_TRUE(RunExtensionSubtest("management/test", "launchType.html")); |
338 } | 333 } |
OLD | NEW |