Bug 95084 - [WK2] WebAudio WKTR support
Summary: [WK2] WebAudio WKTR support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dominik Röttsches (drott)
URL:
Keywords:
Depends on: 105623
Blocks: 103531
  Show dependency treegraph
 
Reported: 2012-08-27 07:11 PDT by Philippe Normand
Modified: 2012-12-21 04:51 PST (History)
16 users (show)

See Also:


Attachments
wip patch (6.59 KB, patch)
2012-12-14 02:38 PST, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (16.67 KB, patch)
2012-12-18 07:12 PST, Dominik Röttsches (drott)
no flags Details | Formatted Diff | Diff
Patch, v2. Credit for wip patch in ChangeLog (16.74 KB, patch)
2012-12-18 07:15 PST, Dominik Röttsches (drott)
no flags Details | Formatted Diff | Diff
Patch, v3, review comments addressed. (16.67 KB, patch)
2012-12-18 09:33 PST, Dominik Röttsches (drott)
no flags Details | Formatted Diff | Diff
Patch, v4, review comments addressed. (16.62 KB, patch)
2012-12-18 09:48 PST, Dominik Röttsches (drott)
no flags Details | Formatted Diff | Diff
Patch v4, mac & qt build fixes. (22.31 KB, patch)
2012-12-19 04:54 PST, Dominik Röttsches (drott)
no flags Details | Formatted Diff | Diff
Patch v5, hopefully last qt build fix (22.37 KB, patch)
2012-12-19 06:07 PST, Dominik Röttsches (drott)
no flags Details | Formatted Diff | Diff
Patch, v6, more qt build fixing. thanks ossy. (23.22 KB, patch)
2012-12-19 06:43 PST, Dominik Röttsches (drott)
no flags Details | Formatted Diff | Diff
Patch, v7, new review comments addressed. (23.33 KB, patch)
2012-12-19 07:47 PST, Dominik Röttsches (drott)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2012-08-27 07:11:36 PDT
The WKTR interface needs to expose a setAudioData() method at least.
Comment 1 Alexey Proskuryakov 2012-08-27 09:19:20 PDT
Which tests are affected by this? I couldn't find anything related in platform/wk2/Skipped.
Comment 2 Philippe Normand 2012-08-27 09:33:38 PDT
The webaudio tests are affected by this, IIUC. It's odd they're not skipped on the mac port.
Comment 3 Philippe Normand 2012-08-27 09:44:21 PDT
Oh, they're skipped from LayoutTests/platform/mac/Skipped, which is the generic Skipped list.
Comment 4 Philippe Normand 2012-12-14 02:38:05 PST
Created attachment 179455 [details]
wip patch
Comment 5 Dominik Röttsches (drott) 2012-12-18 07:12:16 PST
Created attachment 179934 [details]
Patch
Comment 6 Dominik Röttsches (drott) 2012-12-18 07:15:06 PST
Created attachment 179935 [details]
Patch, v2. Credit for wip patch in ChangeLog
Comment 7 Philippe Normand 2012-12-18 07:19:25 PST
Comment on attachment 179935 [details]
Patch, v2. Credit for wip patch in ChangeLog

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

Looks good but I'd rather defer official review to a more experienced WK2 reviewer.

> Tools/WebKitTestRunner/TestInvocation.cpp:312
> +    printf("Content-Type: %s\n", "audio/wav");

Format string looks useless here.

> Tools/WebKitTestRunner/TestInvocation.cpp:326
> +    printf("#EOF\n");
> +    fprintf(stderr, "#EOF\n");

Out of curiosity, why both are needed?
Comment 8 Kenneth Rohde Christiansen 2012-12-18 07:23:14 PST
Comment on attachment 179935 [details]
Patch, v2. Credit for wip patch in ChangeLog

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

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp:272
> +WKDataRef WKBundleDataFromUint8Array(WKBundleRef bundle, JSContextRef context, JSValueRef data)

isnt this normally called UInt? Yeah, apparently both are used in WebCore, but UInt is what is used in /WebKit2

> Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:185
> +    // Audio testing

dot at end

> Tools/WebKitTestRunner/TestInvocation.cpp:294
> +    if (m_textOutput.length())
> +        dump(m_textOutput.toString().utf8().data());
> +    else if (m_audioResult)
> +        dumpAudio(m_audioResult.get());

You never need to dump both? assert?

> Tools/WebKitTestRunner/TestInvocation.cpp:312
> +    printf("Content-Type: %s\n", "audio/wav");

Why compose it?
Comment 9 Early Warning System Bot 2012-12-18 07:24:39 PST
Comment on attachment 179935 [details]
Patch, v2. Credit for wip patch in ChangeLog

Attachment 179935 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/15418115
Comment 10 Build Bot 2012-12-18 07:34:11 PST
Comment on attachment 179935 [details]
Patch, v2. Credit for wip patch in ChangeLog

Attachment 179935 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15402224
Comment 11 Dominik Röttsches (drott) 2012-12-18 09:33:22 PST
Created attachment 179961 [details]
Patch, v3, review comments addressed.
Comment 12 Early Warning System Bot 2012-12-18 09:40:56 PST
Comment on attachment 179961 [details]
Patch, v3, review comments addressed.

