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

Side by Side Diff: Source/core/html/HTMLTextFormControlElementTest.cpp

Issue 1225583004: Revert of Add a FrameView lifecycle method that just updates layout, style and compositing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void HTMLTextFormControlElementTest::SetUp() 70 void HTMLTextFormControlElementTest::SetUp()
71 { 71 {
72 Page::PageClients pageClients; 72 Page::PageClients pageClients;
73 fillWithEmptyClients(pageClients); 73 fillWithEmptyClients(pageClients);
74 m_spellCheckerClient = adoptPtr(new DummySpellCheckerClient); 74 m_spellCheckerClient = adoptPtr(new DummySpellCheckerClient);
75 pageClients.spellCheckerClient = m_spellCheckerClient.get(); 75 pageClients.spellCheckerClient = m_spellCheckerClient.get();
76 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600), &pageClients) ; 76 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600), &pageClients) ;
77 77
78 m_document = toHTMLDocument(&m_dummyPageHolder->document()); 78 m_document = toHTMLDocument(&m_dummyPageHolder->document());
79 m_document->documentElement()->setInnerHTML("<body><textarea id=textarea></t extarea><input id=input /></body>", ASSERT_NO_EXCEPTION); 79 m_document->documentElement()->setInnerHTML("<body><textarea id=textarea></t extarea><input id=input /></body>", ASSERT_NO_EXCEPTION);
80 m_document->view()->updateAllLifecyclePhases(); 80 m_document->view()->updateLayoutAndStyleForPainting();
81 m_textControl = toHTMLTextFormControlElement(m_document->getElementById("tex tarea")); 81 m_textControl = toHTMLTextFormControlElement(m_document->getElementById("tex tarea"));
82 m_textControl->focus(); 82 m_textControl->focus();
83 m_input = toHTMLInputElement(m_document->getElementById("input")); 83 m_input = toHTMLInputElement(m_document->getElementById("input"));
84 } 84 }
85 85
86 void HTMLTextFormControlElementTest::forceLayoutFlag() 86 void HTMLTextFormControlElementTest::forceLayoutFlag()
87 { 87 {
88 FrameView& frameView = page().frameView(); 88 FrameView& frameView = page().frameView();
89 IntRect frameRect = frameView.frameRect(); 89 IntRect frameRect = frameView.frameRect();
90 frameRect.setWidth(frameRect.width() + 1); 90 frameRect.setWidth(frameRect.width() + 1);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 ASSERT_EQ(3, input->selectionStart()); 217 ASSERT_EQ(3, input->selectionStart());
218 218
219 OwnPtrWillBePersistent<SpellChecker> spellChecker(SpellChecker::create(page( ).frame())); 219 OwnPtrWillBePersistent<SpellChecker> spellChecker(SpellChecker::create(page( ).frame()));
220 forceLayoutFlag(); 220 forceLayoutFlag();
221 int startCount = layoutCount(); 221 int startCount = layoutCount();
222 spellChecker->respondToChangedSelection(oldSelection, FrameSelection::CloseT yping | FrameSelection::ClearTypingStyle); 222 spellChecker->respondToChangedSelection(oldSelection, FrameSelection::CloseT yping | FrameSelection::ClearTypingStyle);
223 EXPECT_EQ(startCount, layoutCount()); 223 EXPECT_EQ(startCount, layoutCount());
224 } 224 }
225 225
226 } // namespace blink 226 } // namespace blink
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