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

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

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 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 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"
11 #include "base/prefs/testing_pref_service.h" 11 #include "base/prefs/testing_pref_service.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/browser/sync/profile_sync_service_factory.h" 14 #include "chrome/browser/sync/profile_sync_service_factory.h"
15 #include "chrome/browser/sync/profile_sync_service_mock.h" 15 #include "chrome/browser/sync/profile_sync_service_mock.h"
16 #include "chrome/common/channel_info.h" 16 #include "chrome/common/channel_info.h"
17 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 17 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
18 #include "chrome/test/base/testing_pref_service_syncable.h"
19 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
20 #include "components/autofill/content/common/autofill_messages.h" 19 #include "components/autofill/content/common/autofill_messages.h"
21 #include "components/password_manager/content/browser/password_manager_internals _service_factory.h" 20 #include "components/password_manager/content/browser/password_manager_internals _service_factory.h"
22 #include "components/password_manager/content/common/credential_manager_messages .h" 21 #include "components/password_manager/content/common/credential_manager_messages .h"
23 #include "components/password_manager/core/browser/credentials_filter.h" 22 #include "components/password_manager/core/browser/credentials_filter.h"
24 #include "components/password_manager/core/browser/log_receiver.h" 23 #include "components/password_manager/core/browser/log_receiver.h"
25 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h" 24 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h"
26 #include "components/password_manager/core/common/credential_manager_types.h" 25 #include "components/password_manager/core/common/credential_manager_types.h"
27 #include "components/password_manager/core/common/password_manager_pref_names.h" 26 #include "components/password_manager/core/common/password_manager_pref_names.h"
28 #include "components/password_manager/core/common/password_manager_switches.h" 27 #include "components/password_manager/core/common/password_manager_switches.h"
28 #include "components/syncable_prefs/testing_pref_service_syncable.h"
29 #include "components/version_info/version_info.h" 29 #include "components/version_info/version_info.h"
30 #include "content/public/browser/browser_context.h" 30 #include "content/public/browser/browser_context.h"
31 #include "content/public/browser/web_contents.h" 31 #include "content/public/browser/web_contents.h"
32 #include "content/public/test/mock_render_process_host.h" 32 #include "content/public/test/mock_render_process_host.h"
33 #include "testing/gmock/include/gmock/gmock.h" 33 #include "testing/gmock/include/gmock/gmock.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 35
36 using content::BrowserContext; 36 using content::BrowserContext;
37 using content::WebContents; 37 using content::WebContents;
38 using testing::Return; 38 using testing::Return;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 EXPECT_EQ(GURL::EmptyGURL(), GetClient()->GetLastCommittedEntryURL()); 460 EXPECT_EQ(GURL::EmptyGURL(), 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