REGRESSION(r151302): Many broken webaudio/ tests on Mac port.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2013 00:07:07 +0000 (00:07 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2013 00:07:07 +0000 (00:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117446

Reviewed by Chris Rogers.

Source/WebCore:

The new "pageConsentRequiredForAudioStart()" restriction was blocking playback event
even when page consent was given. Remvoe the restriction immediately in that case.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::startRendering):

LayoutTests:

Re-enable the tests on mac-wk2 and add new baselines for codec and audiobuffersource tests.

* platform/mac-wk2/TestExpectations:
* platform/mac-wk2/webaudio/audiobuffersource-loop-points-expected.wav: Added.
* platform/mac-wk2/webaudio/audiobuffersource-playbackrate-expected.wav: Added.
* platform/mac-wk2/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
* platform/mac-wk2/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
* platform/mac-wk2/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/platform/mac-wk2/webaudio/audiobuffersource-loop-points-expected.wav [new file with mode: 0644]
LayoutTests/platform/mac-wk2/webaudio/audiobuffersource-playbackrate-expected.wav [new file with mode: 0644]
LayoutTests/platform/mac-wk2/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/platform/mac-wk2/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/platform/mac-wk2/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioContext.cpp

index 9e17b17..71fd82a 100644 (file)
@@ -1,3 +1,19 @@
+2013-06-10  Jer Noble  <jer.noble@apple.com>
+
+        REGRESSION(r151302): Many broken webaudio/ tests on Mac port.
+        https://bugs.webkit.org/show_bug.cgi?id=117446
+
+        Reviewed by Chris Rogers.
+
+        Re-enable the tests on mac-wk2 and add new baselines for codec and audiobuffersource tests.
+
+        * platform/mac-wk2/TestExpectations:
+        * platform/mac-wk2/webaudio/audiobuffersource-loop-points-expected.wav: Added.
+        * platform/mac-wk2/webaudio/audiobuffersource-playbackrate-expected.wav: Added.
+        * platform/mac-wk2/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
+        * platform/mac-wk2/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
+        * platform/mac-wk2/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.
+
 2013-06-10  Mihnea Ovidenie  <mihnea@adobe.com>
 
         [CSSRegions] ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in RenderGeometryMap::mapToContainer
index bcbdbbf..026db7b 100644 (file)
@@ -379,6 +379,13 @@ plugins/snapshotting [ Skip ]
 # This test fails with WebKit1 only.
 editing/secure-input/reset-state-on-navigation.html [ Pass ]
 
+# WebAudio tests are supported in WK2
+webaudio/ [ Pass ]
+# Except for these
+webaudio/mediastreamaudiodestinationnode.html
+webaudio/mediastreamaudiosourcenode.html
+webaudio/codec-tests/vorbis/
+
 ### END OF (5) Features that are not supported in WebKit1, so skipped in mac/TestExpectations then re-enabled here
 ########################################
 
diff --git a/LayoutTests/platform/mac-wk2/webaudio/audiobuffersource-loop-points-expected.wav b/LayoutTests/platform/mac-wk2/webaudio/audiobuffersource-loop-points-expected.wav
new file mode 100644 (file)
index 0000000..5c5a797
Binary files /dev/null and b/LayoutTests/platform/mac-wk2/webaudio/audiobuffersource-loop-points-expected.wav differ
diff --git a/LayoutTests/platform/mac-wk2/webaudio/audiobuffersource-playbackrate-expected.wav b/LayoutTests/platform/mac-wk2/webaudio/audiobuffersource-playbackrate-expected.wav
new file mode 100644 (file)
index 0000000..08399b4
Binary files /dev/null and b/LayoutTests/platform/mac-wk2/webaudio/audiobuffersource-playbackrate-expected.wav differ
diff --git a/LayoutTests/platform/mac-wk2/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav b/LayoutTests/platform/mac-wk2/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..2d0fdfa
Binary files /dev/null and b/LayoutTests/platform/mac-wk2/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/platform/mac-wk2/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav b/LayoutTests/platform/mac-wk2/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..4431572
Binary files /dev/null and b/LayoutTests/platform/mac-wk2/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/platform/mac-wk2/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav b/LayoutTests/platform/mac-wk2/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav
new file mode 100644 (file)
index 0000000..057bf31
Binary files /dev/null and b/LayoutTests/platform/mac-wk2/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav differ
index 1dd5206..72aed46 100644 (file)
@@ -1,3 +1,16 @@
+2013-06-10  Jer Noble  <jer.noble@apple.com>
+
+        REGRESSION(r151302): Many broken webaudio/ tests on Mac port.
+        https://bugs.webkit.org/show_bug.cgi?id=117446
+
+        Reviewed by Chris Rogers.
+
+        The new "pageConsentRequiredForAudioStart()" restriction was blocking playback event
+        even when page consent was given. Remvoe the restriction immediately in that case.
+
+        * Modules/webaudio/AudioContext.cpp:
+        (WebCore::AudioContext::startRendering):
+
 2013-06-10  Andreas Kling  <akling@apple.com>
 
         REGRESSION(r150633): Find on page non-focused text highlight color is bright yellow.
index 022ddb7..526616a 100644 (file)
@@ -967,10 +967,13 @@ void AudioContext::startRendering()
     if (ScriptController::processingUserGesture())
         removeBehaviorRestriction(AudioContext::RequireUserGestureForAudioStartRestriction);
 
-    Page* page = document()->page();
-    if (pageConsentRequiredForAudioStart() && page && !page->canStartMedia())
-        document()->addMediaCanStartListener(this);
-
+    if (pageConsentRequiredForAudioStart()) {
+        Page* page = document()->page();
+        if (page && !page->canStartMedia())
+            document()->addMediaCanStartListener(this);
+        else
+            removeBehaviorRestriction(AudioContext::RequirePageConsentForAudioStartRestriction);
+    }
     destination()->startRendering();
 }