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

Unified Diff: third_party/WebKit/Source/web/ExternalPopupMenuTest.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/ExternalPopupMenuTest.cpp
diff --git a/third_party/WebKit/Source/web/ExternalPopupMenuTest.cpp b/third_party/WebKit/Source/web/ExternalPopupMenuTest.cpp
index 8076ba7dc4ab44ff5a2abacb1a648c77a3eeec16..8ba2f3674f4c702be422e637e648c0bef17d4164 100644
--- a/third_party/WebKit/Source/web/ExternalPopupMenuTest.cpp
+++ b/third_party/WebKit/Source/web/ExternalPopupMenuTest.cpp
@@ -14,6 +14,7 @@
#include "core/testing/DummyPageHolder.h"
#include "platform/PopupMenu.h"
#include "platform/testing/URLTestHelpers.h"
+#include "platform/testing/UnitTestHelpers.h"
#include "public/platform/Platform.h"
#include "public/platform/WebURLLoaderMockFactory.h"
#include "public/web/WebCache.h"
@@ -27,7 +28,7 @@
namespace blink {
-class ExternalPopupMenuDisplayNoneItemsTest : public testing::Test {
+class ExternalPopupMenuDisplayNoneItemsTest : public ::testing::Test {
public:
ExternalPopupMenuDisplayNoneItemsTest() {}
@@ -97,7 +98,7 @@ class ExternalPopupMenuWebFrameClient
MockWebExternalPopupMenu m_mockWebExternalPopupMenu;
};
-class ExternalPopupMenuTest : public testing::Test {
+class ExternalPopupMenuTest : public ::testing::Test {
public:
ExternalPopupMenuTest() : m_baseURL("http://www.test.com") {}
@@ -112,9 +113,10 @@ class ExternalPopupMenuTest : public testing::Test {
}
void registerMockedURLLoad(const std::string& fileName) {
- URLTestHelpers::registerMockedURLLoad(
- URLTestHelpers::toKURL(m_baseURL + fileName),
- WebString::fromUTF8(fileName.c_str()), WebString::fromUTF8("popup/"),
+ URLTestHelpers::registerMockedURLLoadFromBase(
+ WebString::fromUTF8(m_baseURL.c_str()),
kinuko 2017/01/26 09:32:41 fromUTF8 can directly take std::string
Takashi Toyoshima 2017/01/26 10:57:57 Done.
+ testing::webTestDataPath("popup"),
+ WebString::fromUTF8(fileName.c_str()),
WebString::fromUTF8("text/html"));
}

Powered by Google App Engine
This is Rietveld 408576698