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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/custom_handlers/protocol_handler_registry.h" 5 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
13 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
14 #include "chrome/browser/prefs/pref_service_syncable.h"
15 #include "chrome/common/custom_handlers/protocol_handler.h" 14 #include "chrome/common/custom_handlers/protocol_handler.h"
16 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
17 #include "chrome/test/base/testing_browser_process.h" 16 #include "chrome/test/base/testing_browser_process.h"
18 #include "chrome/test/base/testing_profile.h" 17 #include "chrome/test/base/testing_profile.h"
19 #include "components/pref_registry/pref_registry_syncable.h" 18 #include "components/pref_registry/pref_registry_syncable.h"
19 #include "components/syncable_prefs/pref_service_syncable.h"
20 #include "content/public/browser/notification_observer.h" 20 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 21 #include "content/public/browser/notification_registrar.h"
22 #include "content/public/browser/notification_source.h" 22 #include "content/public/browser/notification_source.h"
23 #include "content/public/test/test_browser_thread.h" 23 #include "content/public/test/test_browser_thread.h"
24 #include "content/public/test/test_renderer_host.h" 24 #include "content/public/test/test_renderer_host.h"
25 #include "net/base/request_priority.h" 25 #include "net/base/request_priority.h"
26 #include "net/url_request/url_request.h" 26 #include "net/url_request/url_request.h"
27 #include "net/url_request/url_request_context.h" 27 #include "net/url_request/url_request_context.h"
28 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
29 29
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 // added to pref. 1122 // added to pref.
1123 ASSERT_EQ(InPrefIgnoredHandlerCount(), 2); 1123 ASSERT_EQ(InPrefIgnoredHandlerCount(), 2);
1124 ASSERT_EQ(InMemoryIgnoredHandlerCount(), 4); 1124 ASSERT_EQ(InMemoryIgnoredHandlerCount(), 4);
1125 1125
1126 registry()->RemoveIgnoredHandler(p2u1); 1126 registry()->RemoveIgnoredHandler(p2u1);
1127 1127
1128 // p2u1 installed by user and policy, so it is removed from pref alone. 1128 // p2u1 installed by user and policy, so it is removed from pref alone.
1129 ASSERT_EQ(InPrefIgnoredHandlerCount(), 1); 1129 ASSERT_EQ(InPrefIgnoredHandlerCount(), 1);
1130 ASSERT_EQ(InMemoryIgnoredHandlerCount(), 4); 1130 ASSERT_EQ(InMemoryIgnoredHandlerCount(), 4);
1131 } 1131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698