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

Unified Diff: content/child/resource_dispatcher_unittest.cc

Issue 2762953004: Remove inline small resource transfer experiment (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher_unittest.cc
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index d1462e3306a75c8b14139fada5ca69deb0b8ff53..76e31e089d356ea5bb13ad0055fbd57f8751e959 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -183,13 +183,6 @@ class ResourceDispatcherTest : public testing::Test, public IPC::Sender {
request_id, 0, data.length(), data.length())));
}
- void NotifyInlinedDataChunkReceived(int request_id,
- const std::vector<char>& data) {
- auto size = data.size();
- EXPECT_TRUE(dispatcher_->OnMessageReceived(
- ResourceMsg_InlinedDataChunkReceived(request_id, data, size)));
- }
-
void NotifyDataDownloaded(int request_id,
int decoded_length,
int encoded_data_length) {
@@ -283,34 +276,6 @@ TEST_F(ResourceDispatcherTest, RoundTrip) {
EXPECT_EQ(0u, queued_messages());
}
-// A simple request with an inline data response.
-TEST_F(ResourceDispatcherTest, ResponseWithInlinedData) {
- base::test::ScopedFeatureList scoped_feature_list;
- scoped_feature_list.InitAndEnableFeature(
- features::kOptimizeLoadingIPCForSmallResources);
-
- std::unique_ptr<ResourceRequest> request(CreateResourceRequest(false));
- TestRequestPeer::Context peer_context;
- StartAsync(std::move(request), NULL, &peer_context);
-
- int id = ConsumeRequestResource();
- EXPECT_EQ(0u, queued_messages());
-
- NotifyReceivedResponse(id);
- EXPECT_EQ(0u, queued_messages());
- EXPECT_TRUE(peer_context.received_response);
-
- std::vector<char> data(kTestPageContents,
- kTestPageContents + strlen(kTestPageContents));
- NotifyInlinedDataChunkReceived(id, data);
- EXPECT_EQ(0u, queued_messages());
-
- NotifyRequestComplete(id, strlen(kTestPageContents));
- EXPECT_EQ(kTestPageContents, peer_context.data);
- EXPECT_TRUE(peer_context.complete);
- EXPECT_EQ(0u, queued_messages());
-}
-
// Tests that the request IDs are straight when there are two interleaving
// requests.
TEST_F(ResourceDispatcherTest, MultipleRequests) {
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698