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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp

Issue 2188483004: Remove extraneous frameView->setNeedsLayout() in LayoutPart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove bogus test Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 31aee794cdd7ee85c899f12e872794e9eb68a403..807d953be493a72521c6fde33daff02f0a9ac3f0 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -95,40 +95,6 @@ TEST_F(FrameSelectionTest, InvalidateCaretRect)
EXPECT_FALSE(selection().isCaretBoundsDirty());
}
-TEST_F(FrameSelectionTest, PaintCaretShouldNotLayout)
-{
- Text* text = appendTextNode("Hello, World!");
- document().view()->updateAllLifecyclePhases();
-
- document().body()->setContentEditable("true", ASSERT_NO_EXCEPTION);
- document().body()->focus();
- EXPECT_TRUE(document().body()->focused());
-
- VisibleSelection validSelection(Position(text, 0), Position(text, 0));
- selection().setCaretVisible(true);
- setSelection(validSelection);
- EXPECT_TRUE(selection().isCaret());
- EXPECT_TRUE(shouldPaintCaretForTesting());
-
- int startCount = layoutCount();
- {
- // To force layout in next updateLayout calling, widen view.
- FrameView& frameView = dummyPageHolder().frameView();
- IntRect frameRect = frameView.frameRect();
- frameRect.setWidth(frameRect.width() + 1);
- frameRect.setHeight(frameRect.height() + 1);
- dummyPageHolder().frameView().setFrameRect(frameRect);
- }
- std::unique_ptr<PaintController> paintController = PaintController::create();
- {
- GraphicsContext context(*paintController);
- DrawingRecorder drawingRecorder(context, *dummyPageHolder().frameView().layoutView(), DisplayItem::Caret, LayoutRect::infiniteIntRect());
- selection().paintCaret(context, LayoutPoint());
- }
- paintController->commitNewDisplayItems();
- EXPECT_EQ(startCount, layoutCount());
trchen 2016/07/28 00:04:36 This is bogus. Resizing the frame would invalidate
bokan 2016/07/28 13:24:56 Agree, this is sketchy. Could you file a bug to fo
trchen 2016/07/28 22:45:54 I think the original bug is already solved. Xianzh
bokan 2016/07/28 22:48:41 ok, sgtm, thanks.
-}
-
TEST_F(FrameSelectionTest, InvalidatePreviousCaretAfterRemovingLastCharacter)
{
Text* text = appendTextNode("Hello, World!");
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698