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/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
10 #include "chrome/browser/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 found = *it; | 35 found = *it; |
36 } | 36 } |
37 | 37 |
38 return found; | 38 return found; |
39 } | 39 } |
40 | 40 |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 class ExtensionManagementApiTest : public ExtensionApiTest { | 43 class ExtensionManagementApiTest : public ExtensionApiTest { |
44 public: | 44 public: |
45 virtual void SetUpCommandLine(CommandLine* command_line) { | 45 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
46 ExtensionApiTest::SetUpCommandLine(command_line); | 46 ExtensionApiTest::SetUpCommandLine(command_line); |
47 command_line->AppendSwitch(switches::kEnablePanels); | 47 command_line->AppendSwitch(switches::kEnablePanels); |
48 } | 48 } |
49 | 49 |
50 virtual void LoadExtensions() { | 50 virtual void LoadExtensions() { |
51 FilePath basedir = test_data_dir_.AppendASCII("management"); | 51 FilePath basedir = test_data_dir_.AppendASCII("management"); |
52 | 52 |
53 // Load 4 enabled items. | 53 // Load 4 enabled items. |
54 LoadNamedExtension(basedir, "enabled_extension"); | 54 LoadNamedExtension(basedir, "enabled_extension"); |
55 LoadNamedExtension(basedir, "enabled_app"); | 55 LoadNamedExtension(basedir, "enabled_app"); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 ASSERT_EQ(2, browser()->tab_strip_model()->count()); | 264 ASSERT_EQ(2, browser()->tab_strip_model()->count()); |
265 #else | 265 #else |
266 // Find the app's browser. Opening in a new window will create | 266 // Find the app's browser. Opening in a new window will create |
267 // a new browser. | 267 // a new browser. |
268 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); | 268 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); |
269 Browser* app_browser = FindOtherBrowser(browser()); | 269 Browser* app_browser = FindOtherBrowser(browser()); |
270 ASSERT_TRUE(app_browser->is_app()); | 270 ASSERT_TRUE(app_browser->is_app()); |
271 ASSERT_FALSE(app_browser->is_type_panel()); | 271 ASSERT_FALSE(app_browser->is_type_panel()); |
272 #endif | 272 #endif |
273 } | 273 } |
OLD | NEW |