| 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 6396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6407 webViewHelper.webView()->setSpellCheckClient(0); | 6407 webViewHelper.webView()->setSpellCheckClient(0); |
| 6408 | 6408 |
| 6409 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 6409 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
| 6410 Document* document = frame->frame()->document(); | 6410 Document* document = frame->frame()->document(); |
| 6411 Element* element = document->getElementById("data"); | 6411 Element* element = document->getElementById("data"); |
| 6412 | 6412 |
| 6413 webViewHelper.webView()->settings()->setEditingBehavior( | 6413 webViewHelper.webView()->settings()->setEditingBehavior( |
| 6414 WebSettings::EditingBehaviorWin); | 6414 WebSettings::EditingBehaviorWin); |
| 6415 | 6415 |
| 6416 element->focus(); | 6416 element->focus(); |
| 6417 frame->frame()->editor().replaceSelectionWithText("A", false, false); | 6417 frame->frame()->editor().replaceSelectionWithText( |
| 6418 "A", false, false, InputEvent::InputType::InsertReplacementText); |
| 6418 frame->frame()->spellChecker().cancelCheck(); | 6419 frame->frame()->spellChecker().cancelCheck(); |
| 6419 } | 6420 } |
| 6420 | 6421 |
| 6421 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { | 6422 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { |
| 6422 registerMockedHttpURLLoad("spell.html"); | 6423 registerMockedHttpURLLoad("spell.html"); |
| 6423 FrameTestHelpers::WebViewHelper webViewHelper; | 6424 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6424 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); | 6425 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); |
| 6425 | 6426 |
| 6426 StubbornSpellCheckClient spellcheck; | 6427 StubbornSpellCheckClient spellcheck; |
| 6427 webViewHelper.webView()->setSpellCheckClient(&spellcheck); | 6428 webViewHelper.webView()->setSpellCheckClient(&spellcheck); |
| (...skipping 4031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10459 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); | 10460 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); |
| 10460 HashSet<AtomicString> names; | 10461 HashSet<AtomicString> names; |
| 10461 for (Frame* frame = mainFrame->tree().firstChild(); frame; | 10462 for (Frame* frame = mainFrame->tree().firstChild(); frame; |
| 10462 frame = frame->tree().traverseNext()) { | 10463 frame = frame->tree().traverseNext()) { |
| 10463 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); | 10464 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); |
| 10464 } | 10465 } |
| 10465 EXPECT_EQ(10u, names.size()); | 10466 EXPECT_EQ(10u, names.size()); |
| 10466 } | 10467 } |
| 10467 | 10468 |
| 10468 } // namespace blink | 10469 } // namespace blink |
| OLD | NEW |