| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/editing/commands/DeleteSelectionCommand.h" | 5 #include "core/editing/commands/DeleteSelectionCommand.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/editing/EditingTestBase.h" | 9 #include "core/editing/EditingTestBase.h" |
| 10 #include "core/editing/FrameSelection.h" | 10 #include "core/editing/FrameSelection.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 document(), kNoSmartDelete, kMergeBlocksAfterDelete, | 50 document(), kNoSmartDelete, kMergeBlocksAfterDelete, |
| 51 kNoExpandForSpecialElements, kSanitizeMarkup, | 51 kNoExpandForSpecialElements, kSanitizeMarkup, |
| 52 InputEvent::InputType::DeleteByCut); | 52 InputEvent::InputType::DeleteByCut); |
| 53 | 53 |
| 54 EXPECT_TRUE(command->apply()) << "the delete command should have succeeded"; | 54 EXPECT_TRUE(command->apply()) << "the delete command should have succeeded"; |
| 55 EXPECT_EQ("<div contenteditable=\"true\"><br></div>", | 55 EXPECT_EQ("<div contenteditable=\"true\"><br></div>", |
| 56 document().body()->innerHTML()); | 56 document().body()->innerHTML()); |
| 57 EXPECT_TRUE(frame->selection() | 57 EXPECT_TRUE(frame->selection() |
| 58 .computeVisibleSelectionInDOMTreeDeprecated() | 58 .computeVisibleSelectionInDOMTreeDeprecated() |
| 59 .isCaret()); | 59 .isCaret()); |
| 60 EXPECT_EQ(Position(div, 0), frame->selection().base().toOffsetInAnchor()); | 60 EXPECT_EQ(Position(div, 0), frame->selection() |
| 61 .computeVisibleSelectionInDOMTree() |
| 62 .base() |
| 63 .toOffsetInAnchor()); |
| 61 } | 64 } |
| 62 | 65 |
| 63 } // namespace blink | 66 } // namespace blink |
| OLD | NEW |