Changeset 106669 in webkit


Ignore:
Timestamp:
Feb 3, 2012 9:31:20 AM (12 years ago)
Author:
jknotten@chromium.org
Message:

[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):

Location:
trunk/Source/WebKit/chromium
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r106663 r106669  
     12012-02-03  John Knottenbelt  <jknotten@chromium.org>
     2
     3        [skia] Fix unit test PlatformContextSkiaTest.trackOpaqueOvalTest
     4        https://bugs.webkit.org/show_bug.cgi?id=77738
     5
     6        We need to clear the bitmap before the test runs, otherwise the
     7        contents of the bitmap will be uninitialised. This causes an
     8        unpredicatable result as the canvas draw operations blend the
     9        destination bitmap with the source colour.
     10
     11        Similarly, valgrind discovered that
     12        PlatformContextSkiaTest.trackOpaqueTest and
     13        PlatformContextSkiaTest.trackOpaqueLineTest suffers from the same
     14        problem.
     15
     16        Also, re-enable WebFrameTest.FindInPage which was falsely
     17        blamed for making this test fail.
     18
     19        Reviewed by Stephen White.
     20
     21        * tests/PlatformContextSkiaTest.cpp:
     22        (WebCore::TEST):
     23        * tests/WebFrameTest.cpp:
     24        (WebKit::TEST_F):
     25
    1262012-02-03  Dana Jansens  <danakj@chromium.org>
    227
  • trunk/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp

    r106663 r106669  
    5959    bitmap.setConfig(SkBitmap::kARGB_8888_Config, 400, 400);
    6060    bitmap.allocPixels();
     61    bitmap.eraseColor(0);
    6162    SkCanvas canvas(bitmap);
    6263
     
    260261    bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
    261262    bitmap.allocPixels();
     263    bitmap.eraseColor(0);
    262264    SkCanvas canvas(bitmap);
    263265
     
    499501    bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
    500502    bitmap.allocPixels();
     503    bitmap.eraseColor(0);
    501504    SkCanvas canvas(bitmap);
    502505
  • trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp

    r106439 r106669  
    382382}
    383383
    384 TEST_F(WebFrameTest, DISABLED_FindInPage)
     384TEST_F(WebFrameTest, FindInPage)
    385385{
    386386    registerMockedHttpURLLoad("find.html");
Note: See TracChangeset for help on using the changeset viewer.