| Index: third_party/WebKit/Source/web/tests/TextFinderTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/TextFinderTest.cpp b/third_party/WebKit/Source/web/tests/TextFinderTest.cpp
|
| index d3260d19e37f143f946b6370df91390d8bf65cb5..38aad02cbbe5b1931b22f70fd0026835084b83e0 100644
|
| --- a/third_party/WebKit/Source/web/tests/TextFinderTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/TextFinderTest.cpp
|
| @@ -395,6 +395,22 @@ TEST_F(TextFinderTest, SequentialMatches)
|
| EXPECT_EQ(findInPageRect(textNode, 4, textNode, 6), matchRects[2]);
|
| }
|
|
|
| +TEST_F(TextFinderTest, WhitespaceMatches)
|
| +{
|
| + document().body()->setInnerHTML("<span>Some text </span> <input type='button' value='Button text'/><span>Some more text</span>", ASSERT_NO_EXCEPTION);
|
| +
|
| + int identifier = 0;
|
| + WebString searchText(String(" "));
|
| + WebFindOptions findOptions; // Default.
|
| +
|
| + textFinder().resetMatchCount();
|
| + textFinder().scopeStringMatches(identifier, searchText, findOptions, true);
|
| + while (textFinder().scopingInProgress())
|
| + runPendingTasks();
|
| +
|
| + EXPECT_EQ(5, textFinder().totalMatchCount());
|
| +}
|
| +
|
| class TextFinderFakeTimerTest : public TextFinderTest {
|
| protected:
|
| // A simple platform that mocks out the clock.
|
|
|