| 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 "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/launch_util.h" | 10 #include "chrome/browser/extensions/launch_util.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 continue; | 36 continue; |
| 37 found = *it; | 37 found = *it; |
| 38 } | 38 } |
| 39 return found; | 39 return found; |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // namespace | 42 } // namespace |
| 43 | 43 |
| 44 class ExtensionManagementApiTest : public ExtensionApiTest { | 44 class ExtensionManagementApiTest : public ExtensionApiTest { |
| 45 public: | 45 public: |
| 46 void SetUpCommandLine(CommandLine* command_line) override { | 46 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 47 ExtensionApiTest::SetUpCommandLine(command_line); | 47 ExtensionApiTest::SetUpCommandLine(command_line); |
| 48 command_line->AppendSwitch(switches::kEnablePanels); | 48 command_line->AppendSwitch(switches::kEnablePanels); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void LoadExtensions() { | 51 virtual void LoadExtensions() { |
| 52 base::FilePath basedir = test_data_dir_.AppendASCII("management"); | 52 base::FilePath basedir = test_data_dir_.AppendASCII("management"); |
| 53 | 53 |
| 54 // Load 5 enabled items. | 54 // Load 5 enabled items. |
| 55 LoadNamedExtension(basedir, "enabled_extension"); | 55 LoadNamedExtension(basedir, "enabled_extension"); |
| 56 LoadNamedExtension(basedir, "enabled_app"); | 56 LoadNamedExtension(basedir, "enabled_app"); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 ASSERT_TRUE(app_browser->is_app()); | 316 ASSERT_TRUE(app_browser->is_app()); |
| 317 } | 317 } |
| 318 | 318 |
| 319 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) { | 319 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) { |
| 320 LoadExtensions(); | 320 LoadExtensions(); |
| 321 base::FilePath basedir = test_data_dir_.AppendASCII("management"); | 321 base::FilePath basedir = test_data_dir_.AppendASCII("management"); |
| 322 LoadNamedExtension(basedir, "packaged_app"); | 322 LoadNamedExtension(basedir, "packaged_app"); |
| 323 | 323 |
| 324 ASSERT_TRUE(RunExtensionSubtest("management/test", "launchType.html")); | 324 ASSERT_TRUE(RunExtensionSubtest("management/test", "launchType.html")); |
| 325 } | 325 } |
| OLD | NEW |