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 6494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6505 webViewHelper.webView()->setSpellCheckClient(0); | 6505 webViewHelper.webView()->setSpellCheckClient(0); |
6506 | 6506 |
6507 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 6507 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
6508 Document* document = frame->frame()->document(); | 6508 Document* document = frame->frame()->document(); |
6509 Element* element = document->getElementById("data"); | 6509 Element* element = document->getElementById("data"); |
6510 | 6510 |
6511 webViewHelper.webView()->settings()->setEditingBehavior( | 6511 webViewHelper.webView()->settings()->setEditingBehavior( |
6512 WebSettings::EditingBehaviorWin); | 6512 WebSettings::EditingBehaviorWin); |
6513 | 6513 |
6514 element->focus(); | 6514 element->focus(); |
6515 frame->frame()->editor().replaceSelectionForSpellChecker("A"); | 6515 frame->frame()->editor().replaceSelectionWithText( |
| 6516 "A", false, false, InputEvent::InputType::InsertReplacementText); |
6516 frame->frame()->spellChecker().cancelCheck(); | 6517 frame->frame()->spellChecker().cancelCheck(); |
6517 } | 6518 } |
6518 | 6519 |
6519 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { | 6520 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { |
6520 registerMockedHttpURLLoad("spell.html"); | 6521 registerMockedHttpURLLoad("spell.html"); |
6521 FrameTestHelpers::WebViewHelper webViewHelper; | 6522 FrameTestHelpers::WebViewHelper webViewHelper; |
6522 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); | 6523 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); |
6523 | 6524 |
6524 StubbornSpellCheckClient spellcheck; | 6525 StubbornSpellCheckClient spellcheck; |
6525 webViewHelper.webView()->setSpellCheckClient(&spellcheck); | 6526 webViewHelper.webView()->setSpellCheckClient(&spellcheck); |
(...skipping 4741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11267 | 11268 |
11268 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); | 11269 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); |
11269 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); | 11270 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); |
11270 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); | 11271 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); |
11271 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); | 11272 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); |
11272 | 11273 |
11273 webViewHelper.reset(); | 11274 webViewHelper.reset(); |
11274 } | 11275 } |
11275 | 11276 |
11276 } // namespace blink | 11277 } // namespace blink |
OLD | NEW |