Commit c6de2418 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Renaming unit_test function RegisterMockedURLLoad to not collide.

There is a shared RegisterMockedURLLoad in URLTestHelpers and a couple of
local ones imported with "using" or locally declared. That is
normally no big deal but in jumbo builds they
can be compiled in the same translation unit and then the functions
will collide. This patch removes a "using" and renames a function
to make the names more unique.

R=fs@opera.com

Change-Id: I6866f13bd1903e42269b7286645a9f07396b68a8
Reviewed-on: https://chromium-review.googlesource.com/574180Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487056}
parent 0cda8c46
......@@ -52,16 +52,14 @@
#include "public/web/WebSettings.h"
#include "testing/gtest/include/gtest/gtest.h"
using blink::URLTestHelpers::ToKURL;
using blink::URLTestHelpers::RegisterMockedURLLoad;
namespace blink {
class FrameSerializerTest : public ::testing::Test,
public FrameSerializer::Delegate {
public:
FrameSerializerTest()
: folder_("frameserializer/"), base_url_(ToKURL("http://www.test.com")) {}
: folder_("frameserializer/"),
base_url_(URLTestHelpers::ToKURL("http://www.test.com")) {}
protected:
void SetUp() override {
......@@ -80,7 +78,7 @@ class FrameSerializerTest : public ::testing::Test,
void SetRewriteURLFolder(const char* folder) { rewrite_folder_ = folder; }
void RegisterURL(const KURL& url, const char* file, const char* mime_type) {
RegisterMockedURLLoad(
URLTestHelpers::RegisterMockedURLLoad(
url, testing::CoreTestDataPath(WebString::FromUTF8(folder_ + file)),
WebString::FromUTF8(mime_type));
}
......@@ -356,8 +354,9 @@ TEST_F(FrameSerializerTest, CSS) {
RegisterURL("ul-dot.png", "image.png", "image/png");
RegisterURL("ol-dot.png", "image.png", "image/png");
const KURL image_url_from_data_url(ToKURL("http://www.dataurl.com"),
"fuchsia_background.png");
const KURL image_url_from_data_url(
URLTestHelpers::ToKURL("http://www.dataurl.com"),
"fuchsia_background.png");
RegisterURL(image_url_from_data_url, "image.png", "image/png");
RegisterURL("included_in_another_frame.css", "text/css");
......
......@@ -66,7 +66,7 @@ GestureEventWithHitTestResults GetTargetedEvent(WebViewBase* web_view_impl,
.TargetGestureEvent(scaled_event, true);
}
std::string RegisterMockedURLLoad() {
std::string LinkRegisterMockedURLLoad() {
WebURL url = URLTestHelpers::RegisterMockedURLLoadFromBase(
WebString::FromUTF8("http://www.test.com/"), testing::CoreTestDataPath(),
WebString::FromUTF8("test_touch_link_highlight.html"));
......@@ -76,7 +76,7 @@ std::string RegisterMockedURLLoad() {
} // namespace
TEST(LinkHighlightImplTest, verifyWebViewImplIntegration) {
const std::string url = RegisterMockedURLLoad();
const std::string url = LinkRegisterMockedURLLoad();
FrameTestHelpers::WebViewHelper web_view_helper;
WebViewBase* web_view_impl = web_view_helper.InitializeAndLoad(url);
int page_width = 640;
......@@ -133,7 +133,7 @@ TEST(LinkHighlightImplTest, verifyWebViewImplIntegration) {
}
TEST(LinkHighlightImplTest, resetDuringNodeRemoval) {
const std::string url = RegisterMockedURLLoad();
const std::string url = LinkRegisterMockedURLLoad();
FrameTestHelpers::WebViewHelper web_view_helper;
WebViewBase* web_view_impl = web_view_helper.InitializeAndLoad(url);
......@@ -173,7 +173,7 @@ TEST(LinkHighlightImplTest, resetDuringNodeRemoval) {
// A lifetime test: delete LayerTreeView while running LinkHighlights.
TEST(LinkHighlightImplTest, resetLayerTreeView) {
const std::string url = RegisterMockedURLLoad();
const std::string url = LinkRegisterMockedURLLoad();
FrameTestHelpers::WebViewHelper web_view_helper;
WebViewBase* web_view_impl = web_view_helper.InitializeAndLoad(url);
......@@ -208,7 +208,7 @@ TEST(LinkHighlightImplTest, resetLayerTreeView) {
}
TEST(LinkHighlightImplTest, multipleHighlights) {
const std::string url = RegisterMockedURLLoad();
const std::string url = LinkRegisterMockedURLLoad();
FrameTestHelpers::WebViewHelper web_view_helper;
WebViewBase* web_view_impl = web_view_helper.InitializeAndLoad(url);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment