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

Unified Diff: chrome/browser/chromeos/login/eula_browsertest.cc

Issue 23625015: Consolidate TestURLFetcherFactory::SetFakeResponse (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Could have spelled it Cloud... Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/eula_browsertest.cc
diff --git a/chrome/browser/chromeos/login/eula_browsertest.cc b/chrome/browser/chromeos/login/eula_browsertest.cc
index 11a8cd4d05f466a8b75ec9c1949462dc02436af9..412ddb5c910f6518dd6829732620513f3eac642f 100644
--- a/chrome/browser/chromeos/login/eula_browsertest.cc
+++ b/chrome/browser/chromeos/login/eula_browsertest.cc
@@ -19,7 +19,8 @@ using ::testing::_;
namespace {
-const char kEULAURL[] = "https://www.google.com/intl/en-US/chrome/eula_text.html";
+const char kEULAURL[] =
akalin 2013/09/19 18:54:00 may as well change this to a const GURL -- static
Mattias Nissler (ping if slow) 2013/09/20 15:33:53 Makes sense, but suprisingly it's the first time I
akalin 2013/09/20 23:06:43 Consulted with other people, and I think you're ri
+ "https://www.google.com/intl/en-US/chrome/eula_text.html";
const char kFakeOnlineEULA[] = "No obligations at all";
const char kOfflineEULAWarning[] = "A copy of the Google Terms of Service";
@@ -56,7 +57,7 @@ IN_PROC_BROWSER_TEST_F(TermsOfServiceProcessBrowserTest, LoadOnline) {
NULL,
base::Bind(&TestURLFetcherCallback::CreateURLFetcher,
base::Unretained(&url_callback)));
- factory.SetFakeResponse(kEULAURL, kFakeOnlineEULA, true);
+ factory.SetFakeResponse(GURL(kEULAURL), kFakeOnlineEULA, true);
EXPECT_CALL(url_callback, OnRequestCreate(GURL(kEULAURL), _))
.Times(Exactly(1))
.WillRepeatedly(Invoke(AddMimeHeader));
@@ -76,7 +77,7 @@ IN_PROC_BROWSER_TEST_F(TermsOfServiceProcessBrowserTest, LoadOnline) {
// Make sure offline version is shown.
IN_PROC_BROWSER_TEST_F(TermsOfServiceProcessBrowserTest, LoadOffline) {
net::FakeURLFetcherFactory factory(NULL);
- factory.SetFakeResponse(kEULAURL, "", false);
+ factory.SetFakeResponse(GURL(kEULAURL), "", false);
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUITermsURL));
content::WebContents* web_contents =

Powered by Google App Engine
This is Rietveld 408576698