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

Side by Side Diff: chrome/browser/extensions/webstore_inline_installer_browsertest.cc

Issue 1659203002: Remove HostDesktopType from FindLastActive[WithProfile] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 4 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/macros.h" 5 #include "base/macros.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
8 #include "chrome/browser/extensions/extension_install_prompt.h" 8 #include "chrome/browser/extensions/extension_install_prompt.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 GenerateTestServerUrl(kAppDomain, "install_from_popup.html"); 241 GenerateTestServerUrl(kAppDomain, "install_from_popup.html");
242 // Disable popup blocking for the test url. 242 // Disable popup blocking for the test url.
243 HostContentSettingsMapFactory::GetForProfile(browser()->profile()) 243 HostContentSettingsMapFactory::GetForProfile(browser()->profile())
244 ->SetContentSetting(ContentSettingsPattern::FromURL(install_url), 244 ->SetContentSetting(ContentSettingsPattern::FromURL(install_url),
245 ContentSettingsPattern::Wildcard(), 245 ContentSettingsPattern::Wildcard(),
246 CONTENT_SETTINGS_TYPE_POPUPS, 246 CONTENT_SETTINGS_TYPE_POPUPS,
247 std::string(), 247 std::string(),
248 CONTENT_SETTING_ALLOW); 248 CONTENT_SETTING_ALLOW);
249 ui_test_utils::NavigateToURL(browser(), install_url); 249 ui_test_utils::NavigateToURL(browser(), install_url);
250 // The test page opens a popup which is a new |browser| window. 250 // The test page opens a popup which is a new |browser| window.
251 Browser* popup_browser = chrome::FindLastActiveWithProfile( 251 Browser* popup_browser =
252 browser()->profile(), chrome::GetActiveDesktop()); 252 chrome::FindLastActiveWithProfile(browser()->profile());
253 WebContents* popup_contents = 253 WebContents* popup_contents =
254 popup_browser->tab_strip_model()->GetActiveWebContents(); 254 popup_browser->tab_strip_model()->GetActiveWebContents();
255 EXPECT_EQ(base::ASCIIToUTF16("POPUP"), popup_contents->GetTitle()); 255 EXPECT_EQ(base::ASCIIToUTF16("POPUP"), popup_contents->GetTitle());
256 RunTest(popup_contents, "runTest"); 256 RunTest(popup_contents, "runTest");
257 } 257 }
258 258
259 // Ensure that inline-installing a disabled extension simply re-enables it. 259 // Ensure that inline-installing a disabled extension simply re-enables it.
260 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerTest, 260 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerTest,
261 ReinstallDisabledExtension) { 261 ReinstallDisabledExtension) {
262 // Install an extension via inline install, and confirm it is successful. 262 // Install an extension via inline install, and confirm it is successful.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, 331 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest,
332 DownloadProgressListenerTest) { 332 DownloadProgressListenerTest) {
333 RunTest("download_progress_listener.html"); 333 RunTest("download_progress_listener.html");
334 } 334 }
335 335
336 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, BothListenersTest) { 336 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, BothListenersTest) {
337 RunTest("both_listeners.html"); 337 RunTest("both_listeners.html");
338 } 338 }
339 339
340 } // namespace extensions 340 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_error_ui_default.cc ('k') | chrome/browser/printing/print_error_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698