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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp

Issue 2703403002: Get rid of unused enum member DoNotUpdateAppearance from FrameSelection::SetSelectionOption (Closed)
Patch Set: 2017-02-22T00:32:44 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/spellcheck/SpellChecker.h" 5 #include "core/editing/spellcheck/SpellChecker.h"
6 6
7 #include "core/editing/EditingTestBase.h" 7 #include "core/editing/EditingTestBase.h"
8 #include "core/editing/Editor.h" 8 #include "core/editing/Editor.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 input->setValue("Hello, input field"); 49 input->setValue("Hello, input field");
50 document().updateStyleAndLayout(); 50 document().updateStyleAndLayout();
51 VisibleSelection oldSelection = 51 VisibleSelection oldSelection =
52 document() 52 document()
53 .frame() 53 .frame()
54 ->selection() 54 ->selection()
55 .computeVisibleSelectionInDOMTreeDeprecated(); 55 .computeVisibleSelectionInDOMTreeDeprecated();
56 56
57 Position newPosition(input->innerEditorElement()->firstChild(), 3); 57 Position newPosition(input->innerEditorElement()->firstChild(), 3);
58 document().frame()->selection().setSelection( 58 document().frame()->selection().setSelection(
59 SelectionInDOMTree::Builder().collapse(newPosition).build(), 59 SelectionInDOMTree::Builder().collapse(newPosition).build());
60 FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle |
61 FrameSelection::DoNotUpdateAppearance);
62 ASSERT_EQ(3u, input->selectionStart()); 60 ASSERT_EQ(3u, input->selectionStart());
63 61
64 Persistent<SpellChecker> spellChecker(SpellChecker::create(page().frame())); 62 Persistent<SpellChecker> spellChecker(SpellChecker::create(page().frame()));
65 forceLayout(); 63 forceLayout();
66 int startCount = layoutCount(); 64 int startCount = layoutCount();
67 spellChecker->respondToChangedSelection( 65 spellChecker->respondToChangedSelection(
68 oldSelection.start(), 66 oldSelection.start(),
69 FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle); 67 FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle);
70 EXPECT_EQ(startCount, layoutCount()); 68 EXPECT_EQ(startCount, layoutCount());
71 } 69 }
72 70
73 } // namespace blink 71 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698