| 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 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2396 else if (option == "AtWordStarts") | 2396 else if (option == "AtWordStarts") |
| 2397 find_options.wordStart = true; | 2397 find_options.wordStart = true; |
| 2398 else if (option == "TreatMedialCapitalAsWordStart") | 2398 else if (option == "TreatMedialCapitalAsWordStart") |
| 2399 find_options.medialCapitalAsWordStart = true; | 2399 find_options.medialCapitalAsWordStart = true; |
| 2400 else if (option == "WrapAround") | 2400 else if (option == "WrapAround") |
| 2401 wrap_around = true; | 2401 wrap_around = true; |
| 2402 } | 2402 } |
| 2403 | 2403 |
| 2404 WebLocalFrame* frame = web_view_->mainFrame()->toWebLocalFrame(); | 2404 WebLocalFrame* frame = web_view_->mainFrame()->toWebLocalFrame(); |
| 2405 const bool find_result = frame->find(0, WebString::fromUTF8(search_text), | 2405 const bool find_result = frame->find(0, WebString::fromUTF8(search_text), |
| 2406 find_options, wrap_around, 0); | 2406 find_options, wrap_around, 0, nullptr); |
| 2407 frame->stopFinding(false); | 2407 frame->stopFinding(false); |
| 2408 return find_result; | 2408 return find_result; |
| 2409 } | 2409 } |
| 2410 | 2410 |
| 2411 std::string TestRunner::SelectionAsMarkup() { | 2411 std::string TestRunner::SelectionAsMarkup() { |
| 2412 return web_view_->mainFrame()->selectionAsMarkup().utf8(); | 2412 return web_view_->mainFrame()->selectionAsMarkup().utf8(); |
| 2413 } | 2413 } |
| 2414 | 2414 |
| 2415 void TestRunner::SetTextSubpixelPositioning(bool value) { | 2415 void TestRunner::SetTextSubpixelPositioning(bool value) { |
| 2416 #if defined(__linux__) || defined(ANDROID) | 2416 #if defined(__linux__) || defined(ANDROID) |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3228 } | 3228 } |
| 3229 | 3229 |
| 3230 void TestRunner::DidLosePointerLockInternal() { | 3230 void TestRunner::DidLosePointerLockInternal() { |
| 3231 bool was_locked = pointer_locked_; | 3231 bool was_locked = pointer_locked_; |
| 3232 pointer_locked_ = false; | 3232 pointer_locked_ = false; |
| 3233 if (was_locked) | 3233 if (was_locked) |
| 3234 web_view_->didLosePointerLock(); | 3234 web_view_->didLosePointerLock(); |
| 3235 } | 3235 } |
| 3236 | 3236 |
| 3237 } // namespace test_runner | 3237 } // namespace test_runner |
| OLD | NEW |