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

Unified Diff: third_party/WebKit/Source/web/tests/BrowserControlsTest.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/tests/BrowserControlsTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp b/third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp
index e0e5ba0376c079e7b8203c4bc00524151f832203..08243a02225f8b1fe190b77a4e23f1bd7aa1b6a6 100644
--- a/third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp
+++ b/third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp
@@ -36,6 +36,7 @@
#include "core/frame/VisualViewport.h"
#include "core/page/Page.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"
@@ -51,7 +52,7 @@ namespace blink {
// These tests cover browser controls scrolling on main-thread.
// The animation for completing a partial show/hide is done in compositor so
// it is not covered here.
-class BrowserControlsTest : public testing::Test {
+class BrowserControlsTest : public ::testing::Test {
public:
BrowserControlsTest() : m_baseURL("http://www.test.com/") {
registerMockedHttpURLLoad("large-div.html");
@@ -93,9 +94,9 @@ class BrowserControlsTest : public testing::Test {
}
void registerMockedHttpURLLoad(const std::string& fileName) {
- URLTestHelpers::registerMockedURLFromBaseURL(
- WebString::fromUTF8(m_baseURL.c_str()),
- WebString::fromUTF8(fileName.c_str()));
+ URLTestHelpers::registerMockedURLLoadFromBase(
+ WebString::fromUTF8(m_baseURL), testing::webTestDataPath(),
+ WebString::fromUTF8(fileName));
}
WebCoalescedInputEvent generateEvent(WebInputEvent::Type type,

Powered by Google App Engine
This is Rietveld 408576698