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

Side by Side Diff: chrome/browser/extensions/api/streams_private/streams_resource_throttle_unittest.cc

Issue 12381035: Move Mime type handling to streamsPrivate API, so that it works on Desktop Chrome. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix base files Created 7 years, 9 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/chromeos/extensions/file_browser_handler.h" 6 #include "chrome/browser/extensions/api/streams_private/streams_resource_throttl e.h"
7 #include "chrome/browser/chromeos/extensions/file_browser_resource_throttle.h"
8 #include "chrome/browser/extensions/extension_info_map.h" 7 #include "chrome/browser/extensions/extension_info_map.h"
9 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
10 #include "chrome/common/extensions/extension_builder.h" 9 #include "chrome/common/extensions/extension_builder.h"
11 #include "chrome/common/extensions/extension_constants.h" 10 #include "chrome/common/extensions/extension_constants.h"
12 #include "chrome/common/extensions/extension_manifest_constants.h" 11 #include "chrome/common/extensions/extension_manifest_constants.h"
13 #include "chrome/common/extensions/manifest_handler.h" 12 #include "chrome/common/extensions/manifest_handler.h"
13 #include "chrome/common/extensions/mime_types_handler.h"
14 #include "chrome/common/extensions/value_builder.h" 14 #include "chrome/common/extensions/value_builder.h"
15 #include "content/public/browser/resource_controller.h" 15 #include "content/public/browser/resource_controller.h"
16 #include "content/public/test/test_browser_thread.h" 16 #include "content/public/test/test_browser_thread.h"
17 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 using content::BrowserThread; 20 using content::BrowserThread;
21 using extensions::DictionaryBuilder; 21 using extensions::DictionaryBuilder;
22 using extensions::Extension; 22 using extensions::Extension;
23 using extensions::ExtensionBuilder; 23 using extensions::ExtensionBuilder;
24 using extensions::ListBuilder; 24 using extensions::ListBuilder;
25 using testing::_; 25 using testing::_;
26 26
27 namespace { 27 namespace {
28 28
29 // Mock file browser handler event router to be used in the test. 29 // Mock file browser handler event router to be used in the test.
30 class MockFileBrowserHandlerEventRouter 30 class MockStreamsPrivateEventRouter
31 : public FileBrowserResourceThrottle::FileBrowserHandlerEventRouter { 31 : public StreamsResourceThrottle::StreamsPrivateEventRouter {
32 public: 32 public:
33 virtual ~MockFileBrowserHandlerEventRouter() {} 33 virtual ~MockStreamsPrivateEventRouter() {}
34 34
35 MOCK_METHOD5(DispatchMimeTypeHandlerEvent, 35 MOCK_METHOD5(DispatchMimeTypeHandlerEvent,
36 void(int render_process_id, 36 void(int render_process_id,
37 int render_process_view, 37 int render_process_view,
38 const std::string& mime_type, 38 const std::string& mime_type,
39 const GURL& request_url, 39 const GURL& request_url,
40 const std::string& extension_id)); 40 const std::string& extension_id));
41 }; 41 };
42 42
43 // Resource controller to be used in the tests. 43 // Resource controller to be used in the tests.
44 class MockResourceController : public content::ResourceController { 44 class MockResourceController : public content::ResourceController {
45 public: 45 public:
46 virtual ~MockResourceController() {} 46 virtual ~MockResourceController() {}
47 MOCK_METHOD0(Cancel, void()); 47 MOCK_METHOD0(Cancel, void());
48 MOCK_METHOD0(CancelAndIgnore, void()); 48 MOCK_METHOD0(CancelAndIgnore, void());
49 MOCK_METHOD1(CancelWithError, void(int error_code)); 49 MOCK_METHOD1(CancelWithError, void(int error_code));
50 MOCK_METHOD0(Resume, void()); 50 MOCK_METHOD0(Resume, void());
51 }; 51 };
52 52
53 class FileBrowserResourceThrottleTest : public testing::Test { 53 class StreamsResourceThrottleTest : public testing::Test {
54 public: 54 public:
55 typedef FileBrowserResourceThrottle::FileBrowserHandlerEventRouter 55 typedef StreamsResourceThrottle::StreamsPrivateEventRouter
56 HandlerEventRouter; 56 HandlerEventRouter;
57 57
58 FileBrowserResourceThrottleTest() 58 StreamsResourceThrottleTest()
59 : test_extension_id_("test_extension_id"), 59 : test_extension_id_("test_extension_id"),
60 test_render_process_id_(2), 60 test_render_process_id_(2),
61 test_render_view_id_(12), 61 test_render_view_id_(12),
62 test_request_url_("http://some_url/file.txt"), 62 test_request_url_("http://some_url/file.txt"),
63 ui_thread_(content::BrowserThread::UI, &message_loop_), 63 ui_thread_(content::BrowserThread::UI, &message_loop_),
64 io_thread_(content::BrowserThread::IO, &message_loop_) { 64 io_thread_(content::BrowserThread::IO, &message_loop_) {
65 } 65 }
66 66
67 virtual ~FileBrowserResourceThrottleTest() {} 67 virtual ~StreamsResourceThrottleTest() {}
68 68
69 virtual void SetUp() { 69 virtual void SetUp() {
70 extensions::ManifestHandler::Register( 70 extensions::ManifestHandler::Register(
71 extension_manifest_keys::kFileBrowserHandlers, 71 extension_manifest_keys::kMIMETypes,
72 make_linked_ptr(new FileBrowserHandlerParser)); 72 make_linked_ptr(new MimeTypesHandlerParser));
73 // Extension info map must be created before |CreateAndInstallTestExtension| 73 // Extension info map must be created before |CreateAndInstallTestExtension|
74 // is called (the method will add created extension to the info map). 74 // is called (the method will add created extension to the info map).
75 extension_info_map_ = new ExtensionInfoMap(); 75 extension_info_map_ = new ExtensionInfoMap();
76 CreateAndInstallTestExtension(); 76 CreateAndInstallTestExtension();
77 InitResourceController(); 77 InitResourceController();
78 } 78 }
79 79
80 virtual void TearDown() { 80 virtual void TearDown() {
81 FileBrowserHandler::set_extension_whitelisted_for_test(NULL); 81 MimeTypesHandler::set_extension_whitelisted_for_test(NULL);
82 } 82 }
83 83
84 protected: 84 protected:
85 // Creates the test extension, and adds it to the |extension_info_map_|. 85 // Creates the test extension, and adds it to the |extension_info_map_|.
86 // The extension has separate file browser handlers that can handle 86 // The extension has separate file browser handlers that can handle
87 // 'plain/html' and 'plain/text' MIME types. 87 // 'plain/html' and 'plain/text' MIME types.
88 void CreateAndInstallTestExtension() { 88 void CreateAndInstallTestExtension() {
89 // The extension must be white-listed in order to be successfully created. 89 // The extension must be white-listed in order to be successfully created.
90 FileBrowserHandler::set_extension_whitelisted_for_test( 90 MimeTypesHandler::set_extension_whitelisted_for_test(
91 &test_extension_id_); 91 &test_extension_id_);
92 92
93 extension_ = 93 extension_ =
94 ExtensionBuilder() 94 ExtensionBuilder()
95 .SetManifest(DictionaryBuilder() 95 .SetManifest(DictionaryBuilder()
96 .Set("name", "file browser handler test") 96 .Set("name", "file browser handler test")
97 .Set("version", "1.0.0") 97 .Set("version", "1.0.0")
98 .Set("manifest_version", 2) 98 .Set("manifest_version", 2)
99 .Set("file_browser_handlers", ListBuilder() 99 .Set("mime_types", ListBuilder()
100 .Append(DictionaryBuilder() 100 .Append("random/mime1")
101 // Handler that handles 'plain/html', among others. 101 .Append("random/mime2")
102 .Set("id", "ID_handle_html") 102 .Append("plain/html")
103 .Set("default_title", "Default title") 103 .Append("plain/text")))
104 .Set("default_icon", "icon.png")
105 // file_filters_field is mandatory, even though
106 // it's not used in the tests.
107 .Set("file_filters", ListBuilder()
108 .Append("filesystem:*.html"))
109 .Set("mime_types", ListBuilder()
110 .Append("random/mime1")
111 .Append("random/mime2")
112 .Append("plain/html")))
113 .Append(DictionaryBuilder()
114 // Handler that handles only 'plain/text'.
115 .Set("id", "ID_handle_text")
116 .Set("default_title", "Default title")
117 .Set("default_icon", "icon.png")
118 // file_filters_field is mandatory, even though
119 // it's not used in the tests.
120 .Set("file_filters", ListBuilder()
121 .Append("filesystem:*.txt"))
122 .Set("mime_types", ListBuilder()
123 .Append("plain/text")))))
124 .SetID(test_extension_id_) 104 .SetID(test_extension_id_)
125 .Build(); 105 .Build();
126 106
127 // 'Install' the extension. 107 // 'Install' the extension.
128 extension_info_map_->AddExtension(extension_, 108 extension_info_map_->AddExtension(extension_,
129 base::Time(), // install time 109 base::Time(), // install time
130 true); // enable_incognito 110 true); // enable_incognito
131 } 111 }
132 112
133 // Initiates the default mock_resource_controller_ expectations. 113 // Initiates the default mock_resource_controller_ expectations.
(...skipping 16 matching lines...) Expand all
150 test_extension_id_, extension_misc::UNLOAD_REASON_UNINSTALL); 130 test_extension_id_, extension_misc::UNLOAD_REASON_UNINSTALL);
151 extension_info_map_->AddExtension(extension_, 131 extension_info_map_->AddExtension(extension_,
152 base::Time(), // install_time 132 base::Time(), // install_time
153 false); // enable incognito 133 false); // enable incognito
154 } 134 }
155 135
156 // Creates the resource throttle that should be tested. 136 // Creates the resource throttle that should be tested.
157 // It's setup with |mock_event_router| passed to the method and 137 // It's setup with |mock_event_router| passed to the method and
158 // |mock_resource_throttle_|. 138 // |mock_resource_throttle_|.
159 // |mock_event_router|'s expectations must be set before calling this method. 139 // |mock_event_router|'s expectations must be set before calling this method.
160 scoped_ptr<FileBrowserResourceThrottle> CreateThrottleToTest( 140 scoped_ptr<StreamsResourceThrottle> CreateThrottleToTest(
161 bool is_incognito, 141 bool is_incognito,
162 scoped_ptr<MockFileBrowserHandlerEventRouter> mock_event_router, 142 scoped_ptr<MockStreamsPrivateEventRouter> mock_event_router,
163 const std::string& mime_type) { 143 const std::string& mime_type) {
164 scoped_ptr<HandlerEventRouter> event_router(mock_event_router.release()); 144 scoped_ptr<HandlerEventRouter> event_router(mock_event_router.release());
165 scoped_ptr<FileBrowserResourceThrottle> test_throttle( 145 scoped_ptr<StreamsResourceThrottle> test_throttle(
166 FileBrowserResourceThrottle::CreateForTest(test_render_process_id_, 146 StreamsResourceThrottle::CreateForTest(test_render_process_id_,
167 test_render_view_id_, 147 test_render_view_id_,
168 mime_type, 148 mime_type,
169 test_request_url_, 149 test_request_url_,
170 is_incognito, 150 is_incognito,
171 extension_info_map_.get(), 151 extension_info_map_.get(),
172 event_router.Pass())); 152 event_router.Pass()));
173 153
174 test_throttle->set_controller_for_testing(&mock_resource_controller_); 154 test_throttle->set_controller_for_testing(&mock_resource_controller_);
175 155
176 return test_throttle.Pass(); 156 return test_throttle.Pass();
177 } 157 }
178 158
179 // The test extension's id. 159 // The test extension's id.
180 std::string test_extension_id_; 160 std::string test_extension_id_;
181 // The test extension. 161 // The test extension.
182 scoped_refptr<const Extension> extension_; 162 scoped_refptr<const Extension> extension_;
(...skipping 13 matching lines...) Expand all
196 private: 176 private:
197 // ExtensionInfoMap needs IO thread. 177 // ExtensionInfoMap needs IO thread.
198 MessageLoop message_loop_; 178 MessageLoop message_loop_;
199 content::TestBrowserThread ui_thread_; 179 content::TestBrowserThread ui_thread_;
200 content::TestBrowserThread io_thread_; 180 content::TestBrowserThread io_thread_;
201 }; 181 };
202 182
203 // Tests that the request gets canceled (mock_resource_controller_.Cancel() is 183 // Tests that the request gets canceled (mock_resource_controller_.Cancel() is
204 // called) and the event_router is invoked when a white-listed extension has a 184 // called) and the event_router is invoked when a white-listed extension has a
205 // file browser handler that can handle the request's MIME type. 185 // file browser handler that can handle the request's MIME type.
206 TEST_F(FileBrowserResourceThrottleTest, HandlerWhiteListed) { 186 TEST_F(StreamsResourceThrottleTest, HandlerWhiteListed) {
207 EXPECT_CALL(mock_resource_controller_, CancelAndIgnore()).Times(1); 187 EXPECT_CALL(mock_resource_controller_, CancelAndIgnore()).Times(1);
208 188
209 scoped_ptr<MockFileBrowserHandlerEventRouter> mock_event_router( 189 scoped_ptr<MockStreamsPrivateEventRouter> mock_event_router(
210 new MockFileBrowserHandlerEventRouter()); 190 new MockStreamsPrivateEventRouter());
211 EXPECT_CALL(*mock_event_router, 191 EXPECT_CALL(*mock_event_router,
212 DispatchMimeTypeHandlerEvent(test_render_process_id_, 192 DispatchMimeTypeHandlerEvent(test_render_process_id_,
213 test_render_view_id_, 193 test_render_view_id_,
214 "plain/html", 194 "plain/html",
215 test_request_url_, 195 test_request_url_,
216 test_extension_id_)) 196 test_extension_id_))
217 .Times(1); 197 .Times(1);
218 198
219 scoped_ptr<FileBrowserResourceThrottle> throttle( 199 scoped_ptr<StreamsResourceThrottle> throttle(
220 CreateThrottleToTest(false, mock_event_router.Pass(), "plain/html")); 200 CreateThrottleToTest(false, mock_event_router.Pass(), "plain/html"));
221 201
222 bool defer = false; 202 bool defer = false;
223 throttle->WillProcessResponse(&defer); 203 throttle->WillProcessResponse(&defer);
224 EXPECT_FALSE(defer); 204 EXPECT_FALSE(defer);
225 } 205 }
226 206
227 // Tests that the request gets canceled (mock_resource_controller_.Cancel() is 207 // Tests that the request gets canceled (mock_resource_controller_.Cancel() is
228 // called) and the event_router is invoked when a white-listed extension has a 208 // called) and the event_router is invoked when a white-listed extension has a
229 // file browser handler that can handle the request's MIME type, even when the 209 // file browser handler that can handle the request's MIME type, even when the
230 // file browser handler is not first in the extension's file browser handler 210 // file browser handler is not first in the extension's file browser handler
231 // list. 211 // list.
232 TEST_F(FileBrowserResourceThrottleTest, SecondHandlerWhiteListed) { 212 TEST_F(StreamsResourceThrottleTest, SecondHandlerWhiteListed) {
233 EXPECT_CALL(mock_resource_controller_, CancelAndIgnore()).Times(1); 213 EXPECT_CALL(mock_resource_controller_, CancelAndIgnore()).Times(1);
234 214
235 scoped_ptr<MockFileBrowserHandlerEventRouter> mock_event_router( 215 scoped_ptr<MockStreamsPrivateEventRouter> mock_event_router(
236 new MockFileBrowserHandlerEventRouter()); 216 new MockStreamsPrivateEventRouter());
237 EXPECT_CALL(*mock_event_router, 217 EXPECT_CALL(*mock_event_router,
238 DispatchMimeTypeHandlerEvent(test_render_process_id_, 218 DispatchMimeTypeHandlerEvent(test_render_process_id_,
239 test_render_view_id_, 219 test_render_view_id_,
240 "plain/text", 220 "plain/text",
241 test_request_url_, 221 test_request_url_,
242 test_extension_id_)) 222 test_extension_id_))
243 .Times(1); 223 .Times(1);
244 224
245 scoped_ptr<FileBrowserResourceThrottle> throttle( 225 scoped_ptr<StreamsResourceThrottle> throttle(
246 CreateThrottleToTest(false, mock_event_router.Pass(), "plain/text")); 226 CreateThrottleToTest(false, mock_event_router.Pass(), "plain/text"));
247 227
248 bool defer = false; 228 bool defer = false;
249 throttle->WillProcessResponse(&defer); 229 throttle->WillProcessResponse(&defer);
250 EXPECT_FALSE(defer); 230 EXPECT_FALSE(defer);
251 } 231 }
252 232
253 // Tests that the request is not canceled and the event router is not invoked 233 // Tests that the request is not canceled and the event router is not invoked
254 // if there is no file browser handlers registered for the request's MIME type. 234 // if there is no file browser handlers registered for the request's MIME type.
255 TEST_F(FileBrowserResourceThrottleTest, NoWhiteListedHandler) { 235 TEST_F(StreamsResourceThrottleTest, NoWhiteListedHandler) {
256 scoped_ptr<MockFileBrowserHandlerEventRouter> mock_event_router( 236 scoped_ptr<MockStreamsPrivateEventRouter> mock_event_router(
257 new MockFileBrowserHandlerEventRouter()); 237 new MockStreamsPrivateEventRouter());
258 EXPECT_CALL(*mock_event_router, DispatchMimeTypeHandlerEvent(_, _, _, _, _)) 238 EXPECT_CALL(*mock_event_router, DispatchMimeTypeHandlerEvent(_, _, _, _, _))
259 .Times(0); 239 .Times(0);
260 240
261 scoped_ptr<FileBrowserResourceThrottle> throttle( 241 scoped_ptr<StreamsResourceThrottle> throttle(
262 CreateThrottleToTest(false, mock_event_router.Pass(), 242 CreateThrottleToTest(false, mock_event_router.Pass(),
263 "random_mime_type")); 243 "random_mime_type"));
264 244
265 bool defer = false; 245 bool defer = false;
266 throttle->WillProcessResponse(&defer); 246 throttle->WillProcessResponse(&defer);
267 EXPECT_FALSE(defer); 247 EXPECT_FALSE(defer);
268 } 248 }
269 249
270 // Tests that the request is not canceled and the event router is not invoked 250 // Tests that the request is not canceled and the event router is not invoked
271 // if there is an extension with the file browser handler that can handle the 251 // if there is an extension with the file browser handler that can handle the
272 // request's MIME type, but the extension is disabled. 252 // request's MIME type, but the extension is disabled.
273 TEST_F(FileBrowserResourceThrottleTest, HandlerWhiteListedAndDisabled) { 253 TEST_F(StreamsResourceThrottleTest, HandlerWhiteListedAndDisabled) {
274 DisableTestExtension(); 254 DisableTestExtension();
275 255
276 scoped_ptr<MockFileBrowserHandlerEventRouter> mock_event_router( 256 scoped_ptr<MockStreamsPrivateEventRouter> mock_event_router(
277 new MockFileBrowserHandlerEventRouter()); 257 new MockStreamsPrivateEventRouter());
278 EXPECT_CALL(*mock_event_router, DispatchMimeTypeHandlerEvent(_, _, _, _, _)) 258 EXPECT_CALL(*mock_event_router, DispatchMimeTypeHandlerEvent(_, _, _, _, _))
279 .Times(0); 259 .Times(0);
280 260
281 scoped_ptr<FileBrowserResourceThrottle> throttle( 261 scoped_ptr<StreamsResourceThrottle> throttle(
282 CreateThrottleToTest(false, mock_event_router.Pass(), "plain/text")); 262 CreateThrottleToTest(false, mock_event_router.Pass(), "plain/text"));
283 263
284 bool defer = false; 264 bool defer = false;
285 throttle->WillProcessResponse(&defer); 265 throttle->WillProcessResponse(&defer);
286 EXPECT_FALSE(defer); 266 EXPECT_FALSE(defer);
287 } 267 }
288 268
289 // Tests that the request is not canceled and the event router is not invoked 269 // Tests that the request is not canceled and the event router is not invoked
290 // in incognito mode if the extension that handles the request's MIME type is 270 // in incognito mode if the extension that handles the request's MIME type is
291 // not incognito enabled. 271 // not incognito enabled.
292 TEST_F(FileBrowserResourceThrottleTest, IncognitoExtensionNotEnabled) { 272 TEST_F(StreamsResourceThrottleTest, IncognitoExtensionNotEnabled) {
293 ReloadTestExtensionIncognitoDisabled(); 273 ReloadTestExtensionIncognitoDisabled();
294 274
295 scoped_ptr<MockFileBrowserHandlerEventRouter> mock_event_router( 275 scoped_ptr<MockStreamsPrivateEventRouter> mock_event_router(
296 new MockFileBrowserHandlerEventRouter()); 276 new MockStreamsPrivateEventRouter());
297 EXPECT_CALL(*mock_event_router, DispatchMimeTypeHandlerEvent(_, _, _, _, _)) 277 EXPECT_CALL(*mock_event_router, DispatchMimeTypeHandlerEvent(_, _, _, _, _))
298 .Times(0); 278 .Times(0);
299 279
300 scoped_ptr<FileBrowserResourceThrottle> throttle( 280 scoped_ptr<StreamsResourceThrottle> throttle(
301 CreateThrottleToTest(true, mock_event_router.Pass(), "plain/text")); 281 CreateThrottleToTest(true, mock_event_router.Pass(), "plain/text"));
302 282
303 bool defer = false; 283 bool defer = false;
304 throttle->WillProcessResponse(&defer); 284 throttle->WillProcessResponse(&defer);
305 EXPECT_FALSE(defer); 285 EXPECT_FALSE(defer);
306 } 286 }
307 287
308 // Tests that the request gets canceled (mock_resource_controller_.Cancel() is 288 // Tests that the request gets canceled (mock_resource_controller_.Cancel() is
309 // called) and the event_router is invoked in incognito when a white-listed 289 // called) and the event_router is invoked in incognito when a white-listed
310 // extension that handles request's MIME type is incognito enabled. 290 // extension that handles request's MIME type is incognito enabled.
311 TEST_F(FileBrowserResourceThrottleTest, IncognitoExtensionEnabled) { 291 TEST_F(StreamsResourceThrottleTest, IncognitoExtensionEnabled) {
312 EXPECT_CALL(mock_resource_controller_, CancelAndIgnore()).Times(1); 292 EXPECT_CALL(mock_resource_controller_, CancelAndIgnore()).Times(1);
313 293
314 scoped_ptr<MockFileBrowserHandlerEventRouter> mock_event_router( 294 scoped_ptr<MockStreamsPrivateEventRouter> mock_event_router(
315 new MockFileBrowserHandlerEventRouter()); 295 new MockStreamsPrivateEventRouter());
316 EXPECT_CALL(*mock_event_router, 296 EXPECT_CALL(*mock_event_router,
317 DispatchMimeTypeHandlerEvent(test_render_process_id_, 297 DispatchMimeTypeHandlerEvent(test_render_process_id_,
318 test_render_view_id_, 298 test_render_view_id_,
319 "plain/html", 299 "plain/html",
320 test_request_url_, 300 test_request_url_,
321 test_extension_id_)) 301 test_extension_id_))
322 .Times(1); 302 .Times(1);
323 303
324 scoped_ptr<FileBrowserResourceThrottle> throttle( 304 scoped_ptr<StreamsResourceThrottle> throttle(
325 CreateThrottleToTest(true, mock_event_router.Pass(), "plain/html")); 305 CreateThrottleToTest(true, mock_event_router.Pass(), "plain/html"));
326 306
327 bool defer = false; 307 bool defer = false;
328 throttle->WillProcessResponse(&defer); 308 throttle->WillProcessResponse(&defer);
329 EXPECT_FALSE(defer); 309 EXPECT_FALSE(defer);
330 } 310 }
331 311
332 } // namespace 312 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698