| OLD | NEW |
| 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/json/json_file_value_serializer.h" | 6 #include "base/json/json_file_value_serializer.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
| 9 #include "chrome/browser/extensions/extension_service_unittest.h" | 9 #include "chrome/browser/extensions/extension_service_unittest.h" |
| 10 #include "chrome/browser/extensions/unpacked_installer.h" | 10 #include "chrome/browser/extensions/unpacked_installer.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 113 } |
| 114 | 114 |
| 115 private: | 115 private: |
| 116 DISALLOW_COPY_AND_ASSIGN(SimpleTestJobProtocolHandler); | 116 DISALLOW_COPY_AND_ASSIGN(SimpleTestJobProtocolHandler); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace | 119 } // namespace |
| 120 | 120 |
| 121 class UserScriptListenerTest : public ExtensionServiceTestBase { | 121 class UserScriptListenerTest : public ExtensionServiceTestBase { |
| 122 public: | 122 public: |
| 123 UserScriptListenerTest() { | 123 UserScriptListenerTest() : ExtensionServiceTestBase(MessageLoop::TYPE_IO) { |
| 124 net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler( | 124 net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler( |
| 125 "http", "google.com", | 125 "http", "google.com", |
| 126 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 126 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
| 127 new SimpleTestJobProtocolHandler())); | 127 new SimpleTestJobProtocolHandler())); |
| 128 net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler( | 128 net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler( |
| 129 "http", "example.com", | 129 "http", "example.com", |
| 130 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>( | 130 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>( |
| 131 new SimpleTestJobProtocolHandler())); | 131 new SimpleTestJobProtocolHandler())); |
| 132 } | 132 } |
| 133 | 133 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 MessageLoop::current()->RunUntilIdle(); | 342 MessageLoop::current()->RunUntilIdle(); |
| 343 | 343 |
| 344 bool defer = false; | 344 bool defer = false; |
| 345 throttle->WillStartRequest(&defer); | 345 throttle->WillStartRequest(&defer); |
| 346 ASSERT_FALSE(defer); | 346 ASSERT_FALSE(defer); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace | 349 } // namespace |
| 350 | 350 |
| 351 } // namespace extensions | 351 } // namespace extensions |
| OLD | NEW |