Bug 111310

Summary: [WK2] Add unit tests for CoreIPC
Product: WebKit Reporter: Thiago Marcos P. Santos <tmpsantos>
Component: WebKit2Assignee: Thiago Marcos P. Santos <tmpsantos>
Status: ASSIGNED ---    
Severity: Normal CC: andersca, benjamin, gyuyoung.kim, kbalazs, kenneth, laszlo.gombos, menard, rakuco, sam, sergio, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 110978    
Bug Blocks: 111543    
Attachments:
Description Flags
Patch none

Description Thiago Marcos P. Santos 2013-03-04 06:19:28 PST
Add some tests to test things like the Connection abstraction, encoder/decoders, synchronous messages from threads, etc.

The test will isolate the CoreIPC code from the rest of WebKit, making it easier to optimize and debug.
Comment 1 Thiago Marcos P. Santos 2013-03-04 06:40:20 PST
Created attachment 191227 [details]
Patch
Comment 2 Benjamin Poulain 2013-03-06 10:34:19 PST
Comment on attachment 191227 [details]
Patch

No modified xcode project files??
Comment 3 Thiago Marcos P. Santos 2013-03-06 12:46:24 PST
(In reply to comment #2)
> (From update of attachment 191227 [details])
> No modified xcode project files??

No, this test is Unix only because of the exact same platform dependency CoreIPC has for its initialization: socket creation.

There is work being done on bug 110978 to address this, but I am fine with other platform maintainers adding #ifdefs for their platforms on the test meanwhile.
Comment 4 Benjamin Poulain 2013-03-06 12:52:20 PST
Why not create platform abstraction like PlatformWebView?
Comment 5 Thiago Marcos P. Santos 2013-03-06 13:41:19 PST
(In reply to comment #4)
> Why not create platform abstraction like PlatformWebView?

It can be done. Gonna upload a new version tomorrow.
Comment 6 Thiago Marcos P. Santos 2013-03-06 13:42:08 PST
Comment on attachment 191227 [details]
Patch

Removing flags. Going to rework this patch as suggested. Thanks for reviewing.
Comment 7 Benjamin Poulain 2013-03-06 13:55:34 PST
Thanks, I like the way this is going :)
Comment 8 Balazs Kelemen 2013-03-06 15:51:48 PST
(In reply to comment #4)
> Why not create platform abstraction like PlatformWebView?

This is exactly what I created bug 110978 for. I'm disappointed that we cannot add that abstraction to CoreIPC - which would make ports require less platform specific code to support concepts like network process or plugin process.
Comment 9 Benjamin Poulain 2013-03-06 16:03:36 PST
> This is exactly what I created bug 110978 for. I'm disappointed that we cannot add that abstraction to CoreIPC - which would make ports require less platform specific code to support concepts like network process or plugin process.

This makes sense, I forgot about 110978.
I would prefer 110978 being done prior to work on the tests.