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

Side by Side Diff: chrome/browser/infobars/infobars_browsertest.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 (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 <utility>
6
5 #include "base/command_line.h" 7 #include "base/command_line.h"
6 #include "build/build_config.h" 8 #include "build/build_config.h"
7 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/extensions/crx_installer.h" 10 #include "chrome/browser/extensions/crx_installer.h"
9 #include "chrome/browser/extensions/extension_install_prompt.h" 11 #include "chrome/browser/extensions/extension_install_prompt.h"
10 #include "chrome/browser/extensions/extension_service.h" 12 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/browser/infobars/infobar_service.h" 13 #include "chrome/browser/infobars/infobar_service.h"
12 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/themes/theme_service.h" 15 #include "chrome/browser/themes/theme_service.h"
14 #include "chrome/browser/themes/theme_service_factory.h" 16 #include "chrome/browser/themes/theme_service_factory.h"
(...skipping 20 matching lines...) Expand all
35 base::FilePath().AppendASCII(filename)); 37 base::FilePath().AppendASCII(filename));
36 ExtensionService* service = extensions::ExtensionSystem::Get( 38 ExtensionService* service = extensions::ExtensionSystem::Get(
37 browser()->profile())->extension_service(); 39 browser()->profile())->extension_service();
38 40
39 extensions::TestExtensionRegistryObserver observer( 41 extensions::TestExtensionRegistryObserver observer(
40 extensions::ExtensionRegistry::Get(browser()->profile())); 42 extensions::ExtensionRegistry::Get(browser()->profile()));
41 43
42 scoped_ptr<ExtensionInstallPrompt> client(new ExtensionInstallPrompt( 44 scoped_ptr<ExtensionInstallPrompt> client(new ExtensionInstallPrompt(
43 browser()->tab_strip_model()->GetActiveWebContents())); 45 browser()->tab_strip_model()->GetActiveWebContents()));
44 scoped_refptr<extensions::CrxInstaller> installer( 46 scoped_refptr<extensions::CrxInstaller> installer(
45 extensions::CrxInstaller::Create(service, client.Pass())); 47 extensions::CrxInstaller::Create(service, std::move(client)));
46 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION); 48 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION);
47 installer->InstallCrx(path); 49 installer->InstallCrx(path);
48 50
49 observer.WaitForExtensionLoaded(); 51 observer.WaitForExtensionLoaded();
50 } 52 }
51 }; 53 };
52 54
53 IN_PROC_BROWSER_TEST_F(InfoBarsTest, TestInfoBarsCloseOnNewTheme) { 55 IN_PROC_BROWSER_TEST_F(InfoBarsTest, TestInfoBarsCloseOnNewTheme) {
54 extensions::ScopedTestDialogAutoConfirm auto_confirm( 56 extensions::ScopedTestDialogAutoConfirm auto_confirm(
55 extensions::ScopedTestDialogAutoConfirm::ACCEPT); 57 extensions::ScopedTestDialogAutoConfirm::ACCEPT);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 content::WindowedNotificationObserver infobar_removed_2( 94 content::WindowedNotificationObserver infobar_removed_2(
93 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 95 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
94 content::NotificationService::AllSources()); 96 content::NotificationService::AllSources());
95 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); 97 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme();
96 infobar_removed_2.Wait(); 98 infobar_removed_2.Wait();
97 EXPECT_EQ(0u, 99 EXPECT_EQ(0u,
98 InfoBarService::FromWebContents( 100 InfoBarService::FromWebContents(
99 browser()->tab_strip_model()->GetActiveWebContents())-> 101 browser()->tab_strip_model()->GetActiveWebContents())->
100 infobar_count()); 102 infobar_count());
101 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698