Bug 73470 - Add tests for RetainPtr::adoptNS/adoptCF
Summary: Add tests for RetainPtr::adoptNS/adoptCF
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 10:58 PST by Sam Weinig
Modified: 2011-12-04 13:26 PST (History)
0 users

See Also:


Attachments
Patch (9.53 KB, patch)
2011-11-30 10:59 PST, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (10.56 KB, patch)
2011-12-02 18:32 PST, Sam Weinig
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2011-11-30 10:58:10 PST
Add tests for RetainPtr::adoptNS/adoptCF
Comment 1 Sam Weinig 2011-11-30 10:59:13 PST
Created attachment 117223 [details]
Patch
Comment 2 Adam Roben (:aroben) 2011-11-30 11:00:13 PST
Comment on attachment 117223 [details]
Patch

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

> Tools/ChangeLog:8
> +        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

And .vcproj plz!

> Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:39
> +    EXPECT_EQ(1, CFGetRetainCount(foo.get()));

Would -retainCount be better?
Comment 3 Sam Weinig 2011-11-30 17:07:38 PST
(In reply to comment #2)
> (From update of attachment 117223 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=117223&action=review
> 
> > Tools/ChangeLog:8
> > +        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
> 
> And .vcproj plz!

Ok.

> > Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:39
> > +    EXPECT_EQ(1, CFGetRetainCount(foo.get()));
> 
> Would -retainCount be better?

Not really, especially since we use CFRetain internally on these objects.
Comment 4 Sam Weinig 2011-12-02 18:32:51 PST
Created attachment 117730 [details]
Patch
Comment 5 Sam Weinig 2011-12-04 13:26:18 PST
Committed revision 101965