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

Unified Diff: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp

Issue 2654933003: platform/testing/{URL|Unit}TestHelpers improvements (Closed)
Patch Set: cleanup Created 3 years, 11 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/core/loader/ThreadableLoaderTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
index 11c1b1d8b5872a59bba1fe117a8b1c6a8bf7b7f1..dc35bf7c83943e5079d61a2e8e85953228d70a03 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
@@ -46,6 +46,8 @@ using ::testing::StrEq;
using ::testing::Truly;
using Checkpoint = ::testing::StrictMock<::testing::MockFunction<void(int)>>;
+constexpr char kFileName[] = "fox-null-terminated.html";
+
class MockThreadableLoaderClient : public ThreadableLoaderClient {
public:
static std::unique_ptr<MockThreadableLoaderClient> create() {
@@ -411,7 +413,7 @@ class ThreadableLoaderTest
void setUpSuccessURL() {
URLTestHelpers::registerMockedURLLoad(
- successURL(), "fox-null-terminated.html", "text/html");
+ successURL(), testing::webTestDataPath(kFileName), "text/html");
}
void setUpErrorURL() {
@@ -432,7 +434,7 @@ class ThreadableLoaderTest
response.addHTTPHeaderField("Access-Control-Allow-Origin", "null");
URLTestHelpers::registerMockedURLLoadWithCustomResponse(
- url, "fox-null-terminated.html", "", response);
+ url, testing::webTestDataPath(kFileName), response);
}
void setUpRedirectLoopURL() {
@@ -449,7 +451,7 @@ class ThreadableLoaderTest
response.addHTTPHeaderField("Access-Control-Allow-Origin", "null");
URLTestHelpers::registerMockedURLLoadWithCustomResponse(
- url, "fox-null-terminated.html", "", response);
+ url, testing::webTestDataPath(kFileName), response);
}
std::unique_ptr<MockThreadableLoaderClient> m_client;

Powered by Google App Engine
This is Rietveld 408576698