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

Side by Side Diff: content/browser/loader/resource_scheduler_unittest.cc

Issue 99533002: Disabled resource scheduling when using a SPDY proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved spdy proxy check to dispatcher as an explicit call when we start to get a response and added … Created 6 years, 11 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 "content/browser/loader/resource_scheduler.h" 5 #include "content/browser/loader/resource_scheduler.h"
6 6
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 TEST_F(ResourceSchedulerTest, NonHTTPSchedulesImmediately) { 458 TEST_F(ResourceSchedulerTest, NonHTTPSchedulesImmediately) {
459 // Dummies to enforce scheduling. 459 // Dummies to enforce scheduling.
460 scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST)); 460 scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
461 scoped_ptr<TestRequest> low(NewRequest("http://host/high", net::LOWEST)); 461 scoped_ptr<TestRequest> low(NewRequest("http://host/high", net::LOWEST));
462 462
463 scoped_ptr<TestRequest> request( 463 scoped_ptr<TestRequest> request(
464 NewRequest("chrome-extension://req", net::LOWEST)); 464 NewRequest("chrome-extension://req", net::LOWEST));
465 EXPECT_TRUE(request->started()); 465 EXPECT_TRUE(request->started());
466 } 466 }
467 467
468 TEST_F(ResourceSchedulerTest, SpdyProxySchedulesImmediately) {
469 scoped_ptr<TestRequest> high(NewRequest("http://host/high", net::HIGHEST));
470 scoped_ptr<TestRequest> low(NewRequest("http://host/low", net::LOWEST));
471
472 scoped_ptr<TestRequest> request(NewRequest("http://host/req", net::IDLE));
473 EXPECT_FALSE(request->started());
474
475 scheduler_.OnReceivedSpdyProxiedHttpResponse(kChildId, kRouteId);
476 EXPECT_TRUE(request->started());
477
478 scoped_ptr<TestRequest> after(NewRequest("http://host/after", net::IDLE));
479 EXPECT_TRUE(after->started());
480 }
481
468 } // unnamed namespace 482 } // unnamed namespace
469 483
470 } // namespace content 484 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698