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

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client_unittest.cc

Issue 1309323004: Create a NavigationEntry for the initial blank page. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GetEntryCount, more tests Created 5 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 // Functionality disabled in Incognito mode also when manager itself is 450 // Functionality disabled in Incognito mode also when manager itself is
451 // enabled. 451 // enabled.
452 prefs()->SetUserPref(password_manager::prefs::kPasswordManagerSavingEnabled, 452 prefs()->SetUserPref(password_manager::prefs::kPasswordManagerSavingEnabled,
453 new base::FundamentalValue(true)); 453 new base::FundamentalValue(true));
454 EXPECT_FALSE(client->IsSavingAndFillingEnabledForCurrentPage()); 454 EXPECT_FALSE(client->IsSavingAndFillingEnabledForCurrentPage());
455 EXPECT_TRUE(client->IsFillingEnabledForCurrentPage()); 455 EXPECT_TRUE(client->IsFillingEnabledForCurrentPage());
456 profile()->ForceIncognito(false); 456 profile()->ForceIncognito(false);
457 } 457 }
458 458
459 TEST_F(ChromePasswordManagerClientTest, GetLastCommittedEntryURL_Empty) { 459 TEST_F(ChromePasswordManagerClientTest, GetLastCommittedEntryURL_Empty) {
460 EXPECT_EQ(GURL::EmptyGURL(), GetClient()->GetLastCommittedEntryURL()); 460 EXPECT_EQ(GURL(url::kAboutBlankURL), GetClient()->GetLastCommittedEntryURL());
461 } 461 }
462 462
463 TEST_F(ChromePasswordManagerClientTest, GetLastCommittedEntryURL) { 463 TEST_F(ChromePasswordManagerClientTest, GetLastCommittedEntryURL) {
464 GURL kUrl( 464 GURL kUrl(
465 "https://accounts.google.com/ServiceLogin?continue=" 465 "https://accounts.google.com/ServiceLogin?continue="
466 "https://passwords.google.com/settings&rart=123"); 466 "https://passwords.google.com/settings&rart=123");
467 NavigateAndCommit(kUrl); 467 NavigateAndCommit(kUrl);
468 EXPECT_EQ(kUrl, GetClient()->GetLastCommittedEntryURL()); 468 EXPECT_EQ(kUrl, GetClient()->GetLastCommittedEntryURL());
469 } 469 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698