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

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 264713014: Remove the composited path from WebViewImpl::paint(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: paint-compositor: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | public/web/WebWidget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index a300a81d87a4112769e38905790d2758f60b4056..fefac2e1f27ecf140948d970734e4730fa3fd788 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -245,6 +245,11 @@ TEST_F(WebViewTest, SetBaseBackgroundColorBeforeMainFrame)
EXPECT_EQ(kBlue, webView->backgroundColor());
}
+static void disableAccleratedCompositing(WebSettings* webSettings)
+{
+ webSettings->setAcceleratedCompositingEnabled(false);
+}
+
TEST_F(WebViewTest, SetBaseBackgroundColorAndBlendWithExistingContent)
{
const WebColor kAlphaRed = 0x80FF0000;
@@ -252,8 +257,13 @@ TEST_F(WebViewTest, SetBaseBackgroundColorAndBlendWithExistingContent)
const int kWidth = 100;
const int kHeight = 100;
+ // Make a WebView that is not composited.
+ bool enableJavascript = false;
+ FrameTestHelpers::TestWebFrameClient* frameClient = 0;
+ WebViewClient* viewClient = 0;
+ WebView* webView = m_webViewHelper.initialize(enableJavascript, frameClient, viewClient, &disableAccleratedCompositing);
+
// Set WebView background to green with alpha.
- WebView* webView = m_webViewHelper.initialize();
webView->setBaseBackgroundColor(kAlphaGreen);
webView->settings()->setShouldClearDocumentBackground(false);
webView->resize(WebSize(kWidth, kHeight));
@@ -269,10 +279,7 @@ TEST_F(WebViewTest, SetBaseBackgroundColorAndBlendWithExistingContent)
// The result should be a blend of red and green.
SkColor color = bitmap.getColor(kWidth / 2, kHeight / 2);
EXPECT_TRUE(WebCore::redChannel(color));
- // FIXME: This should be EXPECT_TRUE. This looks to only work
- // if compositing is disabled, which is no longer a shipping configuration.
- // crbug.com/365810
- EXPECT_FALSE(WebCore::greenChannel(color));
+ EXPECT_TRUE(WebCore::greenChannel(color));
}
TEST_F(WebViewTest, FocusIsInactive)
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | public/web/WebWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698