Attachment 179961 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/15408230
Comment 13 Dominik Röttsches (drott) 2012-12-18 09:48:12 PST
Created attachment 179967 [details]
Patch, v4, review comments addressed.
Comment 14 Dominik Röttsches (drott) 2012-12-18 09:52:37 PST
(In reply to comment #7)
> (From update of attachment 179935 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=179935&action=review
> 
> Looks good but I'd rather defer official review to a more experienced WK2 reviewer.

Thanks.

> > Tools/WebKitTestRunner/TestInvocation.cpp:312
> > +    printf("Content-Type: %s\n", "audio/wav");
> 
> Format string looks useless here.

It does, replaced with fixed string.

> > Tools/WebKitTestRunner/TestInvocation.cpp:326
> > +    printf("#EOF\n");
> > +    fprintf(stderr, "#EOF\n");
> 
> Out of curiosity, why both are needed?

webkitpy expects an #EOF on stderr - that's the same way as Chromium's TestShell outputs it.

(In reply to comment #8)
> (From update of attachment 179935 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=179935&action=review

> > Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp:272
> > +WKDataRef WKBundleDataFromUint8Array(WKBundleRef bundle, JSContextRef context, JSValueRef data)
> 
> isnt this normally called UInt? Yeah, apparently both are used in WebCore, but UInt is what is used in /WebKit2

Renamed to UInt, uppercased variant.

> > Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:185
> > +    // Audio testing
> 
> dot at end

Done.

> > Tools/WebKitTestRunner/TestInvocation.cpp:294
> > +    if (m_textOutput.length())
> > +        dump(m_textOutput.toString().utf8().data());
> > +    else if (m_audioResult)
> > +        dumpAudio(m_audioResult.get());
> 
> You never need to dump both? assert?

Unfortuntely, run-webkit-tests accepts only either text, or audio for the first element in dumped data and can only compare one. We give text priority, but we can't assert for audio to be empty at the same time.
Comment 15 Dominik Röttsches (drott) 2012-12-18 09:53:42 PST
(In reply to comment #12)
> (From update of attachment 179961 [details])
> Attachment 179961 [details] did not pass qt-wk2-ews (qt):
> Output: http://queues.webkit.org/results/15408230

Ossy, could you help me with this one? Seems to be that the newly used JSUint8Array.h header is not included in the step that generates forwarding headers.
Comment 16 Early Warning System Bot 2012-12-18 10:04:14 PST
Comment on attachment 179967 [details]
Patch, v4, review comments addressed.

Attachment 179967 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/15411204
Comment 17 Build Bot 2012-12-18 13:20:27 PST
Comment on attachment 179967 [details]
Patch, v4, review comments addressed.

Attachment 179967 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15411267
Comment 18 Dominik Röttsches (drott) 2012-12-19 04:54:43 PST
Created attachment 180135 [details]
Patch v4, mac & qt build fixes.
Comment 19 Early Warning System Bot 2012-12-19 05:07:43 PST
Comment on attachment 180135 [details]
Patch v4, mac & qt build fixes.

Attachment 180135 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/15411593
Comment 20 Dominik Röttsches (drott) 2012-12-19 06:07:55 PST
Created attachment 180149 [details]
Patch v5, hopefully last qt build fix
Comment 21 Early Warning System Bot 2012-12-19 06:19:47 PST
Comment on attachment 180149 [details]
Patch v5, hopefully last qt build fix

Attachment 180149 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/15402719
Comment 22 Dominik Röttsches (drott) 2012-12-19 06:43:18 PST
Created attachment 180159 [details]
Patch, v6, more qt build fixing. thanks ossy.
Comment 23 Anders Carlsson 2012-12-19 06:58:32 PST
Comment on attachment 180159 [details]
Patch, v6, more qt build fixing. thanks ossy.

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

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp:272
> +WKDataRef WKBundleDataFromUInt8Array(WKBundleRef bundle, JSContextRef context, JSValueRef data)

This returns a new WKDataRef and should have Create in its name.
Comment 24 Chris Dumez 2012-12-19 07:11:20 PST
Comment on attachment 180159 [details]
Patch, v6, more qt build fixing. thanks ossy.

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

> Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:439
> +    WKDataRef audioData = WKBundleDataFromUInt8Array(InjectedBundle::shared().bundle(), context, data);

Missing adoptWK().
Comment 25 Dominik Röttsches (drott) 2012-12-19 07:47:13 PST
Created attachment 180164 [details]
Patch, v7, new review comments addressed.
Comment 26 Chris Dumez 2012-12-19 07:57:25 PST
Comment on attachment 180164 [details]
Patch, v7, new review comments addressed.

LGTM.
Comment 27 WebKit Review Bot 2012-12-20 01:01:51 PST
Comment on attachment 180164 [details]
Patch, v7, new review comments addressed.

Clearing flags on attachment: 180164

Committed r138232: <http://trac.webkit.org/changeset/138232>
Comment 28 WebKit Review Bot 2012-12-20 01:01:58 PST
All reviewed patches have been landed.  Closing bug.
Comment 29 Jussi Kukkonen (jku) 2012-12-21 04:37:10 PST
Weird regression: bug 105623
Comment 30 Philippe Normand 2012-12-21 04:51:04 PST
Comment on attachment 180164 [details]
Patch, v7, new review comments addressed.

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

> Tools/WebKitTestRunner/TestInvocation.cpp:294
> -    dump(m_textOutput.toString().utf8().data());
> +    if (m_textOutput.length())
> +        dump(m_textOutput.toString().utf8().data());
> +    else if (m_audioResult)
> +        dumpAudio(m_audioResult.get());

Maybe the regression is related with this change? Just an unverified hunch though.