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

Side by Side Diff: chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/search/instant_service.h" 9 #include "chrome/browser/search/instant_service.h"
10 #include "chrome/browser/search/instant_service_factory.h" 10 #include "chrome/browser/search/instant_service_factory.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 bool IsGooglePage(content::WebContents* contents) { 85 bool IsGooglePage(content::WebContents* contents) {
86 bool is_google = false; 86 bool is_google = false;
87 if (!GetBoolFromJS(contents, "!!window.google", &is_google)) 87 if (!GetBoolFromJS(contents, "!!window.google", &is_google))
88 return false; 88 return false;
89 return is_google; 89 return is_google;
90 } 90 }
91 91
92 private: 92 private:
93 scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_; 93 scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_;
94 scoped_ptr<net::ScopedDefaultHostResolverProc> scoped_host_resolver_proc_; 94 std::unique_ptr<net::ScopedDefaultHostResolverProc>
95 scoped_ptr<net::NetworkChangeNotifier::DisableForTest> 95 scoped_host_resolver_proc_;
96 std::unique_ptr<net::NetworkChangeNotifier::DisableForTest>
96 disable_network_change_notifier_; 97 disable_network_change_notifier_;
97 }; 98 };
98 99
99 IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest, MANUAL_SearchesFromFakebox) { 100 IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest, MANUAL_SearchesFromFakebox) {
100 set_browser(browser()); 101 set_browser(browser());
101 102
102 FocusOmnibox(); 103 FocusOmnibox();
103 // Open a new tab page. 104 // Open a new tab page.
104 content::WindowedNotificationObserver observer( 105 content::WindowedNotificationObserver observer(
105 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 106 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 EXPECT_EQ("test", GetOmniboxText()); 143 EXPECT_EQ("test", GetOmniboxText());
143 EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state()); 144 EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state());
144 145
145 // Pressing enter should search for [test]. 146 // Pressing enter should search for [test].
146 const base::string16& search_title = 147 const base::string16& search_title =
147 base::ASCIIToUTF16("test - Google Search"); 148 base::ASCIIToUTF16("test - Google Search");
148 content::TitleWatcher title_watcher(active_tab, search_title); 149 content::TitleWatcher title_watcher(active_tab, search_title);
149 PressEnterAndWaitForNavigation(); 150 PressEnterAndWaitForNavigation();
150 EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle()); 151 EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle());
151 } 152 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_extended_interactive_uitest.cc ('k') | chrome/browser/ui/search/instant_page_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698