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

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

Issue 1354683005: Remove usage of WebElement::tagName() in blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | 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 2ea914dcf633bdbefd3dd7fec1a736ce30f1fb0a..697707940c581f87ee7198e63b121b401b292765 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -3601,7 +3601,7 @@ TEST_P(ParameterizedWebFrameTest, FindInPage)
ASSERT_FALSE(range.isNull());
EXPECT_EQ(5, range.startOffset());
EXPECT_EQ(9, range.endOffset());
- EXPECT_EQ(WebString::fromUTF8("INPUT"), frame->document().focusedElement().tagName());
+ EXPECT_TRUE(frame->document().focusedElement().hasHTMLTagName("input"));
// Find in a <textarea> content.
EXPECT_TRUE(frame->find(findIdentifier, WebString::fromUTF8("bar3"), options, false, 0));
@@ -3611,7 +3611,7 @@ TEST_P(ParameterizedWebFrameTest, FindInPage)
ASSERT_FALSE(range.isNull());
EXPECT_EQ(5, range.startOffset());
EXPECT_EQ(9, range.endOffset());
- EXPECT_EQ(WebString::fromUTF8("TEXTAREA"), frame->document().focusedElement().tagName());
+ EXPECT_TRUE(frame->document().focusedElement().hasHTMLTagName("textarea"));
// Find in a contentEditable element.
EXPECT_TRUE(frame->find(findIdentifier, WebString::fromUTF8("bar4"), options, false, 0));
@@ -3622,7 +3622,7 @@ TEST_P(ParameterizedWebFrameTest, 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().focusedElement().tagName());
+ EXPECT_TRUE(frame->document().focusedElement().hasHTMLTagName("div"));
// Find in <select> content.
EXPECT_FALSE(frame->find(findIdentifier, WebString::fromUTF8("bar5"), options, false, 0));
« 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