| 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 29 matching lines...) Expand all Loading... |
| 40 #include "core/css/resolver/ViewportStyleResolver.h" | 40 #include "core/css/resolver/ViewportStyleResolver.h" |
| 41 #include "core/dom/Document.h" | 41 #include "core/dom/Document.h" |
| 42 #include "core/dom/DocumentUserGestureToken.h" | 42 #include "core/dom/DocumentUserGestureToken.h" |
| 43 #include "core/dom/Fullscreen.h" | 43 #include "core/dom/Fullscreen.h" |
| 44 #include "core/dom/NodeComputedStyle.h" | 44 #include "core/dom/NodeComputedStyle.h" |
| 45 #include "core/dom/Range.h" | 45 #include "core/dom/Range.h" |
| 46 #include "core/editing/Editor.h" | 46 #include "core/editing/Editor.h" |
| 47 #include "core/editing/EphemeralRange.h" | 47 #include "core/editing/EphemeralRange.h" |
| 48 #include "core/editing/FrameSelection.h" | 48 #include "core/editing/FrameSelection.h" |
| 49 #include "core/editing/VisiblePosition.h" | 49 #include "core/editing/VisiblePosition.h" |
| 50 #include "core/editing/commands/CompositeEditCommand.h" |
| 50 #include "core/editing/markers/DocumentMarkerController.h" | 51 #include "core/editing/markers/DocumentMarkerController.h" |
| 51 #include "core/editing/spellcheck/SpellChecker.h" | 52 #include "core/editing/spellcheck/SpellChecker.h" |
| 52 #include "core/events/MouseEvent.h" | 53 #include "core/events/MouseEvent.h" |
| 53 #include "core/fetch/FetchRequest.h" | 54 #include "core/fetch/FetchRequest.h" |
| 54 #include "core/fetch/MemoryCache.h" | 55 #include "core/fetch/MemoryCache.h" |
| 55 #include "core/fetch/ResourceFetcher.h" | 56 #include "core/fetch/ResourceFetcher.h" |
| 56 #include "core/frame/FrameHost.h" | 57 #include "core/frame/FrameHost.h" |
| 57 #include "core/frame/FrameView.h" | 58 #include "core/frame/FrameView.h" |
| 58 #include "core/frame/LocalFrame.h" | 59 #include "core/frame/LocalFrame.h" |
| 59 #include "core/frame/RemoteFrame.h" | 60 #include "core/frame/RemoteFrame.h" |
| (...skipping 6361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6421 | 6422 |
| 6422 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); | 6423 WebLocalFrameImpl* frame = webViewHelper.webView()->mainFrameImpl(); |
| 6423 Document* document = frame->frame()->document(); | 6424 Document* document = frame->frame()->document(); |
| 6424 Element* element = document->getElementById("data"); | 6425 Element* element = document->getElementById("data"); |
| 6425 | 6426 |
| 6426 webViewHelper.webView()->settings()->setEditingBehavior( | 6427 webViewHelper.webView()->settings()->setEditingBehavior( |
| 6427 WebSettings::EditingBehaviorWin); | 6428 WebSettings::EditingBehaviorWin); |
| 6428 | 6429 |
| 6429 element->focus(); | 6430 element->focus(); |
| 6430 frame->frame()->editor().replaceSelectionWithText( | 6431 frame->frame()->editor().replaceSelectionWithText( |
| 6431 "A", false, false, InputEvent::InputType::InsertReplacementText); | 6432 blink::CommandSource::MenuOrKeyBinding, "A", false, false, |
| 6433 InputEvent::InputType::InsertReplacementText); |
| 6432 frame->frame()->spellChecker().cancelCheck(); | 6434 frame->frame()->spellChecker().cancelCheck(); |
| 6433 } | 6435 } |
| 6434 | 6436 |
| 6435 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { | 6437 TEST_P(ParameterizedWebFrameTest, SpellcheckResultErasesMarkers) { |
| 6436 registerMockedHttpURLLoad("spell.html"); | 6438 registerMockedHttpURLLoad("spell.html"); |
| 6437 FrameTestHelpers::WebViewHelper webViewHelper; | 6439 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6438 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); | 6440 webViewHelper.initializeAndLoad(m_baseURL + "spell.html"); |
| 6439 | 6441 |
| 6440 StubbornSpellCheckClient spellcheck; | 6442 StubbornSpellCheckClient spellcheck; |
| 6441 webViewHelper.webView()->setSpellCheckClient(&spellcheck); | 6443 webViewHelper.webView()->setSpellCheckClient(&spellcheck); |
| (...skipping 4563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11005 | 11007 |
| 11006 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); | 11008 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); |
| 11007 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); | 11009 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); |
| 11008 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); | 11010 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); |
| 11009 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); | 11011 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); |
| 11010 | 11012 |
| 11011 webViewHelper.reset(); | 11013 webViewHelper.reset(); |
| 11012 } | 11014 } |
| 11013 | 11015 |
| 11014 } // namespace blink | 11016 } // namespace blink |
| OLD | NEW |