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

Side by Side Diff: third_party/WebKit/Source/core/html/TextControlElementTest.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: 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 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/html/TextControlElement.h" 5 #include "core/html/TextControlElement.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/editing/spellcheck/SpellChecker.h" 9 #include "core/editing/spellcheck/SpellChecker.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 EXPECT_EQ(startLayoutCount, layoutCount()); 112 EXPECT_EQ(startLayoutCount, layoutCount());
113 newCaretRect = LayoutRect(frameSelection.absoluteCaretBounds()); 113 newCaretRect = LayoutRect(frameSelection.absoluteCaretBounds());
114 EXPECT_NE(oldCaretRect, newCaretRect); 114 EXPECT_NE(oldCaretRect, newCaretRect);
115 } 115 }
116 116
117 TEST_F(TextControlElementTest, IndexForPosition) { 117 TEST_F(TextControlElementTest, IndexForPosition) {
118 HTMLInputElement* input = 118 HTMLInputElement* input =
119 toHTMLInputElement(document().getElementById("input")); 119 toHTMLInputElement(document().getElementById("input"));
120 input->setValue("Hello"); 120 input->setValue("Hello");
121 HTMLElement* innerEditor = input->innerEditorElement(); 121 HTMLElement* innerEditor = input->innerEditorElement();
122 EXPECT_EQ(5u, TextControlElement::indexForPosition( 122 EXPECT_EQ(
123 innerEditor, 123 5u,
124 Position(innerEditor, PositionAnchorType::AfterAnchor))); 124 TextControlElement::indexForPosition(
125 innerEditor, Position(innerEditor, PositionAnchorType::AfterAnchor)));
125 } 126 }
126 127
127 } // namespace blink 128 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698