| 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 6492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6503 webViewHelper.webView()->setSpellCheckClient(0); | 6503 webViewHelper.webView()->setSpellCheckClient(0); |
| 6504 | 6504 |
| 6505 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 6505 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
| 6506 Document* document = frame->frame()->document(); | 6506 Document* document = frame->frame()->document(); |
| 6507 Element* element = document->getElementById("data"); | 6507 Element* element = document->getElementById("data"); |
| 6508 | 6508 |
| 6509 webViewHelper.webView()->settings()->setEditingBehavior( | 6509 webViewHelper.webView()->settings()->setEditingBehavior( |
| 6510 WebSettings::EditingBehaviorWin); | 6510 WebSettings::EditingBehaviorWin); |
| 6511 | 6511 |
| 6512 element->focus(); | 6512 element->focus(); |
| 6513 frame->frame()->editor().replaceSelectionWithText( | 6513 frame->frame()->editor().replaceSelectionForSpellChecker("A"); |
| 6514 "A", false, false, InputEvent::InputType::InsertReplacementText); | |
| 6515 frame->frame()->spellChecker().cancelCheck(); | 6514 frame->frame()->spellChecker().cancelCheck(); |
| 6516 } | 6515 } |
| 6517 | 6516 |
| 6518 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { | 6517 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { |
| 6519 registerMockedHttpURLLoad("spell.html"); | 6518 registerMockedHttpURLLoad("spell.html"); |
| 6520 FrameTestHelpers::WebViewHelper webViewHelper; | 6519 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6521 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); | 6520 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); |
| 6522 | 6521 |
| 6523 StubbornSpellCheckClient spellcheck; | 6522 StubbornSpellCheckClient spellcheck; |
| 6524 webViewHelper.webView()->setSpellCheckClient(&spellcheck); | 6523 webViewHelper.webView()->setSpellCheckClient(&spellcheck); |
| (...skipping 4569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11094 | 11093 |
| 11095 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); | 11094 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); |
| 11096 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); | 11095 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); |
| 11097 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); | 11096 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); |
| 11098 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); | 11097 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); |
| 11099 | 11098 |
| 11100 webViewHelper.reset(); | 11099 webViewHelper.reset(); |
| 11101 } | 11100 } |
| 11102 | 11101 |
| 11103 } // namespace blink | 11102 } // namespace blink |
| OLD | NEW |