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

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

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. 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/InputMethodController.h" 5 #include "core/editing/InputMethodController.h"
6 6
7 #include "core/dom/Element.h" 7 #include "core/dom/Element.h"
8 #include "core/dom/Range.h" 8 #include "core/dom/Range.h"
9 #include "core/editing/FrameSelection.h" 9 #include "core/editing/FrameSelection.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 15 matching lines...) Expand all
26 void SetUp() override; 26 void SetUp() override;
27 27
28 OwnPtr<DummyPageHolder> m_dummyPageHolder; 28 OwnPtr<DummyPageHolder> m_dummyPageHolder;
29 Persistent<HTMLDocument> m_document; 29 Persistent<HTMLDocument> m_document;
30 }; 30 };
31 31
32 void InputMethodControllerTest::SetUp() 32 void InputMethodControllerTest::SetUp()
33 { 33 {
34 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); 34 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
35 m_document = toHTMLDocument(&m_dummyPageHolder->document()); 35 m_document = toHTMLDocument(&m_dummyPageHolder->document());
36 ASSERT(m_document); 36 DCHECK(m_document);
37 } 37 }
38 38
39 Element* InputMethodControllerTest::insertHTMLElement( 39 Element* InputMethodControllerTest::insertHTMLElement(
40 const char* elementCode, const char* elementId) 40 const char* elementCode, const char* elementId)
41 { 41 {
42 document().write(elementCode); 42 document().write(elementCode);
43 document().updateLayout(); 43 document().updateLayout();
44 Element* element = document().getElementById(elementId); 44 Element* element = document().getElementById(elementId);
45 element->focus(); 45 element->focus();
46 return element; 46 return element;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 Vector<CompositionUnderline> underlines; 185 Vector<CompositionUnderline> underlines;
186 underlines.append(CompositionUnderline(0, 5, Color(255, 0, 0), false, 0)); 186 underlines.append(CompositionUnderline(0, 5, Color(255, 0, 0), false, 0));
187 controller().setComposition("foo", underlines, 0, 3); 187 controller().setComposition("foo", underlines, 0, 3);
188 controller().confirmComposition(); 188 controller().confirmComposition();
189 189
190 EXPECT_STREQ("foo", input->value().utf8().data()); 190 EXPECT_STREQ("foo", input->value().utf8().data());
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698