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

Unified Diff: third_party/WebKit/Source/platform/testing/URLTestHelpers.h

Issue 2680723002: Generalize ScopedRegisteredURL as ScoedMockedURL* (Closed)
Patch Set: remove one more unused class Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/testing/URLTestHelpers.h
diff --git a/third_party/WebKit/Source/platform/testing/URLTestHelpers.h b/third_party/WebKit/Source/platform/testing/URLTestHelpers.h
index 6cb59d353972b5338307f2817da604118c3add9a..10035772ec750dbdd44e2326031ccf5d0bad53f0 100644
--- a/third_party/WebKit/Source/platform/testing/URLTestHelpers.h
+++ b/third_party/WebKit/Source/platform/testing/URLTestHelpers.h
@@ -34,11 +34,9 @@
#include "platform/weborigin/KURL.h"
#include "public/platform/WebString.h"
#include "public/platform/WebURL.h"
+#include "public/platform/WebURLResponse.h"
namespace blink {
-
-class WebURLResponse;
-
namespace URLTestHelpers {
inline blink::KURL toKURL(const std::string& url) {
@@ -46,6 +44,9 @@ inline blink::KURL toKURL(const std::string& url) {
return blink::KURL(blink::ParsedURLString, wtfString);
}
+// Avoid directly using these methods, instead please use ScopedMockedURL (or
+// define a variant of ScopedMockedURL classes if necessary) in new code.
+//
// Helper functions for mock URLs. These functions set up the desired URL and
// mimeType, with a 200 OK return status.
// webTestDataPath() or platformTestDataPath() in UnitTestHelpers can be used to
@@ -66,6 +67,8 @@ void registerMockedURLLoad(
const WebURL& fullURL,
const WebString& filePath,
const WebString& mimeType = WebString::fromUTF8("text/html"));
+
+// Registers with a custom response.
void registerMockedURLLoadWithCustomResponse(const WebURL& fullURL,
const WebString& filePath,
WebURLResponse);

Powered by Google App Engine
This is Rietveld 408576698