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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 <sstream> 5 #include <sstream>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram_base.h" 8 #include "base/metrics/histogram_base.h"
9 #include "base/metrics/histogram_samples.h" 9 #include "base/metrics/histogram_samples.h"
10 #include "base/metrics/statistics_recorder.h" 10 #include "base/metrics/statistics_recorder.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void SetUpInProcessBrowserTestFixture() override { 259 void SetUpInProcessBrowserTestFixture() override {
260 chrome::EnableQueryExtractionForTesting(); 260 chrome::EnableQueryExtractionForTesting();
261 ASSERT_TRUE(https_test_server().Start()); 261 ASSERT_TRUE(https_test_server().Start());
262 GURL instant_url = https_test_server().GetURL( 262 GURL instant_url = https_test_server().GetURL(
263 "files/instant_extended.html?strk=1&"); 263 "files/instant_extended.html?strk=1&");
264 GURL ntp_url = https_test_server().GetURL( 264 GURL ntp_url = https_test_server().GetURL(
265 "files/instant_extended_ntp.html?strk=1&"); 265 "files/instant_extended_ntp.html?strk=1&");
266 InstantTestBase::Init(instant_url, ntp_url, true); 266 InstantTestBase::Init(instant_url, ntp_url, true);
267 } 267 }
268 268
269 void SetUpCommandLine(CommandLine* command_line) override { 269 void SetUpCommandLine(base::CommandLine* command_line) override {
270 command_line->AppendSwitchASCII( 270 command_line->AppendSwitchASCII(
271 switches::kForceFieldTrials, 271 switches::kForceFieldTrials,
272 "EmbeddedSearch/Group11 prefetch_results_srp:1/"); 272 "EmbeddedSearch/Group11 prefetch_results_srp:1/");
273 } 273 }
274 274
275 net::FakeURLFetcherFactory* fake_factory() { return fake_factory_.get(); } 275 net::FakeURLFetcherFactory* fake_factory() { return fake_factory_.get(); }
276 276
277 private: 277 private:
278 // Used to instantiate FakeURLFetcherFactory. 278 // Used to instantiate FakeURLFetcherFactory.
279 scoped_ptr<net::URLFetcherImplFactory> factory_; 279 scoped_ptr<net::URLFetcherImplFactory> factory_;
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 stream << "link.href = \"" << result_url.spec() << "\";"; 969 stream << "link.href = \"" << result_url.spec() << "\";";
970 stream << "document.body.appendChild(link);"; 970 stream << "document.body.appendChild(link);";
971 stream << "link.click();"; 971 stream << "link.click();";
972 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); 972 EXPECT_TRUE(content::ExecuteScript(contents, stream.str()));
973 973
974 content::WaitForLoadStop(contents); 974 content::WaitForLoadStop(contents);
975 std::string expected_title = 975 std::string expected_title =
976 "Referrer is " + instant_url().GetWithEmptyPath().spec(); 976 "Referrer is " + instant_url().GetWithEmptyPath().spec();
977 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); 977 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle());
978 } 978 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/password_manager_presenter.cc ('k') | chrome/browser/ui/settings_window_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698