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

Unified Diff: Source/WebKit/chromium/tests/WebFrameTest.cpp

Issue 12092069: Merge 141252 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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/WebKit/chromium/src/FindInPageCoordinates.cpp ('k') | Source/WebKit/chromium/tests/data/find.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/tests/WebFrameTest.cpp
===================================================================
--- Source/WebKit/chromium/tests/WebFrameTest.cpp (revision 141278)
+++ Source/WebKit/chromium/tests/WebFrameTest.cpp (working copy)
@@ -982,6 +982,14 @@
// "bar4" is surrounded by <span>, but the focusable node should be the parent <div>.
EXPECT_EQ(WebString::fromUTF8("DIV"), frame->document().focusedNode().nodeName());
+ // Find in <select> content.
+ EXPECT_FALSE(frame->find(findIdentifier, WebString::fromUTF8("bar5"), options, false, 0));
+ // If there are any matches, stopFinding will set the selection on the found text.
+ // However, we do not expect any matches, so check that the selection is null.
+ frame->stopFinding(false);
+ range = frame->selectionRange();
+ ASSERT_TRUE(range.isNull());
+
webView->close();
}
@@ -1150,9 +1158,10 @@
webView->layout();
webkit_support::RunAllPendingMessages();
+ // Note that the 'result 19' in the <select> element is not expected to produce a match.
static const char* kFindString = "result";
static const int kFindIdentifier = 12345;
- static const int kNumResults = 16;
+ static const int kNumResults = 19;
WebFindOptions options;
WebString searchText = WebString::fromUTF8(kFindString);
@@ -1243,6 +1252,13 @@
EXPECT_TRUE(webMatchRects[13].y < webMatchRects[12].y);
EXPECT_TRUE(webMatchRects[12].y < webMatchRects[14].y);
+ // Result 16 should be below result 15.
+ EXPECT_TRUE(webMatchRects[15].y > webMatchRects[14].y);
+
+ // Result 18 should be normalized with respect to the position:relative div, and not it's
+ // immediate containing div. Consequently, result 18 should be above result 17.
+ EXPECT_TRUE(webMatchRects[17].y > webMatchRects[18].y);
+
// Resizing should update the rects version.
webView->resize(WebSize(800, 600));
webkit_support::RunAllPendingMessages();
« no previous file with comments | « Source/WebKit/chromium/src/FindInPageCoordinates.cpp ('k') | Source/WebKit/chromium/tests/data/find.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698