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

Unified Diff: net/spdy/spdy_session_spdy3_unittest.cc

Issue 13009012: [SPDY] Refactor SpdySession's write queue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix use-after-free (crbug.com/230259) Created 7 years, 8 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 | « net/spdy/spdy_session_spdy2_unittest.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_spdy3_unittest.cc
diff --git a/net/spdy/spdy_session_spdy3_unittest.cc b/net/spdy/spdy_session_spdy3_unittest.cc
index 519f1d3e643dacc116dca89d3df0bff24cd8f014..a2a5dbabe0ee84a768bf3c898508278533471e54 100644
--- a/net/spdy/spdy_session_spdy3_unittest.cc
+++ b/net/spdy/spdy_session_spdy3_unittest.cc
@@ -120,39 +120,6 @@ class SpdySessionSpdy3Test : public PlatformTest {
HostPortProxyPair pair_;
};
-// Test the SpdyIOBuffer class.
-TEST_F(SpdySessionSpdy3Test, SpdyIOBuffer) {
- std::priority_queue<SpdyIOBuffer> queue_;
- const size_t kQueueSize = 100;
-
- // Insert items with random priority and increasing buffer size.
- for (size_t index = 0; index < kQueueSize; ++index) {
- queue_.push(SpdyIOBuffer(
- new IOBufferWithSize(index + 1),
- index + 1,
- static_cast<RequestPriority>(rand() % NUM_PRIORITIES),
- NULL));
- }
-
- EXPECT_EQ(kQueueSize, queue_.size());
-
- // Verify items come out with decreasing priority or FIFO order.
- RequestPriority last_priority = NUM_PRIORITIES;
- size_t last_size = 0;
- for (size_t index = 0; index < kQueueSize; ++index) {
- SpdyIOBuffer buffer = queue_.top();
- EXPECT_LE(buffer.priority(), last_priority);
- if (buffer.priority() < last_priority)
- last_size = 0;
- EXPECT_LT(last_size, buffer.size());
- last_priority = buffer.priority();
- last_size = buffer.size();
- queue_.pop();
- }
-
- EXPECT_EQ(0u, queue_.size());
-}
-
TEST_F(SpdySessionSpdy3Test, GoAway) {
session_deps_.host_resolver->set_synchronous_mode(true);
« no previous file with comments | « net/spdy/spdy_session_spdy2_unittest.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698