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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/metrics/field_trial.h" 13 #include "base/metrics/field_trial.h"
14 #include "base/prefs/pref_registry_simple.h"
15 #include "base/prefs/pref_service.h"
16 #include "base/prefs/testing_pref_service.h"
17 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
18 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
19 #include "chrome/browser/sync/profile_sync_service_factory.h" 16 #include "chrome/browser/sync/profile_sync_service_factory.h"
20 #include "chrome/browser/sync/profile_sync_test_util.h" 17 #include "chrome/browser/sync/profile_sync_test_util.h"
21 #include "chrome/common/channel_info.h" 18 #include "chrome/common/channel_info.h"
22 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
23 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
24 #include "components/autofill/content/common/autofill_messages.h" 21 #include "components/autofill/content/common/autofill_messages.h"
25 #include "components/password_manager/content/browser/password_manager_internals _service_factory.h" 22 #include "components/password_manager/content/browser/password_manager_internals _service_factory.h"
26 #include "components/password_manager/content/common/credential_manager_messages .h" 23 #include "components/password_manager/content/common/credential_manager_messages .h"
27 #include "components/password_manager/core/browser/credentials_filter.h" 24 #include "components/password_manager/core/browser/credentials_filter.h"
28 #include "components/password_manager/core/browser/log_manager.h" 25 #include "components/password_manager/core/browser/log_manager.h"
29 #include "components/password_manager/core/browser/log_receiver.h" 26 #include "components/password_manager/core/browser/log_receiver.h"
30 #include "components/password_manager/core/browser/log_router.h" 27 #include "components/password_manager/core/browser/log_router.h"
31 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h" 28 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h"
32 #include "components/password_manager/core/common/credential_manager_types.h" 29 #include "components/password_manager/core/common/credential_manager_types.h"
33 #include "components/password_manager/core/common/password_manager_features.h" 30 #include "components/password_manager/core/common/password_manager_features.h"
34 #include "components/password_manager/core/common/password_manager_pref_names.h" 31 #include "components/password_manager/core/common/password_manager_pref_names.h"
35 #include "components/password_manager/core/common/password_manager_switches.h" 32 #include "components/password_manager/core/common/password_manager_switches.h"
33 #include "components/prefs/pref_registry_simple.h"
34 #include "components/prefs/pref_service.h"
35 #include "components/prefs/testing_pref_service.h"
36 #include "components/syncable_prefs/testing_pref_service_syncable.h" 36 #include "components/syncable_prefs/testing_pref_service_syncable.h"
37 #include "components/version_info/version_info.h" 37 #include "components/version_info/version_info.h"
38 #include "content/public/browser/browser_context.h" 38 #include "content/public/browser/browser_context.h"
39 #include "content/public/browser/web_contents.h" 39 #include "content/public/browser/web_contents.h"
40 #include "content/public/test/mock_render_process_host.h" 40 #include "content/public/test/mock_render_process_host.h"
41 #include "testing/gmock/include/gmock/gmock.h" 41 #include "testing/gmock/include/gmock/gmock.h"
42 #include "testing/gtest/include/gtest/gtest.h" 42 #include "testing/gtest/include/gtest/gtest.h"
43 43
44 using content::BrowserContext; 44 using content::BrowserContext;
45 using content::WebContents; 45 using content::WebContents;
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 PasswordManagerInternalsServiceFactory::GetForBrowserContext(profile()); 347 PasswordManagerInternalsServiceFactory::GetForBrowserContext(profile());
348 DummyLogReceiver log_receiver; 348 DummyLogReceiver log_receiver;
349 EXPECT_EQ(std::string(), log_router->RegisterReceiver(&log_receiver)); 349 EXPECT_EQ(std::string(), log_router->RegisterReceiver(&log_receiver));
350 350
351 // But then navigate to a WebUI, there the logging should not be active. 351 // But then navigate to a WebUI, there the logging should not be active.
352 NavigateAndCommit(GURL("about:password-manager-internals")); 352 NavigateAndCommit(GURL("about:password-manager-internals"));
353 EXPECT_FALSE(GetClient()->GetLogManager()->IsLoggingActive()); 353 EXPECT_FALSE(GetClient()->GetLogManager()->IsLoggingActive());
354 354
355 log_router->UnregisterReceiver(&log_receiver); 355 log_router->UnregisterReceiver(&log_receiver);
356 } 356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698