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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/SelectionAdjuster.h" 5 #include "core/editing/SelectionAdjuster.h"
6 6
7 #include "core/editing/EditingTestBase.h" 7 #include "core/editing/EditingTestBase.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 namespace { 11 namespace {
12 12
13 class MockVisibleSelectionChangeObserver final : 13 class MockVisibleSelectionChangeObserver final :
14 public NoBaseWillBeGarbageCollectedFinalized<MockVisibleSelectionChangeObser ver>, 14 public GarbageCollectedFinalized<MockVisibleSelectionChangeObserver>,
15 public VisibleSelectionChangeObserver { 15 public VisibleSelectionChangeObserver {
16 WTF_MAKE_NONCOPYABLE(MockVisibleSelectionChangeObserver); 16 WTF_MAKE_NONCOPYABLE(MockVisibleSelectionChangeObserver);
17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockVisibleSelectionChangeObserver); 17 USING_GARBAGE_COLLECTED_MIXIN(MockVisibleSelectionChangeObserver);
18 public: 18 public:
19 MockVisibleSelectionChangeObserver() = default; 19 MockVisibleSelectionChangeObserver() = default;
20 ~MockVisibleSelectionChangeObserver() final = default; 20 ~MockVisibleSelectionChangeObserver() final = default;
21 21
22 int callCounter() const { return m_callCounter; } 22 int callCounter() const { return m_callCounter; }
23 23
24 private: 24 private:
25 // VisibleSelectionChangeObserver interface. 25 // VisibleSelectionChangeObserver interface.
26 void didChangeVisibleSelection() final { ++m_callCounter; } 26 void didChangeVisibleSelection() final { ++m_callCounter; }
27 27
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 VisibleSelectionInFlatTree selectionInFlatTree( 63 VisibleSelectionInFlatTree selectionInFlatTree(
64 PositionInFlatTree(foo, 0), 64 PositionInFlatTree(foo, 0),
65 PositionInFlatTree(foo, 3)); 65 PositionInFlatTree(foo, 3));
66 SelectionAdjuster::adjustSelectionInDOMTree(&selection, selectionInFlatTree) ; 66 SelectionAdjuster::adjustSelectionInDOMTree(&selection, selectionInFlatTree) ;
67 EXPECT_EQ(Position(foo, 0), selection.start()); 67 EXPECT_EQ(Position(foo, 0), selection.start());
68 EXPECT_EQ(Position(foo, 3), selection.end()); 68 EXPECT_EQ(Position(foo, 3), selection.end());
69 EXPECT_EQ(1, selectionObserver.callCounter()) << "adjustSelectionInDOMTree() should call didChangeVisibleSelection()"; 69 EXPECT_EQ(1, selectionObserver.callCounter()) << "adjustSelectionInDOMTree() should call didChangeVisibleSelection()";
70 } 70 }
71 71
72 } // namespace blink 72 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Selection.idl ('k') | third_party/WebKit/Source/core/editing/SelectionController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698