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

Unified Diff: third_party/WebKit/Source/web/tests/DocumentLoaderTest.cpp

Issue 2537753002: Remove WebURLLoader* argument from WebURLLoaderClient methods (Closed)
Patch Set: a Created 4 years, 1 month 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
Index: third_party/WebKit/Source/web/tests/DocumentLoaderTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/DocumentLoaderTest.cpp b/third_party/WebKit/Source/web/tests/DocumentLoaderTest.cpp
index 7a9a4ba246699c894448bebf1244e1604c0ea8d1..decd99790abed3ac5fd65ebae9aef6602f5dce1d 100644
--- a/third_party/WebKit/Source/web/tests/DocumentLoaderTest.cpp
+++ b/third_party/WebKit/Source/web/tests/DocumentLoaderTest.cpp
@@ -44,13 +44,11 @@ TEST_F(DocumentLoaderTest, SingleChunk) {
class TestDelegate : public WebURLLoaderTestDelegate {
public:
void didReceiveData(WebURLLoaderClient* originalClient,
- WebURLLoader* loader,
const char* data,
int dataLength,
int encodedDataLength) override {
EXPECT_EQ(34, dataLength) << "foo.html was not served in a single chunk";
- originalClient->didReceiveData(loader, data, dataLength,
- encodedDataLength);
+ originalClient->didReceiveData(data, dataLength, encodedDataLength);
}
} delegate;
@@ -69,14 +67,13 @@ TEST_F(DocumentLoaderTest, MultiChunkNoReentrancy) {
class TestDelegate : public WebURLLoaderTestDelegate {
public:
void didReceiveData(WebURLLoaderClient* originalClient,
- WebURLLoader* loader,
const char* data,
int dataLength,
int encodedDataLength) override {
EXPECT_EQ(34, dataLength) << "foo.html was not served in a single chunk";
// Chunk the reply into one byte chunks.
for (int i = 0; i < dataLength; ++i)
- originalClient->didReceiveData(loader, &data[i], 1, 1);
+ originalClient->didReceiveData(&data[i], 1, 1);
}
} delegate;
@@ -98,20 +95,17 @@ TEST_F(DocumentLoaderTest, MultiChunkWithReentrancy) {
public:
TestDelegate()
: m_loaderClient(nullptr),
- m_loader(nullptr),
m_dispatchingDidReceiveData(false),
m_servedReentrantly(false) {}
// WebURLLoaderTestDelegate overrides:
void didReceiveData(WebURLLoaderClient* originalClient,
- WebURLLoader* loader,
const char* data,
int dataLength,
int encodedDataLength) override {
EXPECT_EQ(34, dataLength) << "foo.html was not served in a single chunk";
m_loaderClient = originalClient;
- m_loader = loader;
for (int i = 0; i < dataLength; ++i)
m_data.push(data[i]);
@@ -147,14 +141,13 @@ TEST_F(DocumentLoaderTest, MultiChunkWithReentrancy) {
void dispatchOneByte() {
char c = m_data.front();
m_data.pop();
- m_loaderClient->didReceiveData(m_loader, &c, 1, 1);
+ m_loaderClient->didReceiveData(&c, 1, 1);
}
bool servedReentrantly() const { return m_servedReentrantly; }
private:
WebURLLoaderClient* m_loaderClient;
- WebURLLoader* m_loader;
std::queue<char> m_data;
bool m_dispatchingDidReceiveData;
bool m_servedReentrantly;
« no previous file with comments | « third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698