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

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp

Issue 1488543002: DocumentMarkerControllerTest: drop unnecessary caching of Document reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
index 33772ff8bc4f103e9c9ab229b2b661cdd946f890..db1581a0a8396533d7c86d69c77af99457c6270c 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
@@ -47,10 +47,13 @@ namespace blink {
class DocumentMarkerControllerTest : public ::testing::Test {
protected:
- void SetUp() override;
+ DocumentMarkerControllerTest()
+ : m_dummyPageHolder(DummyPageHolder::create(IntSize(800, 600)))
+ {
+ }
- Document& document() const { return *m_document; }
- DocumentMarkerController& markerController() const { return m_document->markers(); }
+ Document& document() const { return m_dummyPageHolder->document(); }
+ DocumentMarkerController& markerController() const { return document().markers(); }
PassRefPtrWillBeRawPtr<Text> createTextNode(const char*);
void markNodeContents(PassRefPtrWillBeRawPtr<Node>);
@@ -59,16 +62,8 @@ protected:
private:
OwnPtr<DummyPageHolder> m_dummyPageHolder;
- RefPtrWillBePersistent<Document> m_document;
};
-void DocumentMarkerControllerTest::SetUp()
-{
- m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
- m_document = &m_dummyPageHolder->document();
- ASSERT(m_document);
-}
-
PassRefPtrWillBeRawPtr<Text> DocumentMarkerControllerTest::createTextNode(const char* textContents)
{
return document().createTextNode(String::fromUTF8(textContents));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698