OLD | NEW |
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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
6 #include <memory> | 6 #include <memory> |
7 #include "core/exported/WebViewBase.h" | 7 #include "core/exported/WebViewBase.h" |
8 #include "core/frame/FrameTestHelpers.h" | 8 #include "core/frame/FrameTestHelpers.h" |
9 #include "core/frame/LocalFrameView.h" | 9 #include "core/frame/LocalFrameView.h" |
10 #include "core/frame/WebLocalFrameBase.h" | 10 #include "core/frame/WebLocalFrameBase.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 PaintLayerCompositor* compositor = | 84 PaintLayerCompositor* compositor = |
85 GetFrame()->ContentLayoutItem().Compositor(); | 85 GetFrame()->ContentLayoutItem().Compositor(); |
86 DCHECK(compositor); | 86 DCHECK(compositor); |
87 DCHECK(compositor->ScrollLayer()); | 87 DCHECK(compositor->ScrollLayer()); |
88 | 88 |
89 WebLayer* web_scroll_layer = compositor->ScrollLayer()->PlatformLayer(); | 89 WebLayer* web_scroll_layer = compositor->ScrollLayer()->PlatformLayer(); |
90 return web_scroll_layer; | 90 return web_scroll_layer; |
91 } | 91 } |
92 | 92 |
93 WebViewBase* GetWebView() const { return helper_.WebView(); } | 93 WebViewBase* GetWebView() const { return helper_.WebView(); } |
94 LocalFrame* GetFrame() const { | 94 LocalFrame* GetFrame() const { return helper_.LocalMainFrame()->GetFrame(); } |
95 return helper_.WebView()->MainFrameImpl()->GetFrame(); | |
96 } | |
97 | 95 |
98 protected: | 96 protected: |
99 String base_url_; | 97 String base_url_; |
100 | 98 |
101 private: | 99 private: |
102 static void ConfigureSettings(WebSettings* settings) { | 100 static void ConfigureSettings(WebSettings* settings) { |
103 settings->SetAcceleratedCompositingEnabled(true); | 101 settings->SetAcceleratedCompositingEnabled(true); |
104 settings->SetPreferCompositingToLCDTextEnabled(true); | 102 settings->SetPreferCompositingToLCDTextEnabled(true); |
105 } | 103 } |
106 | 104 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 369 |
372 const String& opacity_value = | 370 const String& opacity_value = |
373 document->domWindow() | 371 document->domWindow() |
374 ->getComputedStyle(proxied_element, String()) | 372 ->getComputedStyle(proxied_element, String()) |
375 ->GetPropertyValueInternal(CSSPropertyOpacity); | 373 ->GetPropertyValueInternal(CSSPropertyOpacity); |
376 EXPECT_EQ("0.8", opacity_value); | 374 EXPECT_EQ("0.8", opacity_value); |
377 } | 375 } |
378 } | 376 } |
379 | 377 |
380 } // namespace blink | 378 } // namespace blink |
OLD | NEW |