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

Unified Diff: third_party/WebKit/Source/web/tests/MHTMLTest.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/web/tests/MHTMLTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/MHTMLTest.cpp b/third_party/WebKit/Source/web/tests/MHTMLTest.cpp
index 06ac0b501919efb51d09522b71f49eeea33ae71f..7abb55ec4396c98552af179bcff07b1276358246 100644
--- a/third_party/WebKit/Source/web/tests/MHTMLTest.cpp
+++ b/third_party/WebKit/Source/web/tests/MHTMLTest.cpp
@@ -84,10 +84,7 @@ class LineReader {
class MHTMLTest : public ::testing::Test {
public:
- MHTMLTest() {
- m_filePath = testing::blinkRootDir();
- m_filePath.append("/Source/web/tests/data/mhtml/");
- }
+ MHTMLTest() { m_filePath = testing::webTestDataPath("mhtml/"); }
protected:
void SetUp() override { m_helper.initialize(); }
@@ -98,9 +95,9 @@ class MHTMLTest : public ::testing::Test {
}
void registerMockedURLLoad(const std::string& url,
- const WebString& fileName) {
+ const std::string& fileName) {
URLTestHelpers::registerMockedURLLoad(
- toKURL(url), fileName, WebString::fromUTF8("mhtml/"),
+ toKURL(url), testing::webTestDataPath("mhtml/" + fileName),
WebString::fromUTF8("multipart/related"));
}
@@ -190,7 +187,7 @@ TEST_F(MHTMLTest, CheckDomain) {
// Register the mocked frame and load it.
WebURL url = toKURL(kFileURL);
- registerMockedURLLoad(kFileURL, WebString::fromUTF8("simple_test.mht"));
+ registerMockedURLLoad(kFileURL, "simple_test.mht");
loadURLInTopFrame(url);
ASSERT_TRUE(page());
LocalFrame* frame = toLocalFrame(page()->mainFrame());
@@ -270,7 +267,7 @@ TEST_F(MHTMLTest, EnforceSandboxFlags) {
const char kURL[] = "http://www.example.com";
// Register the mocked frame and load it.
- registerMockedURLLoad(kURL, WebString::fromUTF8("simple_test.mht"));
+ registerMockedURLLoad(kURL, "simple_test.mht");
loadURLInTopFrame(toKURL(kURL));
ASSERT_TRUE(page());
LocalFrame* frame = toLocalFrame(page()->mainFrame());

Powered by Google App Engine
This is Rietveld 408576698