Commit 2eae97c1 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Rename TestPrerendererClient since that name is already used

In some extreme jumbo configurations the newly added
TestPrerendererClient class in
Source/core/html/parser/HTMLDocumentParserTest.cpp
compiled in the same translation unit as TestPrerendererClient
in Source/core/exported/PrerenderingTest.cpp and then it
didn't compile.

This patch renames TestPre* to MockPre*/MockWebPre* which also matches
a common pattern when creating mock classes.

Change-Id: Ib800e5e65756bf3c3709d8f570982aaa46dc7cd4
Reviewed-on: https://chromium-review.googlesource.com/980332Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Reviewed-by: default avatarMatthew Cary <mattcary@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#545771}
parent bac605dc
...@@ -17,9 +17,9 @@ namespace blink { ...@@ -17,9 +17,9 @@ namespace blink {
namespace { namespace {
class TestPrerendererClient : public PrerendererClient { class MockPrerendererClient : public PrerendererClient {
public: public:
TestPrerendererClient(Page& page, bool is_prefetch_only) MockPrerendererClient(Page& page, bool is_prefetch_only)
: PrerendererClient(page, nullptr), is_prefetch_only_(is_prefetch_only) {} : PrerendererClient(page, nullptr), is_prefetch_only_(is_prefetch_only) {}
private: private:
...@@ -29,9 +29,9 @@ class TestPrerendererClient : public PrerendererClient { ...@@ -29,9 +29,9 @@ class TestPrerendererClient : public PrerendererClient {
bool is_prefetch_only_; bool is_prefetch_only_;
}; };
class TestPrerenderingSupport : public WebPrerenderingSupport { class MockWebPrerenderingSupport : public WebPrerenderingSupport {
public: public:
TestPrerenderingSupport() { Initialize(this); } MockWebPrerenderingSupport() { Initialize(this); }
virtual void Add(const WebPrerender&) {} virtual void Add(const WebPrerender&) {}
virtual void Cancel(const WebPrerender&) {} virtual void Cancel(const WebPrerender&) {}
...@@ -65,7 +65,7 @@ class HTMLDocumentParserTest : public PageTestBase { ...@@ -65,7 +65,7 @@ class HTMLDocumentParserTest : public PageTestBase {
} }
private: private:
TestPrerenderingSupport prerendering_support_; MockWebPrerenderingSupport prerendering_support_;
}; };
} // namespace } // namespace
...@@ -74,7 +74,7 @@ TEST_F(HTMLDocumentParserTest, AppendPrefetch) { ...@@ -74,7 +74,7 @@ TEST_F(HTMLDocumentParserTest, AppendPrefetch) {
HTMLDocument& document = ToHTMLDocument(GetDocument()); HTMLDocument& document = ToHTMLDocument(GetDocument());
ProvidePrerendererClientTo( ProvidePrerendererClientTo(
*document.GetPage(), *document.GetPage(),
new TestPrerendererClient(*document.GetPage(), true)); new MockPrerendererClient(*document.GetPage(), true));
EXPECT_TRUE(document.IsPrefetchOnly()); EXPECT_TRUE(document.IsPrefetchOnly());
HTMLDocumentParser* parser = CreateParser(document); HTMLDocumentParser* parser = CreateParser(document);
......
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