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

Unified Diff: Source/web/tests/WebFrameTest.cpp

Issue 173283003: WebDocument::focusedNode should be focusedElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/web/WebDocument.cpp ('k') | public/web/WebDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 017149902098048b652546d8509e595ec2692c53..d630f803edb67dc0b787fbc6c48f2ac95b2f8aca 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -2922,7 +2922,7 @@ TEST_F(WebFrameTest, FindInPage)
WebRange range = frame->selectionRange();
EXPECT_EQ(5, range.startOffset());
EXPECT_EQ(9, range.endOffset());
- EXPECT_TRUE(frame->document().focusedNode().isNull());
+ EXPECT_TRUE(frame->document().focusedElement().isNull());
// Find in an <input> value.
EXPECT_TRUE(frame->find(findIdentifier, WebString::fromUTF8("bar2"), options, false, 0));
@@ -2932,7 +2932,7 @@ TEST_F(WebFrameTest, FindInPage)
ASSERT_FALSE(range.isNull());
EXPECT_EQ(5, range.startOffset());
EXPECT_EQ(9, range.endOffset());
- EXPECT_EQ(WebString::fromUTF8("INPUT"), frame->document().focusedNode().nodeName());
+ EXPECT_EQ(WebString::fromUTF8("INPUT"), frame->document().focusedElement().tagName());
// Find in a <textarea> content.
EXPECT_TRUE(frame->find(findIdentifier, WebString::fromUTF8("bar3"), options, false, 0));
@@ -2942,7 +2942,7 @@ TEST_F(WebFrameTest, FindInPage)
ASSERT_FALSE(range.isNull());
EXPECT_EQ(5, range.startOffset());
EXPECT_EQ(9, range.endOffset());
- EXPECT_EQ(WebString::fromUTF8("TEXTAREA"), frame->document().focusedNode().nodeName());
+ EXPECT_EQ(WebString::fromUTF8("TEXTAREA"), frame->document().focusedElement().tagName());
// Find in a contentEditable element.
EXPECT_TRUE(frame->find(findIdentifier, WebString::fromUTF8("bar4"), options, false, 0));
@@ -2953,7 +2953,7 @@ TEST_F(WebFrameTest, FindInPage)
EXPECT_EQ(0, range.startOffset());
EXPECT_EQ(4, range.endOffset());
// "bar4" is surrounded by <span>, but the focusable node should be the parent <div>.
- EXPECT_EQ(WebString::fromUTF8("DIV"), frame->document().focusedNode().nodeName());
+ EXPECT_EQ(WebString::fromUTF8("DIV"), frame->document().focusedElement().tagName());
// Find in <select> content.
EXPECT_FALSE(frame->find(findIdentifier, WebString::fromUTF8("bar5"), options, false, 0));
« no previous file with comments | « Source/web/WebDocument.cpp ('k') | public/web/WebDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698