Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommandTest.cpp

Issue 2709793003: Expand FrameSeleciton::base() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-22T13:08:01 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698