Diff
Modified: trunk/LayoutTests/ChangeLog (157690 => 157691)
--- trunk/LayoutTests/ChangeLog 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/LayoutTests/ChangeLog 2013-10-20 03:15:04 UTC (rev 157691)
@@ -1,3 +1,19 @@
+2013-10-19 Alexey Proskuryakov <[email protected]>
+
+ Enable webaudio/ tests on DRT/Mac
+ https://bugs.webkit.org/show_bug.cgi?id=86914
+
+ Reviewed by Darin Adler.
+
+ * TestExpectations: Moved webaudio/_javascript_audionode here, as garbage collection
+ issues with it are cross-platform.
+
+ * platform/mac-wk2/TestExpectations: Moved out everything, as there is nothing
+ WK2 specific about WebAudio.
+
+ * platform/mac/TestExpectations: WebAudio expectations here were just ignored. Replaced
+ with slightly updated expectations from WK2.
+
2013-10-19 Santosh Mahto <[email protected]>
Adding test case for text-decoration property state change on applying different command
Modified: trunk/LayoutTests/TestExpectations (157690 => 157691)
--- trunk/LayoutTests/TestExpectations 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/LayoutTests/TestExpectations 2013-10-20 03:15:04 UTC (rev 157691)
@@ -51,6 +51,8 @@
webkit.org/b/112521 [ Release ] webaudio/_javascript_audionode.html [ Pass Failure ]
webkit.org/b/112521 [ Debug ] webaudio/_javascript_audionode.html [ Pass Crash ]
+webkit.org/b/120148 [ Release ] webaudio/_javascript_audionode-upmix2-8channel-input.html [ Pass Failure ]
+webkit.org/b/120148 [ Debug ] webaudio/_javascript_audionode-upmix2-8channel-input.html [ Pass Crash ]
# The test frequently times out, and is just unsuccessful at detecting incorrect behavior when it passes.
webkit.org/b/72698 media/audio-garbage-collect.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (157690 => 157691)
--- trunk/LayoutTests/platform/mac/TestExpectations 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2013-10-20 03:15:04 UTC (rev 157691)
@@ -362,10 +362,6 @@
compositing/rtl/rtl-iframe-fixed.html
compositing/rtl/rtl-iframe-relative.html
-# For now, Web Audio tests are disabled
-# https://bugs.webkit.org/show_bug.cgi?id=86914
-webaudio/
-
# ENABLE(DRAGGABLE_REGION) is disabled
fast/css/draggable-region-parser.html
@@ -937,8 +933,10 @@
# IETC namespace failures
webkit.org/b/86142 ietestcenter/css3/namespaces/syntax-021.xml [ ImageOnlyFailure ]
-# Disable webaudio codec tests, including proprietary codecs.
-webkit.org/b/88794 webaudio/codec-tests
+webaudio/mediastreamaudiodestinationnode.html [ Failure ]
+webaudio/mediastreamaudiosourcenode.html [ Failure ]
+webaudio/codec-tests/vorbis/ [ WontFix ]
+webkit.org/b/119467 webaudio/audiobuffersource-loop-points.html [ Skip ]
# Text Autosizing is not enabled.
webkit.org/b/84186 fast/text-autosizing
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (157690 => 157691)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2013-10-20 03:15:04 UTC (rev 157691)
@@ -330,11 +330,6 @@
# Only failing on WK1
webkit.org/b/104104 fast/overflow/scrollbar-click-retains-focus.html [ Pass ]
-# Flakily fails in release build, asserts in debug.
-webkit.org/b/120148 webaudio/_javascript_audionode-upmix2-8channel-input.html [ Pass Crash Failure ]
-
-webkit.org/b/120161 [ Lion ] webaudio/codec-tests/mp3/128kbps-44khz.html [ Failure ]
-
webkit.org/b/121581 [ Lion ] media/video-object-fit.html [ ImageOnlyFailure ]
webkit.org/b/107018 svg/animations/animate-linear-discrete-additive.svg [ ImageOnlyFailure Pass ]
@@ -455,14 +450,6 @@
# 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/
-webkit.org/b/119467 webaudio/audiobuffersource-loop-points.html [ Skip ]
-
# Asserts in WebKit1-debug only, so reenabling.
compositing/geometry/fixed-position-flipped-writing-mode.html [ Pass ]
Modified: trunk/Tools/ChangeLog (157690 => 157691)
--- trunk/Tools/ChangeLog 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/Tools/ChangeLog 2013-10-20 03:15:04 UTC (rev 157691)
@@ -1,3 +1,38 @@
+2013-10-19 Alexey Proskuryakov <[email protected]>
+
+ Enable webaudio/ tests on DRT/Mac
+ https://bugs.webkit.org/show_bug.cgi?id=86914
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h: Copied from Source/WebCore/ForwardingHeaders/runtime/ArrayBufferView.h.
+ * DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h: Copied from Source/WebCore/ForwardingHeaders/runtime/JSArrayBufferView.h.
+ * DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h: Copied from Source/WebCore/ForwardingHeaders/runtime/TypedArrayInlines.h.
+ There is no way to efficiently get TypedArray buffer using API, so we need some internal headers.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (setAudioResultCallback):
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner::audioResult):
+ (TestRunner::setAudioResult):
+ The function has a different name and argument type now, updated accordingly.
+ Changed buffer from std::string to std::vector<char>, because it's more idiomatic.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpAudio): Updated for the new name of audioResult accessor.
+ (dump): Print the result in the format webkitpy currently expects.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::dumpAudio): fwrite the whole block at once, splitting into
+ chunks made no sense.
+
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setAudioResult): Added a FIXME about getting off WKBundle SPI.
+
+ * DumpRenderTree/CMakeLists.txt: Added _javascript_Core/parser to include search list,
+ so that "SourceProvider.h" can be found.
+
2013-10-19 Ryosuke Niwa <[email protected]>
run-webkit-tests should submit time and modifiers to the new flakiness dashboard
Modified: trunk/Tools/DumpRenderTree/CMakeLists.txt (157690 => 157691)
--- trunk/Tools/DumpRenderTree/CMakeLists.txt 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/Tools/DumpRenderTree/CMakeLists.txt 2013-10-20 03:15:04 UTC (rev 157691)
@@ -54,6 +54,7 @@
${_javascript_CORE_DIR}/interpreter
${_javascript_CORE_DIR}/jit
${_javascript_CORE_DIR}/llint
+ ${_javascript_CORE_DIR}/parser
${_javascript_CORE_DIR}/profiler
${_javascript_CORE_DIR}/runtime
${_javascript_CORE_DIR}/ForwardingHeaders
Copied: trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h (from rev 157672, trunk/Source/WebCore/ForwardingHeaders/runtime/ArrayBufferView.h) (0 => 157691)
--- trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h (rev 0)
+++ trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h 2013-10-20 03:15:04 UTC (rev 157691)
@@ -0,0 +1 @@
+#include <_javascript_Core/ArrayBufferView.h>
Copied: trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h (from rev 157672, trunk/Source/WebCore/ForwardingHeaders/runtime/JSArrayBufferView.h) (0 => 157691)
--- trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h (rev 0)
+++ trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h 2013-10-20 03:15:04 UTC (rev 157691)
@@ -0,0 +1 @@
+#include <_javascript_Core/JSArrayBufferView.h>
Copied: trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h (from rev 157672, trunk/Source/WebCore/ForwardingHeaders/runtime/TypedArrayInlines.h) (0 => 157691)
--- trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h (rev 0)
+++ trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h 2013-10-20 03:15:04 UTC (rev 157691)
@@ -0,0 +1 @@
+#include <_javascript_Core/TypedArrayInlines.h>
Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (157690 => 157691)
--- trunk/Tools/DumpRenderTree/TestRunner.cpp 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp 2013-10-20 03:15:04 UTC (rev 157691)
@@ -32,12 +32,16 @@
#include "WorkQueue.h"
#include "WorkQueueItem.h"
+#include <_javascript_Core/APICast.h>
#include <_javascript_Core/JSContextRef.h>
#include <_javascript_Core/JSCTestRunnerUtils.h>
#include <_javascript_Core/JSObjectRef.h>
#include <_javascript_Core/JSRetainPtr.h>
#include <cstring>
#include <locale.h>
+#include <runtime/ArrayBufferView.h>
+#include <runtime/JSArrayBufferView.h>
+#include <runtime/TypedArrayInlines.h>
#include <stdio.h>
#include <wtf/Assertions.h>
#include <wtf/CurrentTime.h>
@@ -328,22 +332,22 @@
return JSValueMakeUndefined(context);
}
-static JSValueRef setEncodedAudioDataCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef setAudioResultCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 1)
return JSValueMakeUndefined(context);
- JSRetainPtr<JSStringRef> encodedAudioData(Adopt, JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
-
- size_t maxLength = JSStringGetMaximumUTF8CStringSize(encodedAudioData.get());
- auto encodedAudioDataBuffer = std::make_unique<char[]>(maxLength + 1);
- JSStringGetUTF8CString(encodedAudioData.get(), encodedAudioDataBuffer.get(), maxLength + 1);
+ // FIXME (123058): Use a JSC API to get buffer contents once such is exposed.
+ JSC::JSArrayBufferView* jsBufferView = JSC::jsDynamicCast<JSC::JSArrayBufferView*>(toJS(toJS(context), arguments[0]));
+ ASSERT(jsBufferView);
+ RefPtr<JSC::ArrayBufferView> bufferView = jsBufferView->impl();
+ const char* buffer = static_cast<const char*>(bufferView->baseAddress());
+ std::vector<char> audioData(buffer, buffer + bufferView->byteLength());
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->setEncodedAudioData(encodedAudioDataBuffer.get());
+ controller->setAudioResult(audioData);
controller->setDumpAsAudio(true);
-
+
return JSValueMakeUndefined(context);
}
@@ -2126,7 +2130,7 @@
{ "setAlwaysAcceptCookies", setAlwaysAcceptCookiesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAppCacheMaximumSize", setAppCacheMaximumSizeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setApplicationCacheOriginQuota", setApplicationCacheOriginQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setEncodedAudioData", setEncodedAudioDataCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setAudioResult", setAudioResultCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAuthenticationPassword", setAuthenticationPasswordCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAuthenticationUsername", setAuthenticationUsernameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAuthorAndUserStylesEnabled", setAuthorAndUserStylesEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
Modified: trunk/Tools/DumpRenderTree/TestRunner.h (157690 => 157691)
--- trunk/Tools/DumpRenderTree/TestRunner.h 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/Tools/DumpRenderTree/TestRunner.h 2013-10-20 03:15:04 UTC (rev 157691)
@@ -286,8 +286,8 @@
const std::string& testPathOrURL() const { return m_testPathOrURL; }
const std::string& expectedPixelHash() const { return m_expectedPixelHash; }
- const std::string& encodedAudioData() const { return m_encodedAudioData; }
- void setEncodedAudioData(const std::string& encodedAudioData) { m_encodedAudioData = encodedAudioData; }
+ const std::vector<char>& audioResult() const { return m_audioResult; }
+ void setAudioResult(const std::vector<char>& audioData) { m_audioResult = audioData; }
void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
@@ -418,10 +418,9 @@
std::string m_titleTextDirection;
std::set<std::string> m_willSendRequestClearHeaders;
-
- // base64 encoded WAV audio data is stored here.
- std::string m_encodedAudioData;
+ std::vector<char> m_audioResult;
+
std::map<std::string, std::string> m_URLsToRedirect;
static JSClassRef getJSClass();
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (157690 => 157691)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2013-10-20 03:15:04 UTC (rev 157691)
@@ -971,9 +971,9 @@
static NSData *dumpAudio()
{
- const char *encodedAudioData = gTestRunner->encodedAudioData().c_str();
+ const vector<char>& dataVector = gTestRunner->audioResult();
- NSData *data = "" dataWithBytes:encodedAudioData length:gTestRunner->encodedAudioData().length()];
+ NSData *data = "" dataWithBytes:dataVector.data() length:dataVector.size()];
return data;
}
@@ -1218,16 +1218,16 @@
printf("Content-Type: %s\n", [resultMimeType UTF8String]);
- if (gTestRunner->dumpAsAudio())
- printf("Content-Transfer-Encoding: base64\n");
-
WTF::FastMallocStatistics mallocStats = WTF::fastMallocStatistics();
printf("DumpMalloc: %li\n", mallocStats.committedVMBytes);
+ if (gTestRunner->dumpAsAudio())
+ printf("Content-Length: %lu\n", [resultData length]);
+
if (resultData) {
fwrite([resultData bytes], 1, [resultData length], stdout);
- if (!gTestRunner->dumpAsText() && !gTestRunner->dumpDOMAsWebArchive() && !gTestRunner->dumpSourceAsWebArchive())
+ if (!gTestRunner->dumpAsText() && !gTestRunner->dumpDOMAsWebArchive() && !gTestRunner->dumpSourceAsWebArchive() && !gTestRunner->dumpAsAudio())
dumpFrameScrollPosition(mainFrame);
if (gTestRunner->dumpBackForwardList())
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (157690 => 157691)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2013-10-20 03:15:04 UTC (rev 157691)
@@ -378,6 +378,7 @@
void TestRunner::setAudioResult(JSContextRef context, JSValueRef data)
{
+ // FIXME (123058): Use a JSC API to get buffer contents once such is exposed.
WKRetainPtr<WKDataRef> audioData(AdoptWK, WKBundleCreateWKDataFromUInt8Array(InjectedBundle::shared().bundle(), context, data));
InjectedBundle::shared().setAudioResult(audioData.get());
m_whatToDump = Audio;
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (157690 => 157691)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2013-10-20 02:07:39 UTC (rev 157690)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2013-10-20 03:15:04 UTC (rev 157691)
@@ -353,16 +353,7 @@
printf("Content-Type: audio/wav\n");
printf("Content-Length: %lu\n", static_cast<unsigned long>(length));
- const size_t bytesToWriteInOneChunk = 1 << 15;
- size_t dataRemainingToWrite = length;
- while (dataRemainingToWrite) {
- size_t bytesToWriteInThisChunk = std::min(dataRemainingToWrite, bytesToWriteInOneChunk);
- size_t bytesWritten = fwrite(data, 1, bytesToWriteInThisChunk, stdout);
- if (bytesWritten != bytesToWriteInThisChunk)
- break;
- dataRemainingToWrite -= bytesWritten;
- data += bytesWritten;
- }
+ fwrite(data, 1, length, stdout);
printf("#EOF\n");
fprintf(stderr, "#EOF\n");
}