Changeset 157691 in webkit
- Timestamp:
- Oct 19, 2013 8:15:04 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r157689 r157691 1 2013-10-19 Alexey Proskuryakov <ap@apple.com> 2 3 Enable webaudio/ tests on DRT/Mac 4 https://bugs.webkit.org/show_bug.cgi?id=86914 5 6 Reviewed by Darin Adler. 7 8 * TestExpectations: Moved webaudio/javascriptaudionode here, as garbage collection 9 issues with it are cross-platform. 10 11 * platform/mac-wk2/TestExpectations: Moved out everything, as there is nothing 12 WK2 specific about WebAudio. 13 14 * platform/mac/TestExpectations: WebAudio expectations here were just ignored. Replaced 15 with slightly updated expectations from WK2. 16 1 17 2013-10-19 Santosh Mahto <santosh.ma@samsung.com> 2 18 -
trunk/LayoutTests/TestExpectations
r157430 r157691 52 52 webkit.org/b/112521 [ Release ] webaudio/javascriptaudionode.html [ Pass Failure ] 53 53 webkit.org/b/112521 [ Debug ] webaudio/javascriptaudionode.html [ Pass Crash ] 54 webkit.org/b/120148 [ Release ] webaudio/javascriptaudionode-upmix2-8channel-input.html [ Pass Failure ] 55 webkit.org/b/120148 [ Debug ] webaudio/javascriptaudionode-upmix2-8channel-input.html [ Pass Crash ] 54 56 55 57 # The test frequently times out, and is just unsuccessful at detecting incorrect behavior when it passes. -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r157246 r157691 331 331 webkit.org/b/104104 fast/overflow/scrollbar-click-retains-focus.html [ Pass ] 332 332 333 # Flakily fails in release build, asserts in debug.334 webkit.org/b/120148 webaudio/javascriptaudionode-upmix2-8channel-input.html [ Pass Crash Failure ]335 336 webkit.org/b/120161 [ Lion ] webaudio/codec-tests/mp3/128kbps-44khz.html [ Failure ]337 338 333 webkit.org/b/121581 [ Lion ] media/video-object-fit.html [ ImageOnlyFailure ] 339 334 … … 456 451 editing/secure-input/reset-state-on-navigation.html [ Pass ] 457 452 458 # WebAudio tests are supported in WK2459 webaudio/ [ Pass ]460 # Except for these461 webaudio/mediastreamaudiodestinationnode.html462 webaudio/mediastreamaudiosourcenode.html463 webaudio/codec-tests/vorbis/464 webkit.org/b/119467 webaudio/audiobuffersource-loop-points.html [ Skip ]465 466 453 # Asserts in WebKit1-debug only, so reenabling. 467 454 compositing/geometry/fixed-position-flipped-writing-mode.html [ Pass ] -
trunk/LayoutTests/platform/mac/TestExpectations
r157626 r157691 362 362 compositing/rtl/rtl-iframe-fixed.html 363 363 compositing/rtl/rtl-iframe-relative.html 364 365 # For now, Web Audio tests are disabled366 # https://bugs.webkit.org/show_bug.cgi?id=86914367 webaudio/368 364 369 365 # ENABLE(DRAGGABLE_REGION) is disabled … … 938 934 webkit.org/b/86142 ietestcenter/css3/namespaces/syntax-021.xml [ ImageOnlyFailure ] 939 935 940 # Disable webaudio codec tests, including proprietary codecs. 941 webkit.org/b/88794 webaudio/codec-tests 936 webaudio/mediastreamaudiodestinationnode.html [ Failure ] 937 webaudio/mediastreamaudiosourcenode.html [ Failure ] 938 webaudio/codec-tests/vorbis/ [ WontFix ] 939 webkit.org/b/119467 webaudio/audiobuffersource-loop-points.html [ Skip ] 942 940 943 941 # Text Autosizing is not enabled. -
trunk/Tools/ChangeLog
r157687 r157691 1 2013-10-19 Alexey Proskuryakov <ap@apple.com> 2 3 Enable webaudio/ tests on DRT/Mac 4 https://bugs.webkit.org/show_bug.cgi?id=86914 5 6 Reviewed by Darin Adler. 7 8 * DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h: Copied from Source/WebCore/ForwardingHeaders/runtime/ArrayBufferView.h. 9 * DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h: Copied from Source/WebCore/ForwardingHeaders/runtime/JSArrayBufferView.h. 10 * DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h: Copied from Source/WebCore/ForwardingHeaders/runtime/TypedArrayInlines.h. 11 There is no way to efficiently get TypedArray buffer using API, so we need some internal headers. 12 13 * DumpRenderTree/TestRunner.cpp: 14 (setAudioResultCallback): 15 (TestRunner::staticFunctions): 16 * DumpRenderTree/TestRunner.h: 17 (TestRunner::audioResult): 18 (TestRunner::setAudioResult): 19 The function has a different name and argument type now, updated accordingly. 20 Changed buffer from std::string to std::vector<char>, because it's more idiomatic. 21 22 * DumpRenderTree/mac/DumpRenderTree.mm: 23 (dumpAudio): Updated for the new name of audioResult accessor. 24 (dump): Print the result in the format webkitpy currently expects. 25 26 * WebKitTestRunner/TestInvocation.cpp: 27 (WTR::TestInvocation::dumpAudio): fwrite the whole block at once, splitting into 28 chunks made no sense. 29 30 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 31 (WTR::TestRunner::setAudioResult): Added a FIXME about getting off WKBundle SPI. 32 33 * DumpRenderTree/CMakeLists.txt: Added JavaScriptCore/parser to include search list, 34 so that "SourceProvider.h" can be found. 35 1 36 2013-10-19 Ryosuke Niwa <rniwa@webkit.org> 2 37 -
trunk/Tools/DumpRenderTree/CMakeLists.txt
r156538 r157691 55 55 ${JAVASCRIPTCORE_DIR}/jit 56 56 ${JAVASCRIPTCORE_DIR}/llint 57 ${JAVASCRIPTCORE_DIR}/parser 57 58 ${JAVASCRIPTCORE_DIR}/profiler 58 59 ${JAVASCRIPTCORE_DIR}/runtime -
trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h
r157672 r157691 1 #ifndef WebCore_FWD_ArrayBufferView_h2 #define WebCore_FWD_ArrayBufferView_h3 1 #include <JavaScriptCore/ArrayBufferView.h> 4 #endif -
trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h
r157672 r157691 1 #ifndef WebCore_FWD_JSArrayBufferView_h2 #define WebCore_FWD_JSArrayBufferView_h3 1 #include <JavaScriptCore/JSArrayBufferView.h> 4 #endif -
trunk/Tools/DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h
r157672 r157691 1 #ifndef WebCore_FWD_TypedArrayInliness_h2 #define WebCore_FWD_TypedArrayInliness_h3 1 #include <JavaScriptCore/TypedArrayInlines.h> 4 #endif -
trunk/Tools/DumpRenderTree/TestRunner.cpp
r156100 r157691 33 33 #include "WorkQueue.h" 34 34 #include "WorkQueueItem.h" 35 #include <JavaScriptCore/APICast.h> 35 36 #include <JavaScriptCore/JSContextRef.h> 36 37 #include <JavaScriptCore/JSCTestRunnerUtils.h> … … 39 40 #include <cstring> 40 41 #include <locale.h> 42 #include <runtime/ArrayBufferView.h> 43 #include <runtime/JSArrayBufferView.h> 44 #include <runtime/TypedArrayInlines.h> 41 45 #include <stdio.h> 42 46 #include <wtf/Assertions.h> … … 329 333 } 330 334 331 static JSValueRef set EncodedAudioDataCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)332 { 333 if (argumentCount < 1) 334 return JSValueMakeUndefined(context); 335 336 JSRetainPtr<JSStringRef> encodedAudioData(Adopt, JSValueToStringCopy(context, arguments[0], exception));337 ASSERT(!*exception);338 339 size_t maxLength = JSStringGetMaximumUTF8CStringSize(encodedAudioData.get());340 auto encodedAudioDataBuffer = std::make_unique<char[]>(maxLength + 1);341 JSStringGetUTF8CString(encodedAudioData.get(), encodedAudioDataBuffer.get(), maxLength + 1);342 343 TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject)); 344 controller->set EncodedAudioData(encodedAudioDataBuffer.get());335 static JSValueRef setAudioResultCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 336 { 337 if (argumentCount < 1) 338 return JSValueMakeUndefined(context); 339 340 // FIXME (123058): Use a JSC API to get buffer contents once such is exposed. 341 JSC::JSArrayBufferView* jsBufferView = JSC::jsDynamicCast<JSC::JSArrayBufferView*>(toJS(toJS(context), arguments[0])); 342 ASSERT(jsBufferView); 343 RefPtr<JSC::ArrayBufferView> bufferView = jsBufferView->impl(); 344 const char* buffer = static_cast<const char*>(bufferView->baseAddress()); 345 std::vector<char> audioData(buffer, buffer + bufferView->byteLength()); 346 347 TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject)); 348 controller->setAudioResult(audioData); 345 349 controller->setDumpAsAudio(true); 346 350 347 351 return JSValueMakeUndefined(context); 348 352 } … … 2127 2131 { "setAppCacheMaximumSize", setAppCacheMaximumSizeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2128 2132 { "setApplicationCacheOriginQuota", setApplicationCacheOriginQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2129 { "set EncodedAudioData", setEncodedAudioDataCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },2133 { "setAudioResult", setAudioResultCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2130 2134 { "setAuthenticationPassword", setAuthenticationPasswordCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2131 2135 { "setAuthenticationUsername", setAuthenticationUsernameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/TestRunner.h
r155496 r157691 287 287 const std::string& expectedPixelHash() const { return m_expectedPixelHash; } 288 288 289 const std:: string& encodedAudioData() const { return m_encodedAudioData; }290 void set EncodedAudioData(const std::string& encodedAudioData) { m_encodedAudioData = encodedAudioData; }289 const std::vector<char>& audioResult() const { return m_audioResult; } 290 void setAudioResult(const std::vector<char>& audioData) { m_audioResult = audioData; } 291 291 292 292 void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains); … … 419 419 420 420 std::set<std::string> m_willSendRequestClearHeaders; 421 422 // base64 encoded WAV audio data is stored here. 423 std::string m_encodedAudioData; 421 422 std::vector<char> m_audioResult; 424 423 425 424 std::map<std::string, std::string> m_URLsToRedirect; -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r156724 r157691 972 972 static NSData *dumpAudio() 973 973 { 974 const char *encodedAudioData = gTestRunner->encodedAudioData().c_str();975 976 NSData *data = [NSData dataWithBytes: encodedAudioData length:gTestRunner->encodedAudioData().length()];974 const vector<char>& dataVector = gTestRunner->audioResult(); 975 976 NSData *data = [NSData dataWithBytes:dataVector.data() length:dataVector.size()]; 977 977 return data; 978 978 } … … 1219 1219 printf("Content-Type: %s\n", [resultMimeType UTF8String]); 1220 1220 1221 if (gTestRunner->dumpAsAudio())1222 printf("Content-Transfer-Encoding: base64\n");1223 1224 1221 WTF::FastMallocStatistics mallocStats = WTF::fastMallocStatistics(); 1225 1222 printf("DumpMalloc: %li\n", mallocStats.committedVMBytes); 1226 1223 1224 if (gTestRunner->dumpAsAudio()) 1225 printf("Content-Length: %lu\n", [resultData length]); 1226 1227 1227 if (resultData) { 1228 1228 fwrite([resultData bytes], 1, [resultData length], stdout); 1229 1229 1230 if (!gTestRunner->dumpAsText() && !gTestRunner->dumpDOMAsWebArchive() && !gTestRunner->dumpSourceAsWebArchive() )1230 if (!gTestRunner->dumpAsText() && !gTestRunner->dumpDOMAsWebArchive() && !gTestRunner->dumpSourceAsWebArchive() && !gTestRunner->dumpAsAudio()) 1231 1231 dumpFrameScrollPosition(mainFrame); 1232 1232 -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r156100 r157691 379 379 void TestRunner::setAudioResult(JSContextRef context, JSValueRef data) 380 380 { 381 // FIXME (123058): Use a JSC API to get buffer contents once such is exposed. 381 382 WKRetainPtr<WKDataRef> audioData(AdoptWK, WKBundleCreateWKDataFromUInt8Array(InjectedBundle::shared().bundle(), context, data)); 382 383 InjectedBundle::shared().setAudioResult(audioData.get()); -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r156793 r157691 354 354 printf("Content-Length: %lu\n", static_cast<unsigned long>(length)); 355 355 356 const size_t bytesToWriteInOneChunk = 1 << 15; 357 size_t dataRemainingToWrite = length; 358 while (dataRemainingToWrite) { 359 size_t bytesToWriteInThisChunk = std::min(dataRemainingToWrite, bytesToWriteInOneChunk); 360 size_t bytesWritten = fwrite(data, 1, bytesToWriteInThisChunk, stdout); 361 if (bytesWritten != bytesToWriteInThisChunk) 362 break; 363 dataRemainingToWrite -= bytesWritten; 364 data += bytesWritten; 365 } 356 fwrite(data, 1, length, stdout); 366 357 printf("#EOF\n"); 367 358 fprintf(stderr, "#EOF\n");
Note: See TracChangeset
for help on using the changeset viewer.