| 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 6400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6411 webViewHelper.webView()->setSpellCheckClient(0); | 6411 webViewHelper.webView()->setSpellCheckClient(0); |
| 6412 | 6412 |
| 6413 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 6413 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
| 6414 Document* document = frame->frame()->document(); | 6414 Document* document = frame->frame()->document(); |
| 6415 Element* element = document->getElementById("data"); | 6415 Element* element = document->getElementById("data"); |
| 6416 | 6416 |
| 6417 webViewHelper.webView()->settings()->setEditingBehavior( | 6417 webViewHelper.webView()->settings()->setEditingBehavior( |
| 6418 WebSettings::EditingBehaviorWin); | 6418 WebSettings::EditingBehaviorWin); |
| 6419 | 6419 |
| 6420 element->focus(); | 6420 element->focus(); |
| 6421 frame->frame()->editor().replaceSelectionWithText("A", false, false); | 6421 frame->frame()->editor().replaceSelectionWithText( |
| 6422 "A", false, false, InputEvent::InputType::InsertReplacementText); |
| 6422 frame->frame()->spellChecker().cancelCheck(); | 6423 frame->frame()->spellChecker().cancelCheck(); |
| 6423 } | 6424 } |
| 6424 | 6425 |
| 6425 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { | 6426 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { |
| 6426 registerMockedHttpURLLoad("spell.html"); | 6427 registerMockedHttpURLLoad("spell.html"); |
| 6427 FrameTestHelpers::WebViewHelper webViewHelper; | 6428 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6428 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); | 6429 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); |
| 6429 | 6430 |
| 6430 StubbornSpellCheckClient spellcheck; | 6431 StubbornSpellCheckClient spellcheck; |
| 6431 webViewHelper.webView()->setSpellCheckClient(&spellcheck); | 6432 webViewHelper.webView()->setSpellCheckClient(&spellcheck); |
| (...skipping 4217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10649 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); | 10650 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); |
| 10650 HashSet<AtomicString> names; | 10651 HashSet<AtomicString> names; |
| 10651 for (Frame* frame = mainFrame->tree().firstChild(); frame; | 10652 for (Frame* frame = mainFrame->tree().firstChild(); frame; |
| 10652 frame = frame->tree().traverseNext()) { | 10653 frame = frame->tree().traverseNext()) { |
| 10653 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); | 10654 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); |
| 10654 } | 10655 } |
| 10655 EXPECT_EQ(10u, names.size()); | 10656 EXPECT_EQ(10u, names.size()); |
| 10656 } | 10657 } |
| 10657 | 10658 |
| 10658 } // namespace blink | 10659 } // namespace blink |
| OLD | NEW |