| 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 6267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6278 webViewHelper.webView()->setSpellCheckClient(0); | 6278 webViewHelper.webView()->setSpellCheckClient(0); |
| 6279 | 6279 |
| 6280 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 6280 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
| 6281 Document* document = frame->frame()->document(); | 6281 Document* document = frame->frame()->document(); |
| 6282 Element* element = document->getElementById("data"); | 6282 Element* element = document->getElementById("data"); |
| 6283 | 6283 |
| 6284 webViewHelper.webView()->settings()->setEditingBehavior( | 6284 webViewHelper.webView()->settings()->setEditingBehavior( |
| 6285 WebSettings::EditingBehaviorWin); | 6285 WebSettings::EditingBehaviorWin); |
| 6286 | 6286 |
| 6287 element->focus(); | 6287 element->focus(); |
| 6288 frame->frame()->editor().replaceSelectionWithText("A", false, false); | 6288 frame->frame()->editor().replaceSelectionWithText( |
| 6289 "A", false, false, InputEvent::InputType::InsertReplacementText); |
| 6289 frame->frame()->spellChecker().cancelCheck(); | 6290 frame->frame()->spellChecker().cancelCheck(); |
| 6290 } | 6291 } |
| 6291 | 6292 |
| 6292 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { | 6293 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { |
| 6293 registerMockedHttpURLLoad("spell.html"); | 6294 registerMockedHttpURLLoad("spell.html"); |
| 6294 FrameTestHelpers::WebViewHelper webViewHelper; | 6295 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6295 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); | 6296 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); |
| 6296 | 6297 |
| 6297 StubbornSpellCheckClient spellcheck; | 6298 StubbornSpellCheckClient spellcheck; |
| 6298 webViewHelper.webView()->setSpellCheckClient(&spellcheck); | 6299 webViewHelper.webView()->setSpellCheckClient(&spellcheck); |
| (...skipping 3962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10261 webViewHelper.webView()->handleInputEvent(endEvent); | 10262 webViewHelper.webView()->handleInputEvent(endEvent); |
| 10262 webViewHelper.webView()->handleInputEvent(updateEvent); | 10263 webViewHelper.webView()->handleInputEvent(updateEvent); |
| 10263 | 10264 |
| 10264 // Try a full Begin/Update/End cycle. | 10265 // Try a full Begin/Update/End cycle. |
| 10265 webViewHelper.webView()->handleInputEvent(beginEvent); | 10266 webViewHelper.webView()->handleInputEvent(beginEvent); |
| 10266 webViewHelper.webView()->handleInputEvent(updateEvent); | 10267 webViewHelper.webView()->handleInputEvent(updateEvent); |
| 10267 webViewHelper.webView()->handleInputEvent(endEvent); | 10268 webViewHelper.webView()->handleInputEvent(endEvent); |
| 10268 } | 10269 } |
| 10269 | 10270 |
| 10270 } // namespace blink | 10271 } // namespace blink |
| OLD | NEW |