OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/test_runner/test_runner.h" | 5 #include "components/test_runner/test_runner.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <limits> | 8 #include <limits> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2386 else if (option == "AtWordStarts") | 2386 else if (option == "AtWordStarts") |
2387 find_options.wordStart = true; | 2387 find_options.wordStart = true; |
2388 else if (option == "TreatMedialCapitalAsWordStart") | 2388 else if (option == "TreatMedialCapitalAsWordStart") |
2389 find_options.medialCapitalAsWordStart = true; | 2389 find_options.medialCapitalAsWordStart = true; |
2390 else if (option == "WrapAround") | 2390 else if (option == "WrapAround") |
2391 wrap_around = true; | 2391 wrap_around = true; |
2392 } | 2392 } |
2393 | 2393 |
2394 WebLocalFrame* frame = web_view_->mainFrame()->toWebLocalFrame(); | 2394 WebLocalFrame* frame = web_view_->mainFrame()->toWebLocalFrame(); |
2395 const bool find_result = frame->find(0, WebString::fromUTF8(search_text), | 2395 const bool find_result = frame->find(0, WebString::fromUTF8(search_text), |
2396 find_options, wrap_around, 0); | 2396 find_options, wrap_around, 0, nullptr); |
2397 frame->stopFinding(false); | 2397 frame->stopFinding(false); |
2398 return find_result; | 2398 return find_result; |
2399 } | 2399 } |
2400 | 2400 |
2401 std::string TestRunner::SelectionAsMarkup() { | 2401 std::string TestRunner::SelectionAsMarkup() { |
2402 return web_view_->mainFrame()->selectionAsMarkup().utf8(); | 2402 return web_view_->mainFrame()->selectionAsMarkup().utf8(); |
2403 } | 2403 } |
2404 | 2404 |
2405 void TestRunner::SetTextSubpixelPositioning(bool value) { | 2405 void TestRunner::SetTextSubpixelPositioning(bool value) { |
2406 #if defined(__linux__) || defined(ANDROID) | 2406 #if defined(__linux__) || defined(ANDROID) |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3213 } | 3213 } |
3214 | 3214 |
3215 void TestRunner::DidLosePointerLockInternal() { | 3215 void TestRunner::DidLosePointerLockInternal() { |
3216 bool was_locked = pointer_locked_; | 3216 bool was_locked = pointer_locked_; |
3217 pointer_locked_ = false; | 3217 pointer_locked_ = false; |
3218 if (was_locked) | 3218 if (was_locked) |
3219 web_view_->didLosePointerLock(); | 3219 web_view_->didLosePointerLock(); |
3220 } | 3220 } |
3221 | 3221 |
3222 } // namespace test_runner | 3222 } // namespace test_runner |
OLD | NEW |