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

Unified Diff: chrome/browser/extensions/network_delay_listener_unittest.cc

Issue 8314005: Initialize the NetworkDelayListener to allow requests rather than deny them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/network_delay_listener.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/network_delay_listener_unittest.cc
===================================================================
--- chrome/browser/extensions/network_delay_listener_unittest.cc (revision 105686)
+++ chrome/browser/extensions/network_delay_listener_unittest.cc (working copy)
@@ -141,14 +141,6 @@
MessageLoop::current()->RunAllPending();
}
- void SendExtensionsReadyNotification() {
- NotificationService::current()->Notify(
- chrome::NOTIFICATION_EXTENSIONS_READY,
- Source<Profile>(profile_.get()),
- NotificationService::NoDetails());
- MessageLoop::current()->RunAllPending();
- }
-
scoped_refptr<NetworkDelayListener> listener_;
// Weak reference.
@@ -234,29 +226,11 @@
MessageLoop::current()->RunAllPending();
}
-// Tests that the misleadingly named NOTIFICATION_EXTENSIONS_READY doesn't
-// release network requests.
-TEST_F(NetworkDelayListenerTest, ExtensionsReadyNotReady) {
- LoadTestExtension1();
-
- TestDelegate delegate;
- scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kTestUrl));
- ASSERT_FALSE(request->is_pending());
-
- SendExtensionsReadyNotification();
- ASSERT_FALSE(request->is_pending());
-
- SendExtensionLoadedNotification(extension1_);
- EXPECT_EQ(kTestData, delegate.data_received());
-}
-
// Tests that there's no delay if no loaded extension needs one.
TEST_F(NetworkDelayListenerTest, NoDelayNoWebRequest) {
LoadTestExtension(kTestExtensionNoNetworkDelay);
ASSERT_FALSE(service_->extensions()->empty());
- SendExtensionsReadyNotification();
-
TestDelegate delegate;
scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kTestUrl));
@@ -269,8 +243,6 @@
// Tests that there's no delay if no extensions are loaded.
TEST_F(NetworkDelayListenerTest, NoDelayNoExtensions) {
- SendExtensionsReadyNotification();
-
TestDelegate delegate;
scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kTestUrl));
« no previous file with comments | « chrome/browser/extensions/network_delay_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698