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

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

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/events/MouseEvent.h" 10 #include "core/events/MouseEvent.h"
(...skipping 25 matching lines...) Expand all
36 { 36 {
37 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); 37 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
38 m_document = toHTMLDocument(&m_dummyPageHolder->document()); 38 m_document = toHTMLDocument(&m_dummyPageHolder->document());
39 DCHECK(m_document); 39 DCHECK(m_document);
40 } 40 }
41 41
42 Element* InputMethodControllerTest::insertHTMLElement( 42 Element* InputMethodControllerTest::insertHTMLElement(
43 const char* elementCode, const char* elementId) 43 const char* elementCode, const char* elementId)
44 { 44 {
45 document().write(elementCode); 45 document().write(elementCode);
46 document().updateLayout(); 46 document().updateStyleAndLayout();
47 Element* element = document().getElementById(elementId); 47 Element* element = document().getElementById(elementId);
48 element->focus(); 48 element->focus();
49 return element; 49 return element;
50 } 50 }
51 51
52 TEST_F(InputMethodControllerTest, BackspaceFromEndOfInput) 52 TEST_F(InputMethodControllerTest, BackspaceFromEndOfInput)
53 { 53 {
54 HTMLInputElement* input = toHTMLInputElement( 54 HTMLInputElement* input = toHTMLInputElement(
55 insertHTMLElement("<input id='sample'>", "sample")); 55 insertHTMLElement("<input id='sample'>", "sample"));
56 56
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 document().setTitle(emptyString()); 369 document().setTitle(emptyString());
370 controller().setComposition("foo", underlines, 0, 3); 370 controller().setComposition("foo", underlines, 0, 3);
371 EXPECT_STREQ("beforeinput.isComposing:true", document().title().utf8().data( )); 371 EXPECT_STREQ("beforeinput.isComposing:true", document().title().utf8().data( ));
372 372
373 document().setTitle(emptyString()); 373 document().setTitle(emptyString());
374 controller().confirmComposition(); 374 controller().confirmComposition();
375 EXPECT_STREQ("beforeinput.isComposing:false", document().title().utf8().data ()); 375 EXPECT_STREQ("beforeinput.isComposing:false", document().title().utf8().data ());
376 } 376 }
377 377
378 } // namespace blink 378 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698