OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/i18n/time_formatting.h" | 6 #include "base/i18n/time_formatting.h" |
7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 input_value.SetString(extension_manifest_keys::kOptionsPage, | 216 input_value.SetString(extension_manifest_keys::kOptionsPage, |
217 options_page); | 217 options_page); |
218 } | 218 } |
219 std::string error; | 219 std::string error; |
220 scoped_refptr<Extension> extension = Extension::Create( | 220 scoped_refptr<Extension> extension = Extension::Create( |
221 full_path, location, input_value, Extension::STRICT_ERROR_CHECKS, | 221 full_path, location, input_value, Extension::STRICT_ERROR_CHECKS, |
222 &error); | 222 &error); |
223 ASSERT_TRUE(extension.get()); | 223 ASSERT_TRUE(extension.get()); |
224 EXPECT_STREQ("", error.c_str()); | 224 EXPECT_STREQ("", error.c_str()); |
225 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( | 225 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( |
226 extension.get()); | 226 extension.get(), false); |
227 | 227 |
228 // Creates a panel with the app name that comes from the extension ID. | 228 // Creates a panel with the app name that comes from the extension ID. |
229 PanelBrowserView* browser_view = CreatePanelBrowserView( | 229 PanelBrowserView* browser_view = CreatePanelBrowserView( |
230 web_app::GenerateApplicationNameFromExtensionId(extension->id()), | 230 web_app::GenerateApplicationNameFromExtensionId(extension->id()), |
231 SHOW_AS_ACTIVE); | 231 SHOW_AS_ACTIVE); |
232 PanelBrowserFrameView* frame_view = browser_view->GetFrameView(); | 232 PanelBrowserFrameView* frame_view = browser_view->GetFrameView(); |
233 | 233 |
234 frame_view->EnsureSettingsMenuCreated(); | 234 frame_view->EnsureSettingsMenuCreated(); |
235 | 235 |
236 // Validates the settings menu items. | 236 // Validates the settings menu items. |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 "", ""); | 667 "", ""); |
668 TestCreateSettingsMenuForExtension( | 668 TestCreateSettingsMenuForExtension( |
669 FILE_PATH_LITERAL("extension2"), Extension::INVALID, | 669 FILE_PATH_LITERAL("extension2"), Extension::INVALID, |
670 "http://home", "options.html"); | 670 "http://home", "options.html"); |
671 } | 671 } |
672 | 672 |
673 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, MinimizeAndRestore) { | 673 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, MinimizeAndRestore) { |
674 TestMinimizeAndRestore(); | 674 TestMinimizeAndRestore(); |
675 } | 675 } |
676 #endif | 676 #endif |
OLD | NEW |