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

Unified Diff: third_party/WebKit/Source/web/WebAssociatedURLLoaderImplTest.cpp

Issue 2654933003: platform/testing/{URL|Unit}TestHelpers improvements (Closed)
Patch Set: header changes 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/web/WebAssociatedURLLoaderImplTest.cpp
diff --git a/third_party/WebKit/Source/web/WebAssociatedURLLoaderImplTest.cpp b/third_party/WebKit/Source/web/WebAssociatedURLLoaderImplTest.cpp
index 19e767cbe9c94dbd0a9101fbb0e9c34b7ce07f27..ac08fca7e1eb2d00fb1b8f12aa9d35ae1b1c1e40 100644
--- a/third_party/WebKit/Source/web/WebAssociatedURLLoaderImplTest.cpp
+++ b/third_party/WebKit/Source/web/WebAssociatedURLLoaderImplTest.cpp
@@ -68,21 +68,16 @@ class WebAssociatedURLLoaderTest : public ::testing::Test,
m_didFinishLoading(false),
m_didFail(false) {
// Reuse one of the test files from WebFrameTest.
- m_baseFilePath = testing::blinkRootDir();
- m_baseFilePath.append("/Source/web/tests/data/");
- m_frameFilePath = m_baseFilePath;
- m_frameFilePath.append("iframes_test.html");
+ m_frameFilePath = testing::webTestDataPath("iframes_test.html");
}
KURL RegisterMockedUrl(const std::string& urlRoot,
const WTF::String& filename) {
WebURLResponse response;
response.setMIMEType("text/html");
- WTF::String localPath = m_baseFilePath;
- localPath.append(filename);
KURL url = toKURL(urlRoot + filename.utf8().data());
- Platform::current()->getURLLoaderMockFactory()->registerURL(url, response,
- localPath);
+ Platform::current()->getURLLoaderMockFactory()->registerURL(
+ url, response, testing::webTestDataPath(filename.utf8().data()));
return url;
}
@@ -246,7 +241,6 @@ class WebAssociatedURLLoaderTest : public ::testing::Test,
WebFrame* mainFrame() const { return m_helper.webView()->mainFrame(); }
protected:
- String m_baseFilePath;
String m_frameFilePath;
FrameTestHelpers::WebViewHelper m_helper;
« no previous file with comments | « third_party/WebKit/Source/web/LinkHighlightImplTest.cpp ('k') | third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698