| Index: third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
|
| index 96c14d16f740e3fa91102d8348a283d458a097dd..3cb855e83eb6036d57582fbdebb6bbe24aad80f0 100644
|
| --- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
|
| @@ -308,6 +308,23 @@ TEST_F(FrameSelectionTest, SelectAllWithUnselectableRoot) {
|
| "selctable.";
|
| }
|
|
|
| +TEST_F(FrameSelectionTest, SelectAllKeepsHandle) {
|
| + setBodyContent("<div id=sample>abc</div>");
|
| + Element* sample = document().getElementById("sample");
|
| + const Position endOfText(sample->firstChild(), 3);
|
| + FrameSelection::SetSelectionOptions options =
|
| + FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle |
|
| + FrameSelection::HandleVisible;
|
| + selection().setSelection(
|
| + SelectionInDOMTree::Builder().collapse(endOfText).build(), options);
|
| + EXPECT_TRUE(selection().isHandleVisible());
|
| + selection().selectAll();
|
| + EXPECT_TRUE(selection().isHandleVisible())
|
| + << "If handles were present before"
|
| + "selectAll. Then they should be present"
|
| + "after it.";
|
| +}
|
| +
|
| TEST_F(FrameSelectionTest, updateIfNeededAndFrameCaret) {
|
| setBodyContent("<style id=sample></style>");
|
| document().setDesignMode("on");
|
|
|