Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/browser/ui/panels/panel_browser_view_browsertest.cc

Issue 7349020: Don't show a prompt when loading an extension with NPAPI plugins via (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit test fix Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698