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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/core/editing/FrameSelectionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
index cd04d7351e3409885547715c6254b57272ab73ee..e6a0d51e72829ff5cd8092239cec8f0b09df74c1 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -32,11 +32,11 @@ protected:
const VisibleSelection& visibleSelectionInDOMTree() const { return selection().selection(); }
const VisibleSelectionInFlatTree& visibleSelectionInFlatTree() const { return selection().selectionInFlatTree(); }
- PassRefPtrWillBeRawPtr<Text> appendTextNode(const String& data);
+ RawPtr<Text> appendTextNode(const String& data);
int layoutCount() const { return dummyPageHolder().frameView().layoutCount(); }
private:
- RefPtrWillBePersistent<Text> m_textNode;
+ Persistent<Text> m_textNode;
};
void FrameSelectionTest::setSelection(const VisibleSelection& newSelection)
@@ -49,16 +49,16 @@ FrameSelection& FrameSelectionTest::selection() const
return dummyPageHolder().frame().selection();
}
-PassRefPtrWillBeRawPtr<Text> FrameSelectionTest::appendTextNode(const String& data)
+RawPtr<Text> FrameSelectionTest::appendTextNode(const String& data)
{
- RefPtrWillBeRawPtr<Text> text = document().createTextNode(data);
+ RawPtr<Text> text = document().createTextNode(data);
document().body()->appendChild(text);
return text.release();
}
TEST_F(FrameSelectionTest, SetValidSelection)
{
- RefPtrWillBeRawPtr<Text> text = appendTextNode("Hello, World!");
+ RawPtr<Text> text = appendTextNode("Hello, World!");
VisibleSelection validSelection(Position(text, 0), Position(text, 5));
EXPECT_FALSE(validSelection.isNone());
setSelection(validSelection);
@@ -69,10 +69,10 @@ TEST_F(FrameSelectionTest, SetInvalidSelection)
{
// Create a new document without frame by using DOMImplementation.
DocumentInit dummy;
- RefPtrWillBeRawPtr<Document> documentWithoutFrame = Document::create();
- RefPtrWillBeRawPtr<Element> body = HTMLBodyElement::create(*documentWithoutFrame);
+ RawPtr<Document> documentWithoutFrame = Document::create();
+ RawPtr<Element> body = HTMLBodyElement::create(*documentWithoutFrame);
documentWithoutFrame->appendChild(body);
- RefPtrWillBeRawPtr<Text> anotherText = documentWithoutFrame->createTextNode("Hello, another world");
+ RawPtr<Text> anotherText = documentWithoutFrame->createTextNode("Hello, another world");
body->appendChild(anotherText);
// Create a new VisibleSelection for the new document without frame and
@@ -86,7 +86,7 @@ TEST_F(FrameSelectionTest, SetInvalidSelection)
TEST_F(FrameSelectionTest, InvalidateCaretRect)
{
- RefPtrWillBeRawPtr<Text> text = appendTextNode("Hello, World!");
+ RawPtr<Text> text = appendTextNode("Hello, World!");
document().view()->updateAllLifecyclePhases();
VisibleSelection validSelection(Position(text, 0), Position(text, 0));
@@ -106,7 +106,7 @@ TEST_F(FrameSelectionTest, InvalidateCaretRect)
TEST_F(FrameSelectionTest, PaintCaretShouldNotLayout)
{
- RefPtrWillBeRawPtr<Text> text = appendTextNode("Hello, World!");
+ RawPtr<Text> text = appendTextNode("Hello, World!");
document().view()->updateAllLifecyclePhases();
document().body()->setContentEditable("true", ASSERT_NO_EXCEPTION);
@@ -141,7 +141,7 @@ TEST_F(FrameSelectionTest, PaintCaretShouldNotLayout)
TEST_F(FrameSelectionTest, SelectWordAroundPosition)
{
// "Foo Bar Baz,"
- RefPtrWillBeRawPtr<Text> text = appendTextNode("Foo Bar&nbsp;&nbsp;Baz,");
+ RawPtr<Text> text = appendTextNode("Foo Bar&nbsp;&nbsp;Baz,");
// "Fo|o Bar Baz,"
EXPECT_TRUE(selection().selectWordAroundPosition(createVisiblePosition(Position(text, 2))));
EXPECT_EQ_SELECTED_TEXT("Foo");
@@ -158,7 +158,7 @@ TEST_F(FrameSelectionTest, SelectWordAroundPosition)
TEST_F(FrameSelectionTest, MoveRangeSelectionTest)
{
// "Foo Bar Baz,"
- RefPtrWillBeRawPtr<Text> text = appendTextNode("Foo Bar Baz,");
+ RawPtr<Text> text = appendTextNode("Foo Bar Baz,");
// Itinitializes with "Foo B|a>r Baz," (| means start and > means end).
selection().setSelection(VisibleSelection(Position(text, 5), Position(text, 6)));
EXPECT_EQ_SELECTED_TEXT("a");
@@ -182,7 +182,7 @@ TEST_F(FrameSelectionTest, setNonDirectionalSelectionIfNeeded)
const char* bodyContent = "<span id=top>top</span><span id=host></span>";
const char* shadowContent = "<span id=bottom>bottom</span>";
setBodyContent(bodyContent);
- RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = setShadowContent(shadowContent, "host");
+ RawPtr<ShadowRoot> shadowRoot = setShadowContent(shadowContent, "host");
updateLayoutAndStyleForPainting();
Node* top = document().getElementById("top")->firstChild();
@@ -216,7 +216,7 @@ TEST_F(FrameSelectionTest, setNonDirectionalSelectionIfNeeded)
TEST_F(FrameSelectionTest, SelectAllWithUnselectableRoot)
{
- RefPtrWillBeRawPtr<Element> select = document().createElement("select", ASSERT_NO_EXCEPTION);
+ RawPtr<Element> select = document().createElement("select", ASSERT_NO_EXCEPTION);
document().replaceChild(select.get(), document().documentElement());
selection().selectAll();
EXPECT_TRUE(selection().isNone()) << "Nothing should be selected if the content of the documentElement is not selctable.";

Powered by Google App Engine
This is Rietveld 408576698