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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc

Issue 10500016: Move test_browser_thread.h from content\test to content\public\test. This way we can enforce that i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
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.h" 10 #include "base/message_loop.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/common/chrome_notification_types.h" 12 #include "chrome/common/chrome_notification_types.h"
13 #include "chrome/common/custom_handlers/protocol_handler.h" 13 #include "chrome/common/custom_handlers/protocol_handler.h"
14 #include "chrome/test/base/testing_browser_process.h" 14 #include "chrome/test/base/testing_browser_process.h"
15 #include "chrome/test/base/testing_pref_service.h" 15 #include "chrome/test/base/testing_pref_service.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
19 #include "content/public/browser/notification_source.h" 19 #include "content/public/browser/notification_source.h"
20 #include "content/test/test_browser_thread.h" 20 #include "content/public/test/test_browser_thread.h"
21 #include "content/test/test_browser_thread.h"
22 #include "content/test/test_renderer_host.h" 21 #include "content/test/test_renderer_host.h"
23 #include "net/url_request/url_request.h" 22 #include "net/url_request/url_request.h"
24 23
25 using content::BrowserThread; 24 using content::BrowserThread;
26 25
27 namespace { 26 namespace {
28 27
29 class FakeDelegate : public ProtocolHandlerRegistry::Delegate { 28 class FakeDelegate : public ProtocolHandlerRegistry::Delegate {
30 public: 29 public:
31 FakeDelegate() : force_os_failure_(false) {} 30 FakeDelegate() : force_os_failure_(false) {}
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 ASSERT_EQ(ph3.url().GetOrigin() == ph2.url().GetOrigin(), 805 ASSERT_EQ(ph3.url().GetOrigin() == ph2.url().GetOrigin(),
807 ph3.IsSameOrigin(ph2)); 806 ph3.IsSameOrigin(ph2));
808 } 807 }
809 808
810 TEST_F(ProtocolHandlerRegistryTest, TestInstallDefaultHandler) { 809 TEST_F(ProtocolHandlerRegistryTest, TestInstallDefaultHandler) {
811 ReloadProtocolHandlerRegistryAndInstallDefaultHandler(); 810 ReloadProtocolHandlerRegistryAndInstallDefaultHandler();
812 std::vector<std::string> protocols; 811 std::vector<std::string> protocols;
813 registry()->GetRegisteredProtocols(&protocols); 812 registry()->GetRegisteredProtocols(&protocols);
814 ASSERT_EQ(static_cast<size_t>(1), protocols.size()); 813 ASSERT_EQ(static_cast<size_t>(1), protocols.size());
815 } 814 }
OLDNEW
« no previous file with comments | « chrome/browser/cookies_tree_model_unittest.cc ('k') | chrome/browser/download/chrome_download_manager_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698