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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 void InlineLoginUIBrowserTest::EnableOneClick(bool enable) { 285 void InlineLoginUIBrowserTest::EnableOneClick(bool enable) {
286 PrefService* pref_service = browser()->profile()->GetPrefs(); 286 PrefService* pref_service = browser()->profile()->GetPrefs();
287 pref_service->SetBoolean(prefs::kReverseAutologinEnabled, enable); 287 pref_service->SetBoolean(prefs::kReverseAutologinEnabled, enable);
288 } 288 }
289 289
290 void InlineLoginUIBrowserTest::AddEmailToOneClickRejectedList( 290 void InlineLoginUIBrowserTest::AddEmailToOneClickRejectedList(
291 const std::string& email) { 291 const std::string& email) {
292 PrefService* pref_service = browser()->profile()->GetPrefs(); 292 PrefService* pref_service = browser()->profile()->GetPrefs();
293 ListPrefUpdate updater(pref_service, 293 ListPrefUpdate updater(pref_service,
294 prefs::kReverseAutologinRejectedEmailList); 294 prefs::kReverseAutologinRejectedEmailList);
295 updater->AppendIfNotPresent(base::MakeUnique<base::StringValue>(email)); 295 updater->AppendIfNotPresent(base::MakeUnique<base::Value>(email));
296 } 296 }
297 297
298 void InlineLoginUIBrowserTest::AllowSigninCookies(bool enable) { 298 void InlineLoginUIBrowserTest::AllowSigninCookies(bool enable) {
299 content_settings::CookieSettings* cookie_settings = 299 content_settings::CookieSettings* cookie_settings =
300 CookieSettingsFactory::GetForProfile(browser()->profile()).get(); 300 CookieSettingsFactory::GetForProfile(browser()->profile()).get();
301 cookie_settings->SetDefaultCookieSetting(enable ? CONTENT_SETTING_ALLOW 301 cookie_settings->SetDefaultCookieSetting(enable ? CONTENT_SETTING_ALLOW
302 : CONTENT_SETTING_BLOCK); 302 : CONTENT_SETTING_BLOCK);
303 } 303 }
304 304
305 void InlineLoginUIBrowserTest::SetAllowedUsernamePattern( 305 void InlineLoginUIBrowserTest::SetAllowedUsernamePattern(
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 content::WebContents* contents = 851 content::WebContents* contents =
852 browser()->tab_strip_model()->GetActiveWebContents(); 852 browser()->tab_strip_model()->GetActiveWebContents();
853 ASSERT_TRUE(content::ExecuteScript( 853 ASSERT_TRUE(content::ExecuteScript(
854 contents, "window.location.href = 'chrome://foo'")); 854 contents, "window.location.href = 'chrome://foo'"));
855 855
856 content::TestNavigationObserver navigation_observer(contents, 1); 856 content::TestNavigationObserver navigation_observer(contents, 1);
857 navigation_observer.Wait(); 857 navigation_observer.Wait();
858 858
859 EXPECT_EQ(GURL("about:blank"), contents->GetVisibleURL()); 859 EXPECT_EQ(GURL("about:blank"), contents->GetVisibleURL());
860 } 860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698