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

Side by Side Diff: chrome/browser/extensions/extension_webrequest_api_unittest.cc

Issue 7747018: Introduced the URLBlacklistManager, and wired it to various places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewed, rebased Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <queue> 5 #include <queue>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 9
10 #include "chrome/browser/extensions/extension_event_router_forwarder.h" 10 #include "chrome/browser/extensions/extension_event_router_forwarder.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 SentMessages sent_messages_; 78 SentMessages sent_messages_;
79 }; 79 };
80 80
81 class ExtensionWebRequestTest : public TestingBrowserProcessTest { 81 class ExtensionWebRequestTest : public TestingBrowserProcessTest {
82 protected: 82 protected:
83 virtual void SetUp() { 83 virtual void SetUp() {
84 event_router_ = new ExtensionEventRouterForwarder(); 84 event_router_ = new ExtensionEventRouterForwarder();
85 enable_referrers_.Init( 85 enable_referrers_.Init(
86 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL); 86 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL);
87 network_delegate_.reset(new ChromeNetworkDelegate( 87 network_delegate_.reset(new ChromeNetworkDelegate(
88 event_router_.get(), NULL, &profile_, &enable_referrers_)); 88 event_router_.get(), NULL, NULL, &profile_, &enable_referrers_));
89 context_ = new TestURLRequestContext(); 89 context_ = new TestURLRequestContext();
90 context_->set_network_delegate(network_delegate_.get()); 90 context_->set_network_delegate(network_delegate_.get());
91 } 91 }
92 92
93 MessageLoopForIO io_loop_; 93 MessageLoopForIO io_loop_;
94 TestingProfile profile_; 94 TestingProfile profile_;
95 TestDelegate delegate_; 95 TestDelegate delegate_;
96 BooleanPrefMember enable_referrers_; 96 BooleanPrefMember enable_referrers_;
97 TestIPCSender ipc_sender_; 97 TestIPCSender ipc_sender_;
98 scoped_refptr<ExtensionEventRouterForwarder> event_router_; 98 scoped_refptr<ExtensionEventRouterForwarder> event_router_;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 }; 323 };
324 324
325 class ExtensionWebRequestHeaderModificationTest : 325 class ExtensionWebRequestHeaderModificationTest :
326 public testing::TestWithParam<HeaderModificationTest> { 326 public testing::TestWithParam<HeaderModificationTest> {
327 protected: 327 protected:
328 virtual void SetUp() { 328 virtual void SetUp() {
329 event_router_ = new ExtensionEventRouterForwarder(); 329 event_router_ = new ExtensionEventRouterForwarder();
330 enable_referrers_.Init( 330 enable_referrers_.Init(
331 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL); 331 prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL);
332 network_delegate_.reset(new ChromeNetworkDelegate( 332 network_delegate_.reset(new ChromeNetworkDelegate(
333 event_router_.get(), NULL, &profile_, &enable_referrers_)); 333 event_router_.get(), NULL, NULL, &profile_, &enable_referrers_));
334 context_ = new TestURLRequestContext(); 334 context_ = new TestURLRequestContext();
335 context_->set_network_delegate(network_delegate_.get()); 335 context_->set_network_delegate(network_delegate_.get());
336 } 336 }
337 337
338 ScopedTestingBrowserProcess browser_process_; 338 ScopedTestingBrowserProcess browser_process_;
339 MessageLoopForIO io_loop_; 339 MessageLoopForIO io_loop_;
340 TestingProfile profile_; 340 TestingProfile profile_;
341 TestDelegate delegate_; 341 TestDelegate delegate_;
342 BooleanPrefMember enable_referrers_; 342 BooleanPrefMember enable_referrers_;
343 TestIPCSender ipc_sender_; 343 TestIPCSender ipc_sender_;
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 {"header2", "bar"} } 645 {"header2", "bar"} }
646 }, 646 },
647 }; 647 };
648 648
649 INSTANTIATE_TEST_CASE_P( 649 INSTANTIATE_TEST_CASE_P(
650 ExtensionWebRequest, 650 ExtensionWebRequest,
651 ExtensionWebRequestHeaderModificationTest, 651 ExtensionWebRequestHeaderModificationTest,
652 ::testing::ValuesIn(kTests)); 652 ::testing::ValuesIn(kTests));
653 653
654 } // namespace 654 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | chrome/browser/net/chrome_network_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698