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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp

Issue 2521503002: Rename ResourceResponse::addToEncodedDataSize() to setEncodedDataSize() (Closed)
Patch Set: fix Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 ScopedMockRedirectRequester() : m_context(nullptr) {} 348 ScopedMockRedirectRequester() : m_context(nullptr) {}
349 349
350 ~ScopedMockRedirectRequester() { cleanUp(); } 350 ~ScopedMockRedirectRequester() { cleanUp(); }
351 351
352 void registerRedirect(const WebString& fromURL, const WebString& toURL) { 352 void registerRedirect(const WebString& fromURL, const WebString& toURL) {
353 KURL redirectURL(ParsedURLString, fromURL); 353 KURL redirectURL(ParsedURLString, fromURL);
354 WebURLResponse redirectResponse; 354 WebURLResponse redirectResponse;
355 redirectResponse.setURL(redirectURL); 355 redirectResponse.setURL(redirectURL);
356 redirectResponse.setHTTPStatusCode(301); 356 redirectResponse.setHTTPStatusCode(301);
357 redirectResponse.setHTTPHeaderField(HTTPNames::Location, toURL); 357 redirectResponse.setHTTPHeaderField(HTTPNames::Location, toURL);
358 redirectResponse.addToEncodedDataLength(kRedirectResponseOverheadBytes); 358 redirectResponse.setEncodedDataLength(kRedirectResponseOverheadBytes);
359 Platform::current()->getURLLoaderMockFactory()->registerURL( 359 Platform::current()->getURLLoaderMockFactory()->registerURL(
360 redirectURL, redirectResponse, ""); 360 redirectURL, redirectResponse, "");
361 } 361 }
362 362
363 void registerFinalResource(const WebString& url) { 363 void registerFinalResource(const WebString& url) {
364 KURL finalURL(ParsedURLString, url); 364 KURL finalURL(ParsedURLString, url);
365 URLTestHelpers::registerMockedURLLoad(finalURL, testImageFilename); 365 URLTestHelpers::registerMockedURLLoad(finalURL, testImageFilename);
366 } 366 }
367 367
368 void request(const WebString& url) { 368 void request(const WebString& url) {
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 Platform::current()->getURLLoaderMockFactory()->registerURL( 608 Platform::current()->getURLLoaderMockFactory()->registerURL(
609 url, WebURLResponse(), ""); 609 url, WebURLResponse(), "");
610 Resource* newResource = RawResource::fetch(fetchRequest, fetcher); 610 Resource* newResource = RawResource::fetch(fetchRequest, fetcher);
611 fetcher->stopFetching(); 611 fetcher->stopFetching();
612 Platform::current()->getURLLoaderMockFactory()->unregisterURL(url); 612 Platform::current()->getURLLoaderMockFactory()->unregisterURL(url);
613 613
614 EXPECT_NE(resource, newResource); 614 EXPECT_NE(resource, newResource);
615 } 615 }
616 616
617 } // namespace blink 617 } // namespace blink
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | third_party/WebKit/Source/platform/exported/WebURLResponse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698