Bug 121485 - [Win] TestWebKitAPI does not compile.
Summary: [Win] TestWebKitAPI does not compile.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-17 05:44 PDT by peavo
Modified: 2013-09-18 09:32 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.58 KB, patch)
2013-09-17 06:20 PDT, peavo
no flags Details | Formatted Diff | Diff
Patch (4.64 KB, patch)
2013-09-18 04:51 PDT, peavo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 2013-09-17 05:44:21 PDT
There is currently a few compile errors in BitmapImageEmptyFrameTest in TestWebKitAPI, because it is no longer allowed to inherit from WebCore::BitmapImage, which the test relies on.
Comment 1 peavo 2013-09-17 06:20:30 PDT
Created attachment 211895 [details]
Patch
Comment 2 Brent Fulgham 2013-09-17 19:31:22 PDT
Comment on attachment 211895 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=211895&action=review

I have a few questions, but I think this looks good.  I'll r+ it and trust that you'll adjust things if you need to :-)

> Tools/TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:44
> +    auto hbmp = ::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, 0, 0, 0);

Does this need to be cleaned up somewhere? I can't tell (with a few seconds checking) whether we need to delete this GDI object.

Otherwise looks good to me.

> Tools/TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:48
> +    if (bitmapImageTest) {

I would prefer an early exit, but this is fine.

> Tools/TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:53
> +        HBITMAP hBitmap = CreateBitmap(sz.width(), sz.height(), 1, 32, bits);

Does this bitmap need to be destroyed to be correct in our GDI/memory handling?
Comment 3 peavo 2013-09-18 04:51:58 PDT
Created attachment 211985 [details]
Patch
Comment 4 peavo 2013-09-18 05:04:43 PDT
Thanks for reviewing, all valid points, updated patch :)
Comment 5 Brent Fulgham 2013-09-18 09:09:46 PDT
Comment on attachment 211985 [details]
Patch

r=me
Comment 6 WebKit Commit Bot 2013-09-18 09:32:14 PDT
Comment on attachment 211985 [details]
Patch

Clearing flags on attachment: 211985

Committed r156045: <http://trac.webkit.org/changeset/156045>
Comment 7 WebKit Commit Bot 2013-09-18 09:32:16 PDT
All reviewed patches have been landed.  Closing bug.