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: Source/core/html/HTMLTextFormControlElementTest.cpp

Issue 1126883002: Change all one-off lifecycle callers to FrameView::updateLayoutAndStyleForPainting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "core/html/HTMLTextFormControlElement.h" 6 #include "core/html/HTMLTextFormControlElement.h"
7 7
8 #include "core/dom/Position.h" 8 #include "core/dom/Position.h"
9 #include "core/dom/Text.h" 9 #include "core/dom/Text.h"
10 #include "core/editing/FrameSelection.h" 10 #include "core/editing/FrameSelection.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void HTMLTextFormControlElementTest::SetUp() 72 void HTMLTextFormControlElementTest::SetUp()
73 { 73 {
74 Page::PageClients pageClients; 74 Page::PageClients pageClients;
75 fillWithEmptyClients(pageClients); 75 fillWithEmptyClients(pageClients);
76 m_spellCheckerClient = adoptPtr(new DummySpellCheckerClient); 76 m_spellCheckerClient = adoptPtr(new DummySpellCheckerClient);
77 pageClients.spellCheckerClient = m_spellCheckerClient.get(); 77 pageClients.spellCheckerClient = m_spellCheckerClient.get();
78 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600), &pageClients) ; 78 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600), &pageClients) ;
79 79
80 m_document = toHTMLDocument(&m_dummyPageHolder->document()); 80 m_document = toHTMLDocument(&m_dummyPageHolder->document());
81 m_document->documentElement()->setInnerHTML("<body><textarea id=textarea></t extarea><input id=input /></body>", ASSERT_NO_EXCEPTION); 81 m_document->documentElement()->setInnerHTML("<body><textarea id=textarea></t extarea><input id=input /></body>", ASSERT_NO_EXCEPTION);
82 m_document->view()->updateLayoutAndStyleIfNeededRecursive(); 82 m_document->view()->updateLayoutAndStyleForPainting();
83 m_textControl = toHTMLTextFormControlElement(m_document->getElementById("tex tarea")); 83 m_textControl = toHTMLTextFormControlElement(m_document->getElementById("tex tarea"));
84 m_textControl->focus(); 84 m_textControl->focus();
85 m_input = toHTMLInputElement(m_document->getElementById("input")); 85 m_input = toHTMLInputElement(m_document->getElementById("input"));
86 } 86 }
87 87
88 void HTMLTextFormControlElementTest::forceLayoutFlag() 88 void HTMLTextFormControlElementTest::forceLayoutFlag()
89 { 89 {
90 FrameView& frameView = page().frameView(); 90 FrameView& frameView = page().frameView();
91 IntRect frameRect = frameView.frameRect(); 91 IntRect frameRect = frameView.frameRect();
92 frameRect.setWidth(frameRect.width() + 1); 92 frameRect.setWidth(frameRect.width() + 1);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 ASSERT_EQ(3, input->selectionStart()); 219 ASSERT_EQ(3, input->selectionStart());
220 220
221 OwnPtrWillBePersistent<SpellChecker> spellChecker(SpellChecker::create(page( ).frame())); 221 OwnPtrWillBePersistent<SpellChecker> spellChecker(SpellChecker::create(page( ).frame()));
222 forceLayoutFlag(); 222 forceLayoutFlag();
223 int startCount = layoutCount(); 223 int startCount = layoutCount();
224 spellChecker->respondToChangedSelection(oldSelection, FrameSelection::CloseT yping | FrameSelection::ClearTypingStyle); 224 spellChecker->respondToChangedSelection(oldSelection, FrameSelection::CloseT yping | FrameSelection::ClearTypingStyle);
225 EXPECT_EQ(startCount, layoutCount()); 225 EXPECT_EQ(startCount, layoutCount());
226 } 226 }
227 227
228 } 228 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLSelectElementTest.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698