Commit 245e2e25 authored by jknotten@chromium.org's avatar jknotten@chromium.org

[skia] Fix unit test PlatformContextSkiaTest.trackOpaqueOvalTest

https://bugs.webkit.org/show_bug.cgi?id=77738

We need to clear the bitmap before the test runs, otherwise the
contents of the bitmap will be uninitialised. This causes an
unpredicatable result as the canvas draw operations blend the
destination bitmap with the source colour.

Similarly, valgrind discovered that
PlatformContextSkiaTest.trackOpaqueTest and
PlatformContextSkiaTest.trackOpaqueLineTest suffers from the same
problem.

Also, re-enable WebFrameTest.FindInPage which was falsely
blamed for making this test fail.

Reviewed by Stephen White.

* tests/PlatformContextSkiaTest.cpp:
(WebCore::TEST):
* tests/WebFrameTest.cpp:
(WebKit::TEST_F):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cecd6134
2012-02-03 John Knottenbelt <jknotten@chromium.org>
[skia] Fix unit test PlatformContextSkiaTest.trackOpaqueOvalTest
https://bugs.webkit.org/show_bug.cgi?id=77738
We need to clear the bitmap before the test runs, otherwise the
contents of the bitmap will be uninitialised. This causes an
unpredicatable result as the canvas draw operations blend the
destination bitmap with the source colour.
Similarly, valgrind discovered that
PlatformContextSkiaTest.trackOpaqueTest and
PlatformContextSkiaTest.trackOpaqueLineTest suffers from the same
problem.
Also, re-enable WebFrameTest.FindInPage which was falsely
blamed for making this test fail.
Reviewed by Stephen White.
* tests/PlatformContextSkiaTest.cpp:
(WebCore::TEST):
* tests/WebFrameTest.cpp:
(WebKit::TEST_F):
2012-02-03 Dana Jansens <danakj@chromium.org>
[Chromium] Use the current clip when marking paints as opaque
......@@ -58,6 +58,7 @@ TEST(PlatformContextSkiaTest, trackOpaqueTest)
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 400, 400);
bitmap.allocPixels();
bitmap.eraseColor(0);
SkCanvas canvas(bitmap);
PlatformContextSkia platformContext(&canvas);
......@@ -259,6 +260,7 @@ TEST(PlatformContextSkiaTest, trackOpaqueLineTest)
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
bitmap.allocPixels();
bitmap.eraseColor(0);
SkCanvas canvas(bitmap);
PlatformContextSkia platformContext(&canvas);
......@@ -498,6 +500,7 @@ TEST(PlatformContextSkiaTest, trackOpaqueOvalTest)
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
bitmap.allocPixels();
bitmap.eraseColor(0);
SkCanvas canvas(bitmap);
PlatformContextSkia platformContext(&canvas);
......
......@@ -381,7 +381,7 @@ TEST_F(WebFrameTest, ContextNotificationsIsolatedWorlds)
EXPECT_EQ(1, matchCount);
}
TEST_F(WebFrameTest, DISABLED_FindInPage)
TEST_F(WebFrameTest, FindInPage)
{
registerMockedHttpURLLoad("find.html");
WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "find.html");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment