| 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 6273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6284 webViewHelper.webView()->setSpellCheckClient(0); | 6284 webViewHelper.webView()->setSpellCheckClient(0); |
| 6285 | 6285 |
| 6286 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 6286 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
| 6287 Document* document = frame->frame()->document(); | 6287 Document* document = frame->frame()->document(); |
| 6288 Element* element = document->getElementById("data"); | 6288 Element* element = document->getElementById("data"); |
| 6289 | 6289 |
| 6290 webViewHelper.webView()->settings()->setEditingBehavior( | 6290 webViewHelper.webView()->settings()->setEditingBehavior( |
| 6291 WebSettings::EditingBehaviorWin); | 6291 WebSettings::EditingBehaviorWin); |
| 6292 | 6292 |
| 6293 element->focus(); | 6293 element->focus(); |
| 6294 frame->frame()->editor().replaceSelectionWithText("A", false, false); | 6294 frame->frame()->editor().replaceSelectionWithText( |
| 6295 "A", false, false, InputEvent::InputType::InsertReplacementText); |
| 6295 frame->frame()->spellChecker().cancelCheck(); | 6296 frame->frame()->spellChecker().cancelCheck(); |
| 6296 } | 6297 } |
| 6297 | 6298 |
| 6298 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { | 6299 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { |
| 6299 registerMockedHttpURLLoad("spell.html"); | 6300 registerMockedHttpURLLoad("spell.html"); |
| 6300 FrameTestHelpers::WebViewHelper webViewHelper; | 6301 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6301 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); | 6302 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); |
| 6302 | 6303 |
| 6303 StubbornSpellCheckClient spellcheck; | 6304 StubbornSpellCheckClient spellcheck; |
| 6304 webViewHelper.webView()->setSpellCheckClient(&spellcheck); | 6305 webViewHelper.webView()->setSpellCheckClient(&spellcheck); |
| (...skipping 4030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10335 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); | 10336 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); |
| 10336 HashSet<AtomicString> names; | 10337 HashSet<AtomicString> names; |
| 10337 for (Frame* frame = mainFrame->tree().firstChild(); frame; | 10338 for (Frame* frame = mainFrame->tree().firstChild(); frame; |
| 10338 frame = frame->tree().traverseNext()) { | 10339 frame = frame->tree().traverseNext()) { |
| 10339 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); | 10340 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); |
| 10340 } | 10341 } |
| 10341 EXPECT_EQ(10u, names.size()); | 10342 EXPECT_EQ(10u, names.size()); |
| 10342 } | 10343 } |
| 10343 | 10344 |
| 10344 } // namespace blink | 10345 } // namespace blink |
| OLD | NEW |