| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 6266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6277 webViewHelper.webView()->setSpellCheckClient(0); | 6277 webViewHelper.webView()->setSpellCheckClient(0); |
| 6278 | 6278 |
| 6279 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 6279 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
| 6280 Document* document = frame->frame()->document(); | 6280 Document* document = frame->frame()->document(); |
| 6281 Element* element = document->getElementById("data"); | 6281 Element* element = document->getElementById("data"); |
| 6282 | 6282 |
| 6283 webViewHelper.webView()->settings()->setEditingBehavior( | 6283 webViewHelper.webView()->settings()->setEditingBehavior( |
| 6284 WebSettings::EditingBehaviorWin); | 6284 WebSettings::EditingBehaviorWin); |
| 6285 | 6285 |
| 6286 element->focus(); | 6286 element->focus(); |
| 6287 frame->frame()->editor().replaceSelectionWithText("A", false, false); | 6287 frame->frame()->editor().replaceSelectionWithText( |
| 6288 "A", false, false, InputEvent::InputType::InsertReplacementText); |
| 6288 frame->frame()->spellChecker().cancelCheck(); | 6289 frame->frame()->spellChecker().cancelCheck(); |
| 6289 } | 6290 } |
| 6290 | 6291 |
| 6291 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { | 6292 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { |
| 6292 registerMockedHttpURLLoad("spell.html"); | 6293 registerMockedHttpURLLoad("spell.html"); |
| 6293 FrameTestHelpers::WebViewHelper webViewHelper; | 6294 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6294 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); | 6295 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); |
| 6295 | 6296 |
| 6296 StubbornSpellCheckClient spellcheck; | 6297 StubbornSpellCheckClient spellcheck; |
| 6297 webViewHelper.webView()->setSpellCheckClient(&spellcheck); | 6298 webViewHelper.webView()->setSpellCheckClient(&spellcheck); |
| (...skipping 3962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10260 webViewHelper.webView()->handleInputEvent(endEvent); | 10261 webViewHelper.webView()->handleInputEvent(endEvent); |
| 10261 webViewHelper.webView()->handleInputEvent(updateEvent); | 10262 webViewHelper.webView()->handleInputEvent(updateEvent); |
| 10262 | 10263 |
| 10263 // Try a full Begin/Update/End cycle. | 10264 // Try a full Begin/Update/End cycle. |
| 10264 webViewHelper.webView()->handleInputEvent(beginEvent); | 10265 webViewHelper.webView()->handleInputEvent(beginEvent); |
| 10265 webViewHelper.webView()->handleInputEvent(updateEvent); | 10266 webViewHelper.webView()->handleInputEvent(updateEvent); |
| 10266 webViewHelper.webView()->handleInputEvent(endEvent); | 10267 webViewHelper.webView()->handleInputEvent(endEvent); |
| 10267 } | 10268 } |
| 10268 | 10269 |
| 10269 } // namespace blink | 10270 } // namespace blink |
| OLD | NEW |