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

Unified Diff: Source/testing/runner/TestRunner.cpp

Issue 26654011: Fixing TestRunner::findString() so as to fix findString.html editing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing default initializations Created 7 years, 2 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: Source/testing/runner/TestRunner.cpp
diff --git a/Source/testing/runner/TestRunner.cpp b/Source/testing/runner/TestRunner.cpp
index deb4c40f8a7ac11ae827d5c2eb6135e8e8e59fcc..53e18cf91a0b2da4e175cae48f85b676a621546b 100644
--- a/Source/testing/runner/TestRunner.cpp
+++ b/Source/testing/runner/TestRunner.cpp
@@ -1322,14 +1322,20 @@ void TestRunner::findString(const CppArgumentList& arguments, CppVariant* result
if (arguments.size() >= 2) {
vector<string> optionsArray = arguments[1].toStringVector();
findOptions.matchCase = true;
+ findOptions.findNext = true;
for (size_t i = 0; i < optionsArray.size(); ++i) {
const std::string& option = optionsArray[i];
- // FIXME: Support all the options, so we can run findString.html too.
if (option == "CaseInsensitive")
findOptions.matchCase = false;
else if (option == "Backwards")
findOptions.forward = false;
+ else if (option == "StartInSelection")
+ findOptions.findNext = false;
+ else if (option == "AtWordStarts")
+ findOptions.wordStart = true;
+ else if (option == "TreatMedialCapitalAsWordStart")
+ findOptions.medialCapitalAsWordStart = true;
else if (option == "WrapAround")
wrapAround = true;
}
@@ -1337,6 +1343,7 @@ void TestRunner::findString(const CppArgumentList& arguments, CppVariant* result
WebFrame* frame = m_webView->mainFrame();
const bool findResult = frame->find(0, cppVariantToWebString(arguments[0]), findOptions, wrapAround, 0);
+ frame->stopFinding(false);
result->set(findResult);
}
« no previous file with comments | « LayoutTests/editing/text-iterator/findString-restarts-at-last-position-expected.txt ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698