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

Unified Diff: Source/core/rendering/RenderingTestHelper.h

Issue 723103002: Revert "Move ViewDisplayList to GraphicsLayer" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/rendering/RenderingTestHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderingTestHelper.h
diff --git a/Source/core/rendering/RenderingTestHelper.h b/Source/core/rendering/RenderingTestHelper.h
index c579ea1debda5fa39d0cad6400347f3b8afd89b8..83b578f955775a35eec3eda5df7aade81422689d 100644
--- a/Source/core/rendering/RenderingTestHelper.h
+++ b/Source/core/rendering/RenderingTestHelper.h
@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef RenderingTestHelper_h
-#define RenderingTestHelper_h
-
#include "core/dom/Document.h"
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
@@ -17,27 +14,27 @@ namespace blink {
class RenderingTest : public testing::Test {
protected:
- virtual void SetUp() override;
+ virtual void SetUp()
+ {
+ m_pageHolder = DummyPageHolder::create(IntSize(800, 600));
+
+ document().settings()->setRegionBasedColumnsEnabled(true);
+
+ // This ensures that the minimal DOM tree gets attached
+ // correctly for tests that don't call setBodyInnerHTML.
+ document().view()->updateLayoutAndStyleIfNeededRecursive();
+ }
Document& document() const { return m_pageHolder->document(); }
void setBodyInnerHTML(const String& htmlContent)
{
document().body()->setInnerHTML(htmlContent, ASSERT_NO_EXCEPTION);
- document().view()->updateLayoutAndStyleForPainting();
- }
-
- void enableCompositing()
- {
- m_pageHolder->page().settings().setAcceleratedCompositingEnabled(true);
- document().view()->updateLayoutAndStyleForPainting();
+ document().view()->updateLayoutAndStyleIfNeededRecursive();
}
private:
- Page::PageClients m_pageClients;
OwnPtr<DummyPageHolder> m_pageHolder;
};
} // namespace blink
-
-#endif // RenderingTestHelper_h
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/rendering/RenderingTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698