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

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

Issue 2680723002: Generalize ScopedRegisteredURL as ScoedMockedURL* (Closed)
Patch Set: append missed files 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..88c545d5c218414d4f4c9bbc502d6795b6ba57db 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);
}
+// Note: Please use one of ScopedMockedURL* class for new code as you can as
+// possible.
kinuko 2017/02/08 08:21:48 I think we could say "Avoid directly using these
Takashi Toyoshima 2017/02/08 10:33:14 Done.
+//
// 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