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

Side by Side Diff: third_party/WebKit/Source/web/tests/CompositorWorkerTest.cpp

Issue 2165573003: Simplify tests by using Web*Impl types directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/frame/FrameView.h" 5 #include "core/frame/FrameView.h"
6 #include "core/layout/api/LayoutViewItem.h" 6 #include "core/layout/api/LayoutViewItem.h"
7 #include "core/layout/compositing/CompositedLayerMapping.h" 7 #include "core/layout/compositing/CompositedLayerMapping.h"
8 #include "core/layout/compositing/PaintLayerCompositor.h" 8 #include "core/layout/compositing/PaintLayerCompositor.h"
9 #include "core/page/Page.h" 9 #include "core/page/Page.h"
10 #include "platform/graphics/CompositorMutableProperties.h" 10 #include "platform/graphics/CompositorMutableProperties.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 WebLayer* getRootScrollLayer() 61 WebLayer* getRootScrollLayer()
62 { 62 {
63 PaintLayerCompositor* compositor = frame()->contentLayoutItem().composit or(); 63 PaintLayerCompositor* compositor = frame()->contentLayoutItem().composit or();
64 DCHECK(compositor); 64 DCHECK(compositor);
65 DCHECK(compositor->scrollLayer()); 65 DCHECK(compositor->scrollLayer());
66 66
67 WebLayer* webScrollLayer = compositor->scrollLayer()->platformLayer(); 67 WebLayer* webScrollLayer = compositor->scrollLayer()->platformLayer();
68 return webScrollLayer; 68 return webScrollLayer;
69 } 69 }
70 70
71 WebViewImpl* webViewImpl() const { return m_helper.webViewImpl(); } 71 WebViewImpl* webViewImpl() const { return m_helper.webView(); }
72 LocalFrame* frame() const { return m_helper.webViewImpl()->mainFrameImpl()-> frame(); } 72 LocalFrame* frame() const { return m_helper.webView()->mainFrameImpl()->fram e(); }
73 73
74 protected: 74 protected:
75 String m_baseURL; 75 String m_baseURL;
76 FrameTestHelpers::TestWebViewClient m_mockWebViewClient; 76 FrameTestHelpers::TestWebViewClient m_mockWebViewClient;
77 77
78 private: 78 private:
79 static void configureSettings(WebSettings* settings) 79 static void configureSettings(WebSettings* settings)
80 { 80 {
81 settings->setJavaScriptEnabled(true); 81 settings->setJavaScriptEnabled(true);
82 settings->setAcceleratedCompositingEnabled(true); 82 settings->setAcceleratedCompositingEnabled(true);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 { 297 {
298 const String& transformValue = document->domWindow()->getComputedStyle( proxiedElement, String())->getPropertyValueInternal(CSSPropertyTransform); 298 const String& transformValue = document->domWindow()->getComputedStyle( proxiedElement, String())->getPropertyValueInternal(CSSPropertyTransform);
299 EXPECT_EQ("matrix3d(11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44)", transformValue); 299 EXPECT_EQ("matrix3d(11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44)", transformValue);
300 300
301 const String& opacityValue = document->domWindow()->getComputedStyle(pro xiedElement, String())->getPropertyValueInternal(CSSPropertyOpacity); 301 const String& opacityValue = document->domWindow()->getComputedStyle(pro xiedElement, String())->getPropertyValueInternal(CSSPropertyOpacity);
302 EXPECT_EQ("0.8", opacityValue); 302 EXPECT_EQ("0.8", opacityValue);
303 } 303 }
304 } 304 }
305 305
306 } // namespace blink 306 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698