haikuwebkit/LayoutTests/crypto/crypto-random-values-expect...

13 lines
274 B
Plaintext
Raw Permalink Normal View History

2011-02-10 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. WebKit should have a cryptographic RNG https://bugs.webkit.org/show_bug.cgi?id=22049 Test crypto.getRandomValues API. It's pretty hard to write a deterministic API for a randomized API, but this test should catch some regressions. * security/crypto-random-values-expected.txt: Added. * security/crypto-random-values.html: Added. 2011-02-10 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. WebKit should have a cryptographic RNG https://bugs.webkit.org/show_bug.cgi?id=22049 Teach JavaScriptCore how to export this function. * JavaScriptCore.exp: * JavaScriptCore.xcodeproj/project.pbxproj: 2011-02-10 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. WebKit should have a cryptographic RNG https://bugs.webkit.org/show_bug.cgi?id=22049 Add crypto.getRandomValues. Yes, all these diffs are required to expose a single function to the DOM. Test: security/crypto-random-values.html * Android.mk: * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * ForwardingHeaders/wtf/CryptographicallyRandomNumber.h: Added. * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowCustom.cpp: * bindings/v8/custom/V8DOMWindowCustom.cpp: * config.h: * page/Crypto.cpp: Added. (WebCore::Crypto::Crypto): (WebCore::Crypto::getRandomValues): * page/Crypto.h: Added. (WebCore::Crypto::create): * page/Crypto.idl: Added. * page/DOMWindow.cpp: (WebCore::DOMWindow::clear): (WebCore::DOMWindow::crypto): * page/DOMWindow.h: (WebCore::DOMWindow::optionalCrypto): * page/DOMWindow.idl: Canonical link: https://commits.webkit.org/68331@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-02-11 08:37:36 +00:00
Tests crypto.randomValues.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS 'crypto' in window is true
PASS 'getRandomValues' in window.crypto is true
PASS matchingBytes < 100 is true
PASS successfullyParsed is true
TEST COMPLETE