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

Side by Side Diff: Source/web/tests/AssociatedURLLoaderTest.cpp

Issue 23632004: Add encoded_data_length argument to didDownloadData delegate method (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | public/platform/WebURLLoaderClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 void didReceiveResponse(WebURLLoader* loader, const WebURLResponse& response ) 149 void didReceiveResponse(WebURLLoader* loader, const WebURLResponse& response )
150 { 150 {
151 m_didReceiveResponse = true; 151 m_didReceiveResponse = true;
152 m_actualResponse = WebURLResponse(response); 152 m_actualResponse = WebURLResponse(response);
153 EXPECT_EQ(m_expectedLoader, loader); 153 EXPECT_EQ(m_expectedLoader, loader);
154 EXPECT_EQ(m_expectedResponse.url(), response.url()); 154 EXPECT_EQ(m_expectedResponse.url(), response.url());
155 EXPECT_EQ(m_expectedResponse.httpStatusCode(), response.httpStatusCode() ); 155 EXPECT_EQ(m_expectedResponse.httpStatusCode(), response.httpStatusCode() );
156 } 156 }
157 157
158 void didDownloadData(WebURLLoader* loader, int dataLength) 158 void didDownloadData(WebURLLoader* loader, int dataLength, int encodedDataLe ngth)
159 { 159 {
160 m_didDownloadData = true; 160 m_didDownloadData = true;
161 EXPECT_EQ(m_expectedLoader, loader); 161 EXPECT_EQ(m_expectedLoader, loader);
162 } 162 }
163 163
164 void didReceiveData(WebURLLoader* loader, const char* data, int dataLength, int encodedDataLength) 164 void didReceiveData(WebURLLoader* loader, const char* data, int dataLength, int encodedDataLength)
165 { 165 {
166 m_didReceiveData = true; 166 m_didReceiveData = true;
167 EXPECT_EQ(m_expectedLoader, loader); 167 EXPECT_EQ(m_expectedLoader, loader);
168 EXPECT_TRUE(data); 168 EXPECT_TRUE(data);
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 m_expectedLoader->loadAsynchronously(request, this); 622 m_expectedLoader->loadAsynchronously(request, this);
623 serveRequests(); 623 serveRequests();
624 EXPECT_TRUE(m_didReceiveResponse); 624 EXPECT_TRUE(m_didReceiveResponse);
625 EXPECT_TRUE(m_didReceiveData); 625 EXPECT_TRUE(m_didReceiveData);
626 EXPECT_TRUE(m_didFinishLoading); 626 EXPECT_TRUE(m_didFinishLoading);
627 627
628 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); 628 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty());
629 } 629 }
630 630
631 } 631 }
OLDNEW
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | public/platform/WebURLLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698