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

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 missed out cases 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..c795fc343939ec94dc171decb24f6157914f69ab 100644
--- a/Source/testing/runner/TestRunner.cpp
+++ b/Source/testing/runner/TestRunner.cpp
@@ -1321,15 +1321,19 @@ void TestRunner::findString(const CppArgumentList& arguments, CppVariant* result
bool wrapAround = false;
if (arguments.size() >= 2) {
vector<string> optionsArray = arguments[1].toStringVector();
- findOptions.matchCase = 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 +1341,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);
}

Powered by Google App Engine
This is Rietveld 408576698