Changeset 206883 in webkit


Ignore:
Timestamp:
Oct 6, 2016 2:32:02 PM (8 years ago)
Author:
jiewen_tan@apple.com
Message:

Add a dummy SubtleCrypto interface
https://bugs.webkit.org/show_bug.cgi?id=162992
<rdar://problem/28643573>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/digest/test_digest-expected.txt:
  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

Add a dummy SubtleCrypto interface and rename KeyPair to CryptoKeyPair.

Tests: crypto/subtle/gc-2.html

crypto/subtle/gc-3.html
crypto/subtle/gc.html
crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html
crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html
crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html
crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html
crypto/webkitSubtle/aes-cbc-generate-key.html
crypto/webkitSubtle/aes-cbc-import-jwk.html
crypto/webkitSubtle/aes-cbc-invalid-length.html
crypto/webkitSubtle/aes-cbc-unwrap-failure.html
crypto/webkitSubtle/aes-cbc-unwrap-rsa.html
crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html
crypto/webkitSubtle/aes-cbc-wrap-rsa.html
crypto/webkitSubtle/aes-cbc-wrong-key-class.html
crypto/webkitSubtle/aes-export-key.html
crypto/webkitSubtle/aes-kw-key-manipulation.html
crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html
crypto/webkitSubtle/aes-postMessage.html
crypto/webkitSubtle/argument-conversion.html
crypto/webkitSubtle/array-buffer-view-offset.html
crypto/webkitSubtle/crypto-key-algorithm-gc.html
crypto/webkitSubtle/crypto-key-usages-gc.html
crypto/webkitSubtle/hmac-check-algorithm.html
crypto/webkitSubtle/hmac-export-key.html
crypto/webkitSubtle/hmac-generate-key.html
crypto/webkitSubtle/hmac-import-jwk.html
crypto/webkitSubtle/hmac-postMessage.html
crypto/webkitSubtle/hmac-sign-verify-empty-key.html
crypto/webkitSubtle/hmac-sign-verify.html
crypto/webkitSubtle/import-jwk.html
crypto/webkitSubtle/jwk-export-use-values.html
crypto/webkitSubtle/jwk-import-use-values.html
crypto/webkitSubtle/rsa-export-generated-keys.html
crypto/webkitSubtle/rsa-export-key.html
crypto/webkitSubtle/rsa-export-private-key.html
crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html
crypto/webkitSubtle/rsa-indexeddb-non-exportable.html
crypto/webkitSubtle/rsa-indexeddb-private.html
crypto/webkitSubtle/rsa-indexeddb.html
crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html
crypto/webkitSubtle/rsa-oaep-key-manipulation.html
crypto/webkitSubtle/rsa-oaep-plaintext-length.html
crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html
crypto/webkitSubtle/rsa-postMessage.html
crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html
crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html
crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html
crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html
crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html
crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html
crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html
crypto/webkitSubtle/sha-1.html
crypto/webkitSubtle/sha-224.html
crypto/webkitSubtle/sha-256.html
crypto/webkitSubtle/sha-384.html
crypto/webkitSubtle/sha-512.html
crypto/webkitSubtle/unimplemented-unwrap-crash.html
crypto/webkitSubtle/unwrapKey-check-usage.html
crypto/webkitSubtle/wrapKey-check-usage.html
crypto/workers/subtle/aes-postMessage-worker.html
crypto/workers/subtle/gc-worker.html
crypto/workers/subtle/hmac-postMessage-worker.html
crypto/workers/subtle/hrsa-postMessage-worker.html
crypto/workers/subtle/multiple-postMessage-worker.html
crypto/workers/subtle/rsa-postMessage-worker.html

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • crypto/CryptoKeyPair.idl:
  • crypto/SubtleCrypto.cpp:

(WebCore::SubtleCrypto::SubtleCrypto):

  • crypto/SubtleCrypto.h:

(WebCore::SubtleCrypto::create):

  • crypto/SubtleCrypto.idl: Added.
  • page/Crypto.cpp:

(WebCore::Crypto::Crypto):
(WebCore::Crypto::subtle):

  • page/Crypto.h:
  • page/Crypto.idl:

LayoutTests:

  • crypto/resources/common.js:
  • crypto/subtle/gc-2-expected.txt: Added.
  • crypto/subtle/gc-2.html: Added.
  • crypto/subtle/gc-3-expected.txt: Added.
  • crypto/subtle/gc-3.html: Added.
  • crypto/subtle/gc-expected.txt: Added.
  • crypto/subtle/gc.html: Added.
  • crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt.
  • crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html.
  • crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt.
  • crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html.
  • crypto/webkitSubtle/aes-cbc-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt.
  • crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt.
  • crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html.
  • crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html.
  • crypto/webkitSubtle/aes-cbc-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt.
  • crypto/webkitSubtle/aes-cbc-generate-key.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-generate-key.html.
  • crypto/webkitSubtle/aes-cbc-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-jwk-expected.txt.
  • crypto/webkitSubtle/aes-cbc-import-jwk.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-jwk.html.
  • crypto/webkitSubtle/aes-cbc-invalid-length-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-invalid-length-expected.txt.
  • crypto/webkitSubtle/aes-cbc-invalid-length.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-invalid-length.html.
  • crypto/webkitSubtle/aes-cbc-unwrap-failure-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-failure-expected.txt.
  • crypto/webkitSubtle/aes-cbc-unwrap-failure.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-failure.html.
  • crypto/webkitSubtle/aes-cbc-unwrap-rsa-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa-expected.txt.
  • crypto/webkitSubtle/aes-cbc-unwrap-rsa.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa.html.
  • crypto/webkitSubtle/aes-cbc-wrap-rsa-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-expected.txt.
  • crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable-expected.txt.
  • crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html.
  • crypto/webkitSubtle/aes-cbc-wrap-rsa.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa.html.
  • crypto/webkitSubtle/aes-cbc-wrong-key-class-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrong-key-class-expected.txt.
  • crypto/webkitSubtle/aes-cbc-wrong-key-class.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrong-key-class.html.
  • crypto/webkitSubtle/aes-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-export-key-expected.txt.
  • crypto/webkitSubtle/aes-export-key.html: Renamed from LayoutTests/crypto/subtle/aes-export-key.html.
  • crypto/webkitSubtle/aes-kw-key-manipulation-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-kw-key-manipulation-expected.txt.
  • crypto/webkitSubtle/aes-kw-key-manipulation.html: Renamed from LayoutTests/crypto/subtle/aes-kw-key-manipulation.html.
  • crypto/webkitSubtle/aes-kw-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt.
  • crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html.
  • crypto/webkitSubtle/aes-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-postMessage-expected.txt.
  • crypto/webkitSubtle/aes-postMessage.html: Renamed from LayoutTests/crypto/subtle/aes-postMessage.html.
  • crypto/webkitSubtle/argument-conversion-expected.txt: Renamed from LayoutTests/crypto/subtle/argument-conversion-expected.txt.
  • crypto/webkitSubtle/argument-conversion.html: Renamed from LayoutTests/crypto/subtle/argument-conversion.html.
  • crypto/webkitSubtle/array-buffer-view-offset-expected.txt: Renamed from LayoutTests/crypto/subtle/array-buffer-view-offset-expected.txt.
  • crypto/webkitSubtle/array-buffer-view-offset.html: Renamed from LayoutTests/crypto/subtle/array-buffer-view-offset.html.
  • crypto/webkitSubtle/crypto-key-algorithm-gc-expected.txt: Renamed from LayoutTests/crypto/subtle/crypto-key-algorithm-gc-expected.txt.
  • crypto/webkitSubtle/crypto-key-algorithm-gc.html: Renamed from LayoutTests/crypto/subtle/crypto-key-algorithm-gc.html.
  • crypto/webkitSubtle/crypto-key-usages-gc-expected.txt: Renamed from LayoutTests/crypto/subtle/crypto-key-usages-gc-expected.txt.
  • crypto/webkitSubtle/crypto-key-usages-gc.html: Renamed from LayoutTests/crypto/subtle/crypto-key-usages-gc.html.
  • crypto/webkitSubtle/hmac-check-algorithm-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-check-algorithm-expected.txt.
  • crypto/webkitSubtle/hmac-check-algorithm.html: Renamed from LayoutTests/crypto/subtle/hmac-check-algorithm.html.
  • crypto/webkitSubtle/hmac-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-export-key-expected.txt.
  • crypto/webkitSubtle/hmac-export-key.html: Renamed from LayoutTests/crypto/subtle/hmac-export-key.html.
  • crypto/webkitSubtle/hmac-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-export-key.html.
  • crypto/webkitSubtle/hmac-generate-key.html: Renamed from LayoutTests/crypto/subtle/hmac-generate-key.html.
  • crypto/webkitSubtle/hmac-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-import-jwk-expected.txt.
  • crypto/webkitSubtle/hmac-import-jwk.html: Renamed from LayoutTests/crypto/subtle/hmac-import-jwk.html.
  • crypto/webkitSubtle/hmac-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-postMessage-expected.txt.
  • crypto/webkitSubtle/hmac-postMessage.html: Renamed from LayoutTests/crypto/subtle/hmac-postMessage.html.
  • crypto/webkitSubtle/hmac-sign-verify-empty-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-empty-key-expected.txt.
  • crypto/webkitSubtle/hmac-sign-verify-empty-key.html: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-empty-key.html.
  • crypto/webkitSubtle/hmac-sign-verify-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-expected.txt.
  • crypto/webkitSubtle/hmac-sign-verify.html: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify.html.
  • crypto/webkitSubtle/import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/import-jwk-expected.txt.
  • crypto/webkitSubtle/import-jwk.html: Renamed from LayoutTests/crypto/subtle/import-jwk-expected.html.
  • crypto/webkitSubtle/jwk-export-use-values-expected.txt: Renamed from LayoutTests/crypto/subtle/jwk-export-use-values-expected.txt.
  • crypto/webkitSubtle/jwk-export-use-values.html: Renamed from LayoutTests/crypto/subtle/jwk-export-use-values.html.
  • crypto/webkitSubtle/jwk-import-use-values-expected.txt: Renamed from LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt.
  • crypto/webkitSubtle/jwk-import-use-values.html: Renamed from LayoutTests/crypto/subtle/jwk-import-use-values.html.
  • crypto/webkitSubtle/resources/rsa-indexeddb-non-exportable.js: Renamed from LayoutTests/crypto/subtle/resources/rsa-indexeddb-non-exportable.js.
  • crypto/webkitSubtle/resources/rsa-indexeddb.js: Renamed from LayoutTests/crypto/subtle/resources/rsa-indexeddb.js.
  • crypto/webkitSubtle/rsa-export-generated-keys-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-generated-keys-expected.txt.
  • crypto/webkitSubtle/rsa-export-generated-keys.html: Renamed from LayoutTests/crypto/subtle/rsa-export-generated-keys.html.
  • crypto/webkitSubtle/rsa-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-key-expected.txt.
  • crypto/webkitSubtle/rsa-export-key.html: Renamed from LayoutTests/crypto/subtle/rsa-export-key.html.
  • crypto/webkitSubtle/rsa-export-private-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-private-key-expected.txt.
  • crypto/webkitSubtle/rsa-export-private-key.html: Renamed from LayoutTests/crypto/subtle/rsa-export-private-key.html.
  • crypto/webkitSubtle/rsa-indexeddb-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-expected.txt.
  • crypto/webkitSubtle/rsa-indexeddb-non-exportable-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-expected.txt.
  • crypto/webkitSubtle/rsa-indexeddb-non-exportable-private-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private-expected.txt.
  • crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private.html.
  • crypto/webkitSubtle/rsa-indexeddb-non-exportable.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable.html.
  • crypto/webkitSubtle/rsa-indexeddb-private-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-private-expected.txt.
  • crypto/webkitSubtle/rsa-indexeddb-private.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-private.html.
  • crypto/webkitSubtle/rsa-indexeddb.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb.html.
  • crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key-expected.txt.
  • crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key.html.
  • crypto/webkitSubtle/rsa-oaep-key-manipulation-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-key-manipulation-expected.txt.
  • crypto/webkitSubtle/rsa-oaep-key-manipulation.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html.
  • crypto/webkitSubtle/rsa-oaep-plaintext-length-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-plaintext-length-expected.txt.
  • crypto/webkitSubtle/rsa-oaep-plaintext-length.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-plaintext-length.html.
  • crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt.
  • crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html.
  • crypto/webkitSubtle/rsa-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-postMessage-expected.txt.
  • crypto/webkitSubtle/rsa-postMessage.html: Renamed from LayoutTests/crypto/subtle/rsa-postMessage.html.
  • crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt-expected.txt.
  • crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html.
  • crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt.
  • crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key-expected.txt: Added.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify-expected.txt.
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html.
  • crypto/webkitSubtle/sha-1-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-1-expected.txt.
  • crypto/webkitSubtle/sha-1.html: Renamed from LayoutTests/crypto/subtle/sha-1.html.
  • crypto/webkitSubtle/sha-224-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-224-expected.txt.
  • crypto/webkitSubtle/sha-224.html: Renamed from LayoutTests/crypto/subtle/sha-224.html.
  • crypto/webkitSubtle/sha-256-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-256-expected.txt.
  • crypto/webkitSubtle/sha-256.html: Renamed from LayoutTests/crypto/subtle/sha-256.html.
  • crypto/webkitSubtle/sha-384-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-384-expected.txt.
  • crypto/webkitSubtle/sha-384.html: Renamed from LayoutTests/crypto/subtle/sha-384.html.
  • crypto/webkitSubtle/sha-512-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-512-expected.txt.
  • crypto/webkitSubtle/sha-512.html: Renamed from LayoutTests/crypto/subtle/sha-512.html.
  • crypto/webkitSubtle/unimplemented-unwrap-crash-expected.txt: Renamed from LayoutTests/crypto/subtle/unimplemented-unwrap-crash-expected.txt.
  • crypto/webkitSubtle/unimplemented-unwrap-crash.html: Renamed from LayoutTests/crypto/subtle/unimplemented-unwrap-crash.html.
  • crypto/webkitSubtle/unwrapKey-check-usage-expected.txt: Renamed from LayoutTests/crypto/subtle/unwrapKey-check-usage-expected.txt.
  • crypto/webkitSubtle/unwrapKey-check-usage.html: Renamed from LayoutTests/crypto/subtle/unwrapKey-check-usage.html.
  • crypto/webkitSubtle/wrapKey-check-usage-expected.txt: Renamed from LayoutTests/crypto/subtle/wrapKey-check-usage-expected.txt.
  • crypto/webkitSubtle/wrapKey-check-usage.html: Renamed from LayoutTests/crypto/subtle/wrapKey-check-usage.html.
  • crypto/workers/subtle/aes-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/aes-postMessage-worker-expected.txt.
  • crypto/workers/subtle/aes-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/aes-postMessage-worker.html.
  • crypto/workers/subtle/gc-worker-expected.txt: Added.
  • crypto/workers/subtle/gc-worker.html: Added.
  • crypto/workers/subtle/hmac-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/hmac-postMessage-worker-expected.txt.
  • crypto/workers/subtle/hmac-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/hmac-postMessage-worker.html.
  • crypto/workers/subtle/hrsa-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/hrsa-postMessage-worker-expected.txt.
  • crypto/workers/subtle/hrsa-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/hrsa-postMessage-worker.html.
  • crypto/workers/subtle/multiple-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/multiple-postMessage-worker-expected.txt.
  • crypto/workers/subtle/multiple-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/multiple-postMessage-worker.html.
  • crypto/workers/subtle/resources/aes-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/aes-postMessage-worker.js.
  • crypto/workers/subtle/resources/gc-worker.js: Added.
  • crypto/workers/subtle/resources/hmac-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/hmac-postMessage-worker.js.
  • crypto/workers/subtle/resources/hrsa-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/hrsa-postMessage-worker.js.
  • crypto/workers/subtle/resources/rsa-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/rsa-postMessage-worker.js.
  • crypto/workers/subtle/rsa-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/rsa-postMessage-worker-expected.txt.
  • crypto/workers/subtle/rsa-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/rsa-postMessage-worker.html.
  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios-simulator-wk1/TestExpectations:
  • platform/win/TestExpectations:
Location:
trunk
Files:
21 added
11 deleted
21 edited
5 copied
118 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206880 r206883  
     12016-10-06  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Add a dummy SubtleCrypto interface
     4        https://bugs.webkit.org/show_bug.cgi?id=162992
     5        <rdar://problem/28643573>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * crypto/resources/common.js:
     10        * crypto/subtle/gc-2-expected.txt: Added.
     11        * crypto/subtle/gc-2.html: Added.
     12        * crypto/subtle/gc-3-expected.txt: Added.
     13        * crypto/subtle/gc-3.html: Added.
     14        * crypto/subtle/gc-expected.txt: Added.
     15        * crypto/subtle/gc.html: Added.
     16        * crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt-expected.txt.
     17        * crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html.
     18        * crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt-expected.txt.
     19        * crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html.
     20        * crypto/webkitSubtle/aes-cbc-encrypt-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt.
     21        * crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding-expected.txt.
     22        * crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html.
     23        * crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html.
     24        * crypto/webkitSubtle/aes-cbc-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-generate-key-expected.txt.
     25        * crypto/webkitSubtle/aes-cbc-generate-key.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-generate-key.html.
     26        * crypto/webkitSubtle/aes-cbc-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-jwk-expected.txt.
     27        * crypto/webkitSubtle/aes-cbc-import-jwk.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-jwk.html.
     28        * crypto/webkitSubtle/aes-cbc-invalid-length-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-invalid-length-expected.txt.
     29        * crypto/webkitSubtle/aes-cbc-invalid-length.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-invalid-length.html.
     30        * crypto/webkitSubtle/aes-cbc-unwrap-failure-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-failure-expected.txt.
     31        * crypto/webkitSubtle/aes-cbc-unwrap-failure.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-failure.html.
     32        * crypto/webkitSubtle/aes-cbc-unwrap-rsa-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa-expected.txt.
     33        * crypto/webkitSubtle/aes-cbc-unwrap-rsa.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa.html.
     34        * crypto/webkitSubtle/aes-cbc-wrap-rsa-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-expected.txt.
     35        * crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable-expected.txt.
     36        * crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html.
     37        * crypto/webkitSubtle/aes-cbc-wrap-rsa.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrap-rsa.html.
     38        * crypto/webkitSubtle/aes-cbc-wrong-key-class-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrong-key-class-expected.txt.
     39        * crypto/webkitSubtle/aes-cbc-wrong-key-class.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-wrong-key-class.html.
     40        * crypto/webkitSubtle/aes-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-export-key-expected.txt.
     41        * crypto/webkitSubtle/aes-export-key.html: Renamed from LayoutTests/crypto/subtle/aes-export-key.html.
     42        * crypto/webkitSubtle/aes-kw-key-manipulation-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-kw-key-manipulation-expected.txt.
     43        * crypto/webkitSubtle/aes-kw-key-manipulation.html: Renamed from LayoutTests/crypto/subtle/aes-kw-key-manipulation.html.
     44        * crypto/webkitSubtle/aes-kw-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt.
     45        * crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html.
     46        * crypto/webkitSubtle/aes-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-postMessage-expected.txt.
     47        * crypto/webkitSubtle/aes-postMessage.html: Renamed from LayoutTests/crypto/subtle/aes-postMessage.html.
     48        * crypto/webkitSubtle/argument-conversion-expected.txt: Renamed from LayoutTests/crypto/subtle/argument-conversion-expected.txt.
     49        * crypto/webkitSubtle/argument-conversion.html: Renamed from LayoutTests/crypto/subtle/argument-conversion.html.
     50        * crypto/webkitSubtle/array-buffer-view-offset-expected.txt: Renamed from LayoutTests/crypto/subtle/array-buffer-view-offset-expected.txt.
     51        * crypto/webkitSubtle/array-buffer-view-offset.html: Renamed from LayoutTests/crypto/subtle/array-buffer-view-offset.html.
     52        * crypto/webkitSubtle/crypto-key-algorithm-gc-expected.txt: Renamed from LayoutTests/crypto/subtle/crypto-key-algorithm-gc-expected.txt.
     53        * crypto/webkitSubtle/crypto-key-algorithm-gc.html: Renamed from LayoutTests/crypto/subtle/crypto-key-algorithm-gc.html.
     54        * crypto/webkitSubtle/crypto-key-usages-gc-expected.txt: Renamed from LayoutTests/crypto/subtle/crypto-key-usages-gc-expected.txt.
     55        * crypto/webkitSubtle/crypto-key-usages-gc.html: Renamed from LayoutTests/crypto/subtle/crypto-key-usages-gc.html.
     56        * crypto/webkitSubtle/hmac-check-algorithm-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-check-algorithm-expected.txt.
     57        * crypto/webkitSubtle/hmac-check-algorithm.html: Renamed from LayoutTests/crypto/subtle/hmac-check-algorithm.html.
     58        * crypto/webkitSubtle/hmac-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-export-key-expected.txt.
     59        * crypto/webkitSubtle/hmac-export-key.html: Renamed from LayoutTests/crypto/subtle/hmac-export-key.html.
     60        * crypto/webkitSubtle/hmac-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-export-key.html.
     61        * crypto/webkitSubtle/hmac-generate-key.html: Renamed from LayoutTests/crypto/subtle/hmac-generate-key.html.
     62        * crypto/webkitSubtle/hmac-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-import-jwk-expected.txt.
     63        * crypto/webkitSubtle/hmac-import-jwk.html: Renamed from LayoutTests/crypto/subtle/hmac-import-jwk.html.
     64        * crypto/webkitSubtle/hmac-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-postMessage-expected.txt.
     65        * crypto/webkitSubtle/hmac-postMessage.html: Renamed from LayoutTests/crypto/subtle/hmac-postMessage.html.
     66        * crypto/webkitSubtle/hmac-sign-verify-empty-key-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-empty-key-expected.txt.
     67        * crypto/webkitSubtle/hmac-sign-verify-empty-key.html: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-empty-key.html.
     68        * crypto/webkitSubtle/hmac-sign-verify-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify-expected.txt.
     69        * crypto/webkitSubtle/hmac-sign-verify.html: Renamed from LayoutTests/crypto/subtle/hmac-sign-verify.html.
     70        * crypto/webkitSubtle/import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/import-jwk-expected.txt.
     71        * crypto/webkitSubtle/import-jwk.html: Renamed from LayoutTests/crypto/subtle/import-jwk-expected.html.
     72        * crypto/webkitSubtle/jwk-export-use-values-expected.txt: Renamed from LayoutTests/crypto/subtle/jwk-export-use-values-expected.txt.
     73        * crypto/webkitSubtle/jwk-export-use-values.html: Renamed from LayoutTests/crypto/subtle/jwk-export-use-values.html.
     74        * crypto/webkitSubtle/jwk-import-use-values-expected.txt: Renamed from LayoutTests/crypto/subtle/jwk-import-use-values-expected.txt.
     75        * crypto/webkitSubtle/jwk-import-use-values.html: Renamed from LayoutTests/crypto/subtle/jwk-import-use-values.html.
     76        * crypto/webkitSubtle/resources/rsa-indexeddb-non-exportable.js: Renamed from LayoutTests/crypto/subtle/resources/rsa-indexeddb-non-exportable.js.
     77        * crypto/webkitSubtle/resources/rsa-indexeddb.js: Renamed from LayoutTests/crypto/subtle/resources/rsa-indexeddb.js.
     78        * crypto/webkitSubtle/rsa-export-generated-keys-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-generated-keys-expected.txt.
     79        * crypto/webkitSubtle/rsa-export-generated-keys.html: Renamed from LayoutTests/crypto/subtle/rsa-export-generated-keys.html.
     80        * crypto/webkitSubtle/rsa-export-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-key-expected.txt.
     81        * crypto/webkitSubtle/rsa-export-key.html: Renamed from LayoutTests/crypto/subtle/rsa-export-key.html.
     82        * crypto/webkitSubtle/rsa-export-private-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-export-private-key-expected.txt.
     83        * crypto/webkitSubtle/rsa-export-private-key.html: Renamed from LayoutTests/crypto/subtle/rsa-export-private-key.html.
     84        * crypto/webkitSubtle/rsa-indexeddb-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-expected.txt.
     85        * crypto/webkitSubtle/rsa-indexeddb-non-exportable-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-expected.txt.
     86        * crypto/webkitSubtle/rsa-indexeddb-non-exportable-private-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private-expected.txt.
     87        * crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private.html.
     88        * crypto/webkitSubtle/rsa-indexeddb-non-exportable.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable.html.
     89        * crypto/webkitSubtle/rsa-indexeddb-private-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-private-expected.txt.
     90        * crypto/webkitSubtle/rsa-indexeddb-private.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb-private.html.
     91        * crypto/webkitSubtle/rsa-indexeddb.html: Renamed from LayoutTests/crypto/subtle/rsa-indexeddb.html.
     92        * crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key-expected.txt.
     93        * crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key.html.
     94        * crypto/webkitSubtle/rsa-oaep-key-manipulation-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-key-manipulation-expected.txt.
     95        * crypto/webkitSubtle/rsa-oaep-key-manipulation.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html.
     96        * crypto/webkitSubtle/rsa-oaep-plaintext-length-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-plaintext-length-expected.txt.
     97        * crypto/webkitSubtle/rsa-oaep-plaintext-length.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-plaintext-length.html.
     98        * crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt.
     99        * crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html.
     100        * crypto/webkitSubtle/rsa-postMessage-expected.txt: Renamed from LayoutTests/crypto/subtle/rsa-postMessage-expected.txt.
     101        * crypto/webkitSubtle/rsa-postMessage.html: Renamed from LayoutTests/crypto/subtle/rsa-postMessage.html.
     102        * crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt-expected.txt: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt-expected.txt.
     103        * crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html.
     104        * crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt.
     105        * crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html: Renamed from LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html.
     106        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt.
     107        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt.
     108        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html.
     109        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html.
     110        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt.
     111        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key-expected.txt: Added.
     112        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html.
     113        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html.
     114        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify-expected.txt: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify-expected.txt.
     115        * crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html: Renamed from LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html.
     116        * crypto/webkitSubtle/sha-1-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-1-expected.txt.
     117        * crypto/webkitSubtle/sha-1.html: Renamed from LayoutTests/crypto/subtle/sha-1.html.
     118        * crypto/webkitSubtle/sha-224-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-224-expected.txt.
     119        * crypto/webkitSubtle/sha-224.html: Renamed from LayoutTests/crypto/subtle/sha-224.html.
     120        * crypto/webkitSubtle/sha-256-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-256-expected.txt.
     121        * crypto/webkitSubtle/sha-256.html: Renamed from LayoutTests/crypto/subtle/sha-256.html.
     122        * crypto/webkitSubtle/sha-384-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-384-expected.txt.
     123        * crypto/webkitSubtle/sha-384.html: Renamed from LayoutTests/crypto/subtle/sha-384.html.
     124        * crypto/webkitSubtle/sha-512-expected.txt: Renamed from LayoutTests/crypto/subtle/sha-512-expected.txt.
     125        * crypto/webkitSubtle/sha-512.html: Renamed from LayoutTests/crypto/subtle/sha-512.html.
     126        * crypto/webkitSubtle/unimplemented-unwrap-crash-expected.txt: Renamed from LayoutTests/crypto/subtle/unimplemented-unwrap-crash-expected.txt.
     127        * crypto/webkitSubtle/unimplemented-unwrap-crash.html: Renamed from LayoutTests/crypto/subtle/unimplemented-unwrap-crash.html.
     128        * crypto/webkitSubtle/unwrapKey-check-usage-expected.txt: Renamed from LayoutTests/crypto/subtle/unwrapKey-check-usage-expected.txt.
     129        * crypto/webkitSubtle/unwrapKey-check-usage.html: Renamed from LayoutTests/crypto/subtle/unwrapKey-check-usage.html.
     130        * crypto/webkitSubtle/wrapKey-check-usage-expected.txt: Renamed from LayoutTests/crypto/subtle/wrapKey-check-usage-expected.txt.
     131        * crypto/webkitSubtle/wrapKey-check-usage.html: Renamed from LayoutTests/crypto/subtle/wrapKey-check-usage.html.
     132        * crypto/workers/subtle/aes-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/aes-postMessage-worker-expected.txt.
     133        * crypto/workers/subtle/aes-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/aes-postMessage-worker.html.
     134        * crypto/workers/subtle/gc-worker-expected.txt: Added.
     135        * crypto/workers/subtle/gc-worker.html: Added.
     136        * crypto/workers/subtle/hmac-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/hmac-postMessage-worker-expected.txt.
     137        * crypto/workers/subtle/hmac-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/hmac-postMessage-worker.html.
     138        * crypto/workers/subtle/hrsa-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/hrsa-postMessage-worker-expected.txt.
     139        * crypto/workers/subtle/hrsa-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/hrsa-postMessage-worker.html.
     140        * crypto/workers/subtle/multiple-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/multiple-postMessage-worker-expected.txt.
     141        * crypto/workers/subtle/multiple-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/multiple-postMessage-worker.html.
     142        * crypto/workers/subtle/resources/aes-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/aes-postMessage-worker.js.
     143        * crypto/workers/subtle/resources/gc-worker.js: Added.
     144        * crypto/workers/subtle/resources/hmac-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/hmac-postMessage-worker.js.
     145        * crypto/workers/subtle/resources/hrsa-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/hrsa-postMessage-worker.js.
     146        * crypto/workers/subtle/resources/rsa-postMessage-worker.js: Renamed from LayoutTests/crypto/workers/resources/rsa-postMessage-worker.js.
     147        * crypto/workers/subtle/rsa-postMessage-worker-expected.txt: Renamed from LayoutTests/crypto/workers/rsa-postMessage-worker-expected.txt.
     148        * crypto/workers/subtle/rsa-postMessage-worker.html: Renamed from LayoutTests/crypto/workers/rsa-postMessage-worker.html.
     149        * platform/efl/TestExpectations:
     150        * platform/gtk/TestExpectations:
     151        * platform/ios-simulator-wk1/TestExpectations:
     152        * platform/win/TestExpectations:
     153
    11542016-10-06  Antti Koivisto  <antti@apple.com>
    2155
  • trunk/LayoutTests/crypto/resources/common.js

    r206627 r206883  
    8181    }
    8282};
    83 
    84 if (!(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) && !crypto.subtle)
    85     crypto.subtle = crypto.webkitSubtle;
  • trunk/LayoutTests/crypto/subtle/gc-expected.txt

    r206882 r206883  
    1 Make sure that unwrap does not cause a crash.
     1Test that window.crypto.subtle wrapper preserves custom properties.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    44
    55
     6PASS window.crypto.subtle.foo is "bar"
    67PASS successfullyParsed is true
    78
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html

    r206882 r206883  
    2020
    2121debug("Importing a raw AES key from string literal...");
    22 crypto.subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
     22crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
    2323    key = result;
    2424    shouldBe("key.type", "'secret'");
     
    2929
    3030    debug("Using the key to encrypt plaintext...");
    31     return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
     31    return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
    3232}).then(function(result) {
    3333    encryptionResult = result;
     
    3535
    3636    debug("Decrypting it back...");
    37     return crypto.subtle.decrypt({name: "aes-cbc", iv: iv}, key, result);
     37    return crypto.webkitSubtle.decrypt({name: "aes-cbc", iv: iv}, key, result);
    3838}).then(function(result) {
    3939    decryptionResult = result;
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html

    r206882 r206883  
    2020
    2121debug("Importing a raw AES key from string literal...");
    22 crypto.subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
     22crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
    2323    key = result;
    2424    shouldBe("key.type", "'secret'");
     
    2929
    3030    debug("Using the key to encrypt plaintext...");
    31     return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
     31    return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
    3232}).then(function(result) {
    3333    encryptionResult = result;
     
    3535
    3636    debug("Decrypting it back...");
    37     return crypto.subtle.decrypt({name: "aes-cbc", iv: iv}, key, result);
     37    return crypto.webkitSubtle.decrypt({name: "aes-cbc", iv: iv}, key, result);
    3838}).then(function(result) {
    3939    decryptionResult = result;
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-encrypt-decrypt-expected.txt

    r206882 r206883  
    1515PASS new Uint8Array(decryptionResult) is plaintext
    1616Testing initialization vector bindings...
    17 PASS crypto.subtle.encrypt({name: 'AES-CBC', iv: null}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.
    18 PASS crypto.subtle.encrypt({name: 'AES-CBC'}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.
    19 PASS crypto.subtle.encrypt({name: 'AES-CBC', iv: 3}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.
    20 PASS crypto.subtle.encrypt({name: 'AES-CBC', iv: new Uint8Array([0])}, key, plaintext) threw exception Error: AES-CBC initialization data must be 16 bytes.
     17PASS crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: null}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.
     18PASS crypto.webkitSubtle.encrypt({name: 'AES-CBC'}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.
     19PASS crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: 3}, key, plaintext) threw exception TypeError: Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData.
     20PASS crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: new Uint8Array([0])}, key, plaintext) threw exception Error: AES-CBC initialization data must be 16 bytes.
    2121PASS successfullyParsed is true
    2222
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html

    r206882 r206883  
    2020
    2121debug("Importing a raw AES key from string literal...");
    22 crypto.subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
     22crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
    2323    key = result;
    2424    shouldBe("key.type", "'secret'");
     
    2929
    3030    debug("Using the key to encrypt plaintext...");
    31     return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
     31    return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
    3232}).then(function(result) {
    3333    cyphertext = result;
     
    3535
    3636    debug("Decrypting it back...");
    37     return crypto.subtle.decrypt({name: "aes-cbc", iv: iv}, key, result);
     37    return crypto.webkitSubtle.decrypt({name: "aes-cbc", iv: iv}, key, result);
    3838}).then(function(result) {
    3939    decryptionResult = result;
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html

    r206882 r206883  
    2020
    2121debug("Importing a raw AES key from string literal...");
    22 crypto.subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
     22crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
    2323    key = result;
    2424    shouldBe("key.type", "'secret'");
     
    2929
    3030    debug("Using the key to encrypt plaintext...");
    31     return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
     31    return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
    3232}).then(function(result) {
    3333    encryptionResult = result;
     
    3535
    3636    debug("Decrypting it back...");
    37     return crypto.subtle.decrypt({name: "aes-cbc", iv: iv}, key, result);
     37    return crypto.webkitSubtle.decrypt({name: "aes-cbc", iv: iv}, key, result);
    3838}).then(function(result) {
    3939    decryptionResult = result;
     
    4141
    4242    debug("Testing initialization vector bindings...");
    43     shouldThrow("crypto.subtle.encrypt({name: 'AES-CBC', iv: null}, key, plaintext)");
    44     shouldThrow("crypto.subtle.encrypt({name: 'AES-CBC'}, key, plaintext)");
    45     shouldThrow("crypto.subtle.encrypt({name: 'AES-CBC', iv: 3}, key, plaintext)");
    46     shouldThrow("crypto.subtle.encrypt({name: 'AES-CBC', iv: new Uint8Array([0])}, key, plaintext)");
     43    shouldThrow("crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: null}, key, plaintext)");
     44    shouldThrow("crypto.webkitSubtle.encrypt({name: 'AES-CBC'}, key, plaintext)");
     45    shouldThrow("crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: 3}, key, plaintext)");
     46    shouldThrow("crypto.webkitSubtle.encrypt({name: 'AES-CBC', iv: new Uint8Array([0])}, key, plaintext)");
    4747
    4848    finishJSTest();
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-generate-key.html

    r206882 r206883  
    1616var extractable = true;
    1717
    18 shouldThrow('crypto.subtle.generateKey("aes-cbc", extractable, ["encrypt", "decrypt"])');
    19 shouldThrow('crypto.subtle.generateKey({name: "aes-cbc"}, extractable, ["encrypt", "decrypt"])');
    20 shouldThrow('crypto.subtle.generateKey({name: "aes-cbc", length: undefined}, extractable, ["encrypt", "decrypt"])');
    21 shouldThrow('crypto.subtle.generateKey({name: "aes-cbc", length: {}}, extractable, ["encrypt", "decrypt"])');
     18shouldThrow('crypto.webkitSubtle.generateKey("aes-cbc", extractable, ["encrypt", "decrypt"])');
     19shouldThrow('crypto.webkitSubtle.generateKey({name: "aes-cbc"}, extractable, ["encrypt", "decrypt"])');
     20shouldThrow('crypto.webkitSubtle.generateKey({name: "aes-cbc", length: undefined}, extractable, ["encrypt", "decrypt"])');
     21shouldThrow('crypto.webkitSubtle.generateKey({name: "aes-cbc", length: {}}, extractable, ["encrypt", "decrypt"])');
    2222
    2323debug("Generating a key...");
    24 crypto.subtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["encrypt", "decrypt"]).then(function(result) {
     24crypto.webkitSubtle.generateKey({name: "aes-cbc", length: 128}, extractable, ["encrypt", "decrypt"]).then(function(result) {
    2525    key = result;
    2626
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-import-jwk.html

    r206882 r206883  
    3030
    3131debug("Importing a key...\n");
    32 crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, null, false, ["encrypt"]).then(function(result) {
     32crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, null, false, ["encrypt"]).then(function(result) {
    3333    key = result;
    3434
     
    4040
    4141    debug("\nUsing the key to encrypt plaintext...");
    42     return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
     42    return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext);
    4343}).then(function(result) {
    4444    encryptionResult = result;
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-invalid-length.html

    r206882 r206883  
    2020
    2121debug("Importing a raw AES key from string literal...");
    22 crypto.subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
     22crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt"]).then(function(result) {
    2323    key = result;
    2424    shouldBe("key.type", "'secret'");
     
    2929
    3030    debug("Using the key to encrypt plaintext...");
    31     return crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, [plaintext]);
     31    return crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, [plaintext]);
    3232}).then(undefined, function(result) {
    3333    debug("Failed, as expected. Note that the spec doesn't appear to clearly define which step should fail.");
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-unwrap-failure.html

    r206882 r206883  
    2121
    2222debug("Importing an unwrapping key...");
    23 crypto.subtle.importKey("raw", unwrappingKeyOctets, "AES-CBC", nonExtractable, ["unwrapKey"]).then(function(result) {
     23crypto.webkitSubtle.importKey("raw", unwrappingKeyOctets, "AES-CBC", nonExtractable, ["unwrapKey"]).then(function(result) {
    2424    unwrappingKey = result;
    2525    shouldBe("unwrappingKey.algorithm.name", "'AES-CBC'");
    2626    var unwrapAlgorithm = {name: "AES-CBC", iv: hexStringToUint8Array("000102030405060708090a0b0c0d0e0f")};
    2727    debug("Unwrapping a key...");
    28     return crypto.subtle.unwrapKey("jwk", wrappedKey, unwrappingKey, unwrapAlgorithm, null, extractable, ["sign", "verify", "encrypt", "decrypt", "wrap", "unwrap"]);
     28    return crypto.webkitSubtle.unwrapKey("jwk", wrappedKey, unwrappingKey, unwrapAlgorithm, null, extractable, ["sign", "verify", "encrypt", "decrypt", "wrap", "unwrap"]);
    2929}).then(undefined, function(result) {
    3030    testPassed("Promise rejected");
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-unwrap-rsa.html

    r206882 r206883  
    3030
    3131debug("Importing an unwrapping key...");
    32 crypto.subtle.importKey("raw", unwrappingKeyOctets, "AES-CBC", nonExtractable, ["unwrapKey"]).then(function(result) {
     32crypto.webkitSubtle.importKey("raw", unwrappingKeyOctets, "AES-CBC", nonExtractable, ["unwrapKey"]).then(function(result) {
    3333    unwrappingKey = result;
    3434    shouldBe("unwrappingKey.algorithm.name", "'AES-CBC'");
    3535    var unwrapAlgorithm = {name: "AES-CBC", iv: hexStringToUint8Array("000102030405060708090a0b0c0d0e0f")};
    3636    debug("Unwrapping a key...");
    37     return crypto.subtle.unwrapKey("jwk", wrappedKey, unwrappingKey, unwrapAlgorithm, null, extractable, ["sign", "verify", "encrypt", "decrypt", "wrap", "unwrap"]);
     37    return crypto.webkitSubtle.unwrapKey("jwk", wrappedKey, unwrappingKey, unwrapAlgorithm, null, extractable, ["sign", "verify", "encrypt", "decrypt", "wrap", "unwrap"]);
    3838}).then(function(result) {
    3939    unwrappedKey = result;
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html

    r206882 r206883  
    3030
    3131debug("Importing a key to wrap...");
    32 crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {
     32crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {
    3333    key = result;
    3434    shouldBe("key.algorithm.name", "'RSASSA-PKCS1-v1_5'");
    3535    debug("Importing a key encryption key...");
    36     return crypto.subtle.importKey("raw", wrappingKeyOctets, "AES-CBC", nonExtractable, ["wrapKey"]);
     36    return crypto.webkitSubtle.importKey("raw", wrappingKeyOctets, "AES-CBC", nonExtractable, ["wrapKey"]);
    3737}).then(function(result) {
    3838    wrappingKey = result;
     
    4040    var wrapAlgorithm = {name: "AES-CBC", iv: hexStringToUint8Array("000102030405060708090a0b0c0d0e0f")};
    4141    debug("wrapping the key...");
    42     return crypto.subtle.wrapKey("jwk", key, wrappingKey, wrapAlgorithm);
     42    return crypto.webkitSubtle.wrapKey("jwk", key, wrappingKey, wrapAlgorithm);
    4343}).then(undefined, function() {
    4444    testPassed("Rejected");
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-wrap-rsa.html

    r206882 r206883  
    3030
    3131debug("Importing a key to wrap...");
    32 crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {
     32crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {
    3333    key = result;
    3434    shouldBe("key.algorithm.name", "'RSASSA-PKCS1-v1_5'");
    3535    debug("Importing a key encryption key...");
    36     return crypto.subtle.importKey("raw", wrappingKeyOctets, "AES-CBC", nonExtractable, ["wrapKey"]);
     36    return crypto.webkitSubtle.importKey("raw", wrappingKeyOctets, "AES-CBC", nonExtractable, ["wrapKey"]);
    3737}).then(function(result) {
    3838    wrappingKey = result;
    3939    shouldBe("wrappingKey.algorithm.name", "'AES-CBC'");
    4040    var wrapAlgorithm = {name: "AES-CBC", iv: hexStringToUint8Array("000102030405060708090a0b0c0d0e0f")};
    41     return crypto.subtle.wrapKey("jwk", key, wrappingKey, wrapAlgorithm);
     41    return crypto.webkitSubtle.wrapKey("jwk", key, wrappingKey, wrapAlgorithm);
    4242}).then(function(result) {
    4343    wrappedKey = result;
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-wrong-key-class-expected.txt

    r206882 r206883  
    66Importing a raw HMAC key from string literal...
    77Using the key to encrypt plaintext...
    8 PASS crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
     8PASS crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
    99PASS successfullyParsed is true
    1010
  • trunk/LayoutTests/crypto/webkitSubtle/aes-cbc-wrong-key-class.html

    r206882 r206883  
    2020
    2121debug("Importing a raw HMAC key from string literal...");
    22 crypto.subtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify", "encrypt", "decrypt"]).then(function(result) {
     22crypto.webkitSubtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify", "encrypt", "decrypt"]).then(function(result) {
    2323    key = result;
    2424    debug("Using the key to encrypt plaintext...");
    25     shouldThrow('crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext)')
     25    shouldThrow('crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, plaintext)')
    2626
    2727    finishJSTest();
  • trunk/LayoutTests/crypto/webkitSubtle/aes-export-key.html

    r206882 r206883  
    2424var jwkKeyAsArrayBuffer = asciiToUint8Array(JSON.stringify(jwkKey));
    2525
    26 shouldThrow('crypto.subtle.exportKey("raw")');
    27 shouldThrow('crypto.subtle.exportKey("raw", null)');
    28 shouldThrow('crypto.subtle.exportKey("raw", undefined)');
    29 shouldThrow('crypto.subtle.exportKey("raw", {})');
    30 shouldThrow('crypto.subtle.exportKey("raw", 1)');
     26shouldThrow('crypto.webkitSubtle.exportKey("raw")');
     27shouldThrow('crypto.webkitSubtle.exportKey("raw", null)');
     28shouldThrow('crypto.webkitSubtle.exportKey("raw", undefined)');
     29shouldThrow('crypto.webkitSubtle.exportKey("raw", {})');
     30shouldThrow('crypto.webkitSubtle.exportKey("raw", 1)');
    3131
    3232debug("\nImporting a JWK key...");
    33 crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, "AES-CBC", extractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']).then(function(result) {
     33crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, "AES-CBC", extractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']).then(function(result) {
    3434    key = result;
    3535
    36     shouldThrow('crypto.subtle.exportKey(null, key)');
    37     shouldThrow('crypto.subtle.exportKey(undefined, key)');
    38     shouldThrow('crypto.subtle.exportKey({}, key)');
    39     shouldThrow('crypto.subtle.exportKey("", key)');
    40     shouldThrow('crypto.subtle.exportKey("foobar", key)');
     36    shouldThrow('crypto.webkitSubtle.exportKey(null, key)');
     37    shouldThrow('crypto.webkitSubtle.exportKey(undefined, key)');
     38    shouldThrow('crypto.webkitSubtle.exportKey({}, key)');
     39    shouldThrow('crypto.webkitSubtle.exportKey("", key)');
     40    shouldThrow('crypto.webkitSubtle.exportKey("foobar", key)');
    4141
    4242    debug("\nExporting the key as raw data...");
    43     return crypto.subtle.exportKey("raw", key);
     43    return crypto.webkitSubtle.exportKey("raw", key);
    4444}).then(function(result) {
    4545    exportedData = result;
     
    4747
    4848    debug("Exporting the key as JWK...");
    49     return crypto.subtle.exportKey("jwk", key);
     49    return crypto.webkitSubtle.exportKey("jwk", key);
    5050}).then(function(result) {
    5151    exportedJWK = JSON.parse(bytesToASCIIString(result));
     
    5858
    5959    debug("\nImporting a key that's not extractable...");
    60     return crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, "AES-CBC", nonExtractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey'])
     60    return crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, "AES-CBC", nonExtractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey'])
    6161}).then(function(result) {
    6262    key = result;
    6363
    6464    debug("\nTrying to export as raw...");
    65     return crypto.subtle.exportKey("raw", key);
     65    return crypto.webkitSubtle.exportKey("raw", key);
    6666}).then(function(result) {
    6767    testFailed("Promise wasn't rejected");
     
    7171
    7272    debug("Trying to export as jwk...");
    73     return crypto.subtle.exportKey("jwk", key);
     73    return crypto.webkitSubtle.exportKey("jwk", key);
    7474}).then(function(result) {
    7575    testFailed("Promise wasn't rejected");
  • trunk/LayoutTests/crypto/webkitSubtle/aes-kw-key-manipulation-expected.txt

    r206882 r206883  
    1111
    1212Testing that the key can't be used with AES-CBC...
    13 PASS crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
     13PASS crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
    1414
    1515Exporting the key to raw...
  • trunk/LayoutTests/crypto/webkitSubtle/aes-kw-key-manipulation.html

    r206882 r206883  
    1717
    1818debug("Generating a key...");
    19 crypto.subtle.generateKey({name: "aes-kw", length: 256}, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {
     19crypto.webkitSubtle.generateKey({name: "aes-kw", length: 256}, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {
    2020    key = result;
    2121    shouldBe("key.toString()", "'[object CryptoKey]'");
     
    2626    debug("\nTesting that the key can't be used with AES-CBC...");
    2727    iv = hexStringToUint8Array("000102030405060708090a0b0c0d0e0f");
    28     shouldThrow('crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, key, hexStringToUint8Array("00"))');
     28    shouldThrow('crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, key, hexStringToUint8Array("00"))');
    2929
    3030    debug("\nExporting the key to raw...");
    31     return crypto.subtle.exportKey('raw', key);
     31    return crypto.webkitSubtle.exportKey('raw', key);
    3232}).then(function(result) {
    3333    exportedKey = result;
    3434    shouldBe("exportedKey.toString()", "'[object ArrayBuffer]'");
    3535    debug("Importing it back...");
    36     return crypto.subtle.importKey('raw', exportedKey, "aes-kw", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);
     36    return crypto.webkitSubtle.importKey('raw', exportedKey, "aes-kw", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);
    3737}).then(function(result) {
    3838    importedKey = result;
  • trunk/LayoutTests/crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html

    r206882 r206883  
    1919
    2020debug("Importing key encryption key...");
    21 crypto.subtle.importKey("raw", kekData, "aes-kw", extractable, ["wrapKey", "unwrapKey"]).then(function(result) {
     21crypto.webkitSubtle.importKey("raw", kekData, "aes-kw", extractable, ["wrapKey", "unwrapKey"]).then(function(result) {
    2222    kek = result;
    2323
    2424    debug("Importing a key to be wrapped...");
    25     return crypto.subtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);
     25    return crypto.webkitSubtle.importKey("raw", keyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);
    2626}).then(function(result) {
    2727    key = result;
    2828
    2929    debug("Wrapping it...");
    30     return crypto.subtle.wrapKey("raw", key, kek, "aes-kw");
     30    return crypto.webkitSubtle.wrapKey("raw", key, kek, "aes-kw");
    3131}).then(function(result) {
    3232    wrappedKey = result;
     
    3434
    3535    debug("Unwrapping it...");
    36     return crypto.subtle.unwrapKey("raw", wrappedKey, kek, "aes-kw", "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);
     36    return crypto.webkitSubtle.unwrapKey("raw", wrappedKey, kek, "aes-kw", "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);
    3737}).then(function(result) {
    3838    unwrappedKey = result;
     
    4545
    4646    debug("Exporting it...");
    47     return crypto.subtle.exportKey("raw", unwrappedKey);
     47    return crypto.webkitSubtle.exportKey("raw", unwrappedKey);
    4848}).then(function(result) {
    4949    unwrappedKeyData = result;
  • trunk/LayoutTests/crypto/webkitSubtle/aes-postMessage.html

    r206882 r206883  
    2424}, false);
    2525
    26 crypto.subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(key) {
     26crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(key) {
    2727    postMessage(key, "*");
    2828});
  • trunk/LayoutTests/crypto/webkitSubtle/array-buffer-view-offset.html

    r206882 r206883  
    1717    var originalData = new Uint8Array([0xf, 0xf, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0xf, 0xf, 0xf]);
    1818    var slicedData = new Uint8Array(originalData.buffer, 3, 11);
    19     return crypto.subtle.digest({name: 'sha-1'}, slicedData);
     19    return crypto.webkitSubtle.digest({name: 'sha-1'}, slicedData);
    2020}).then(function(result) {
    2121    digest = result;
  • trunk/LayoutTests/crypto/webkitSubtle/crypto-key-algorithm-gc.html

    r206882 r206883  
    1313
    1414debug("\nGenerating a HMAC key with default length...");
    15 crypto.subtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) {
     15crypto.webkitSubtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) {
    1616    key = result;
    1717    startTest();
  • trunk/LayoutTests/crypto/webkitSubtle/crypto-key-usages-gc.html

    r206882 r206883  
    1313
    1414debug("\nGenerating a HMAC key with default length...");
    15 crypto.subtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) {
     15crypto.webkitSubtle.generateKey({name: "hmac", hash: "sha-1"}, true, ["sign", "verify"]).then(function(result) {
    1616    key = result;
    1717    startTest();
  • trunk/LayoutTests/crypto/webkitSubtle/hmac-export-key-expected.txt

    r206882 r206883  
    55
    66Importing a JWK key...
    7 PASS crypto.subtle.exportKey(null, key) threw exception TypeError: Unknown key format.
    8 PASS crypto.subtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.
    9 PASS crypto.subtle.exportKey({}, key) threw exception TypeError: Unknown key format.
    10 PASS crypto.subtle.exportKey("", key) threw exception TypeError: Unknown key format.
    11 PASS crypto.subtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.
     7PASS crypto.webkitSubtle.exportKey(null, key) threw exception TypeError: Unknown key format.
     8PASS crypto.webkitSubtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.
     9PASS crypto.webkitSubtle.exportKey({}, key) threw exception TypeError: Unknown key format.
     10PASS crypto.webkitSubtle.exportKey("", key) threw exception TypeError: Unknown key format.
     11PASS crypto.webkitSubtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.
    1212Exporting the key as raw data...
    1313PASS bytesToHexString(new Uint8Array(exportedData)) is '6a18e49feff7f3b7e09ec89b7f6deab2f6a18e49feff7f3b7e09ec89b7f6deab'
  • trunk/LayoutTests/crypto/webkitSubtle/hmac-export-key.html

    r206882 r206883  
    2525
    2626debug("Importing a JWK key...");
    27 crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, { name: "HMAC", hash: "SHA-256" }, extractable, ["sign", "verify"]).then(function(result) {
     27crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, { name: "HMAC", hash: "SHA-256" }, extractable, ["sign", "verify"]).then(function(result) {
    2828    key = result;
    2929
    30     shouldThrow('crypto.subtle.exportKey(null, key)');
    31     shouldThrow('crypto.subtle.exportKey(undefined, key)');
    32     shouldThrow('crypto.subtle.exportKey({}, key)');
    33     shouldThrow('crypto.subtle.exportKey("", key)');
    34     shouldThrow('crypto.subtle.exportKey("foobar", key)');
     30    shouldThrow('crypto.webkitSubtle.exportKey(null, key)');
     31    shouldThrow('crypto.webkitSubtle.exportKey(undefined, key)');
     32    shouldThrow('crypto.webkitSubtle.exportKey({}, key)');
     33    shouldThrow('crypto.webkitSubtle.exportKey("", key)');
     34    shouldThrow('crypto.webkitSubtle.exportKey("foobar", key)');
    3535
    3636    debug("Exporting the key as raw data...");
    37     return crypto.subtle.exportKey("raw", key);
     37    return crypto.webkitSubtle.exportKey("raw", key);
    3838}).then(function(result) {
    3939    exportedData = result;
     
    4141
    4242    debug("Exporting the key as JWK...");
    43     return crypto.subtle.exportKey("jwk", key);
     43    return crypto.webkitSubtle.exportKey("jwk", key);
    4444}).then(function(result) {
    4545    exportedJWK = JSON.parse(bytesToASCIIString(result));
     
    5252
    5353    debug("\nImporting a key that's not extractable...");
    54     return crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, { name: "HMAC", hash: "SHA-256" }, nonExtractable, ["sign", "verify"]);
     54    return crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, { name: "HMAC", hash: "SHA-256" }, nonExtractable, ["sign", "verify"]);
    5555}).then(function(result) {
    5656    key = result;
    5757
    5858    debug("\nTrying to export as raw...");
    59     return crypto.subtle.exportKey("raw", key);
     59    return crypto.webkitSubtle.exportKey("raw", key);
    6060}).then(function(result) {
    6161    testFailed("Promise wasn't rejected");
     
    6565
    6666    debug("Trying to export as jwk...");
    67     return crypto.subtle.exportKey("jwk", key);
     67    return crypto.webkitSubtle.exportKey("jwk", key);
    6868}).then(function(result) {
    6969    testFailed("Promise wasn't rejected");
  • trunk/LayoutTests/crypto/webkitSubtle/hmac-generate-key.html

    r206882 r206883  
    1616var extractable = true;
    1717
    18 shouldThrow('crypto.subtle.generateKey("hmac", extractable, ["sign", "verify"])');
    19 shouldThrow('crypto.subtle.generateKey({name: "hmac"}, extractable, ["sign", "verify"])');
    20 shouldThrow('crypto.subtle.generateKey({name: "hmac", length: undefined}, extractable, ["sign", "verify"])');
    21 shouldThrow('crypto.subtle.generateKey({name: "hmac", length: {}}, extractable, ["sign", "verify"])');
     18shouldThrow('crypto.webkitSubtle.generateKey("hmac", extractable, ["sign", "verify"])');
     19shouldThrow('crypto.webkitSubtle.generateKey({name: "hmac"}, extractable, ["sign", "verify"])');
     20shouldThrow('crypto.webkitSubtle.generateKey({name: "hmac", length: undefined}, extractable, ["sign", "verify"])');
     21shouldThrow('crypto.webkitSubtle.generateKey({name: "hmac", length: {}}, extractable, ["sign", "verify"])');
    2222
    2323debug("\nGenerating a key with default length...");
    24 crypto.subtle.generateKey({name: "hmac", hash: "sha-1"}, extractable, ["sign", "verify"]).then(function(result) {
     24crypto.webkitSubtle.generateKey({name: "hmac", hash: "sha-1"}, extractable, ["sign", "verify"]).then(function(result) {
    2525    key = result;
    2626
     
    3333
    3434    debug("\nGenerating a key with custom length...");
    35     return crypto.subtle.generateKey({name: "hmac", hash: "sha-1", length: 5}, extractable, ["sign"]);
     35    return crypto.webkitSubtle.generateKey({name: "hmac", hash: "sha-1", length: 5}, extractable, ["sign"]);
    3636}).then(function(result) {
    3737    key = result;
  • trunk/LayoutTests/crypto/webkitSubtle/hmac-import-jwk.html

    r206882 r206883  
    2727
    2828debug("Importing a key...\n");
    29 crypto.subtle.importKey("jwk", hmacKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {
     29crypto.webkitSubtle.importKey("jwk", hmacKeyAsArrayBuffer, null, extractable, ["sign", "verify"]).then(function(result) {
    3030    key = result;
    3131
     
    3737
    3838    debug("\nUsing the key to sign message 'foo'...");
    39     return crypto.subtle.sign(key.algorithm, key, asciiToUint8Array('foo'));
     39    return crypto.webkitSubtle.sign(key.algorithm, key, asciiToUint8Array('foo'));
    4040}).then(function(result) {
    4141    signature = result;
     
    4343
    4444    debug("\nVerifying the signature...");
    45     return crypto.subtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));
     45    return crypto.webkitSubtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));
    4646}).then(function(result) {
    4747    verificationResult = result;
  • trunk/LayoutTests/crypto/webkitSubtle/hmac-postMessage.html

    r206882 r206883  
    2424}, false);
    2525
    26 crypto.subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(key) {
     26crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(key) {
    2727    postMessage(key, "*");
    2828});
  • trunk/LayoutTests/crypto/webkitSubtle/hmac-sign-verify-empty-key.html

    r206882 r206883  
    1818
    1919debug("Importing a raw HMAC key from string literal...");
    20 crypto.subtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify"]).then(function(result) {
     20crypto.webkitSubtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify"]).then(function(result) {
    2121    key = result;
    2222    shouldBe("key.type", "'secret'");
     
    2828
    2929    debug("Using the key to sign 'foo'...");
    30     return crypto.subtle.sign(key.algorithm, key, asciiToUint8Array('foo'));
     30    return crypto.webkitSubtle.sign(key.algorithm, key, asciiToUint8Array('foo'));
    3131}).then(function(result) {
    3232    signature = result;
     
    3434
    3535    debug("Verifying the signature...");
    36     return crypto.subtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));
     36    return crypto.webkitSubtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));
    3737}).then(function(result) {
    3838    verificationResult = result;
  • trunk/LayoutTests/crypto/webkitSubtle/hmac-sign-verify.html

    r206882 r206883  
    1818
    1919debug("Importing a raw HMAC key from string literal...");
    20 crypto.subtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify"]).then(function(result) {
     20crypto.webkitSubtle.importKey("raw", hmacKey, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, ["sign", "verify"]).then(function(result) {
    2121    key = result;
    2222    shouldBe("key.type", "'secret'");
     
    2828
    2929    debug("Using the key to sign 'foo'...");
    30     return crypto.subtle.sign(key.algorithm, key, asciiToUint8Array('foo'));
     30    return crypto.webkitSubtle.sign(key.algorithm, key, asciiToUint8Array('foo'));
    3131}).then(function(result) {
    3232    signature = result;
     
    3434
    3535    debug("Verifying the signature...");
    36     return crypto.subtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));
     36    return crypto.webkitSubtle.verify(key.algorithm, key, result, asciiToUint8Array('foo'));
    3737}).then(function(result) {
    3838    verificationResult = result;
  • trunk/LayoutTests/crypto/webkitSubtle/jwk-export-use-values.html

    r206882 r206883  
    2121function testWithAESCBC(usages, expectedKeyOps)
    2222{
    23     return crypto.subtle.importKey("raw", aesKeyAsArrayBuffer, "AES-CBC", extractable, usages).then(function(result) {
    24         return crypto.subtle.exportKey("jwk", result);
     23    return crypto.webkitSubtle.importKey("raw", aesKeyAsArrayBuffer, "AES-CBC", extractable, usages).then(function(result) {
     24        return crypto.webkitSubtle.exportKey("jwk", result);
    2525    }).then(function(result) {
    2626        jwk = JSON.parse(bytesToASCIIString(result));
     
    3434function testWithHMAC(usages, expectedKeyOps)
    3535{
    36     return crypto.subtle.importKey("raw", hmacKeyAsArrayBuffer, {name: 'hmac', hash: {name: 'sha-256'}}, extractable, usages).then(function(result) {
    37         return crypto.subtle.exportKey("jwk", result);
     36    return crypto.webkitSubtle.importKey("raw", hmacKeyAsArrayBuffer, {name: 'hmac', hash: {name: 'sha-256'}}, extractable, usages).then(function(result) {
     37        return crypto.webkitSubtle.exportKey("jwk", result);
    3838    }).then(function(result) {
    3939        jwk = JSON.parse(bytesToASCIIString(result));
  • trunk/LayoutTests/crypto/webkitSubtle/jwk-import-use-values.html

    r206882 r206883  
    4040    }
    4141
    42     return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(aesKeyAsJSON)), "AES-CBC", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {
     42    return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(aesKeyAsJSON)), "AES-CBC", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {
    4343        key = result;
    4444        debug(JSON.stringify(jwkUsages) + ":");
     
    5858    }
    5959
    60     return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(hmacKeyAsJSON)), {name: 'hmac', hash: {name: 'sha-256'}}, extractable, ["sign", "verify"]).then(function(result) {
     60    return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(hmacKeyAsJSON)), {name: 'hmac', hash: {name: 'sha-256'}}, extractable, ["sign", "verify"]).then(function(result) {
    6161        key = result;
    6262        debug(JSON.stringify(jwkUsages) + ":");
  • trunk/LayoutTests/crypto/webkitSubtle/resources/rsa-indexeddb-non-exportable.js

    r206882 r206883  
    1616};
    1717
    18 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, false, ["sign", "verify"]).then(function(key) {
    19     var openRequest = indexedDB.open("crypto_subtle");
     18crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, false, ["sign", "verify"]).then(function(key) {
     19    var openRequest = indexedDB.open("crypto_webkitSubtle");
    2020    openRequest.onupgradeneeded = function(event) {
    2121        var objectStore = event.target.result.createObjectStore("rsa-indexeddb");
  • trunk/LayoutTests/crypto/webkitSubtle/resources/rsa-indexeddb.js

    r206882 r206883  
    1616};
    1717
    18 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, true, ["sign", "verify"]).then(function(key) {
    19     var openRequest = indexedDB.open("crypto_subtle");
     18crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, true, ["sign", "verify"]).then(function(key) {
     19    var openRequest = indexedDB.open("crypto_webkitSubtle");
    2020    openRequest.onupgradeneeded = function(event) {
    2121        var objectStore = event.target.result.createObjectStore("rsa-indexeddb");
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-export-generated-keys-expected.txt

    r206882 r206883  
    66
    77Generating RSA-PKCS1-v1.5 keyPair...
    8 PASS crypto.subtle.exportKey(null, key) threw exception TypeError: Unknown key format.
    9 PASS crypto.subtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.
    10 PASS crypto.subtle.exportKey({}, key) threw exception TypeError: Unknown key format.
    11 PASS crypto.subtle.exportKey("", key) threw exception TypeError: Unknown key format.
    12 PASS crypto.subtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.
     8PASS crypto.webkitSubtle.exportKey(null, key) threw exception TypeError: Unknown key format.
     9PASS crypto.webkitSubtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.
     10PASS crypto.webkitSubtle.exportKey({}, key) threw exception TypeError: Unknown key format.
     11PASS crypto.webkitSubtle.exportKey("", key) threw exception TypeError: Unknown key format.
     12PASS crypto.webkitSubtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.
    1313PASS key.publicKey.algorithm.hash.name is defined.
    1414PASS key.privateKey.algorithm.hash.name is defined.
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-export-generated-keys.html

    r206882 r206883  
    2424
    2525debug("\nGenerating RSA-PKCS1-v1.5 keyPair...");
    26 crypto.subtle.generateKey(algorithm, extractable, ['sign', 'verify'])
     26crypto.webkitSubtle.generateKey(algorithm, extractable, ['sign', 'verify'])
    2727.then(function(result) {
    2828    key = result;
    2929
    30     shouldThrow('crypto.subtle.exportKey(null, key)');
    31     shouldThrow('crypto.subtle.exportKey(undefined, key)');
    32     shouldThrow('crypto.subtle.exportKey({}, key)');
    33     shouldThrow('crypto.subtle.exportKey("", key)');
    34     shouldThrow('crypto.subtle.exportKey("foobar", key)');
     30    shouldThrow('crypto.webkitSubtle.exportKey(null, key)');
     31    shouldThrow('crypto.webkitSubtle.exportKey(undefined, key)');
     32    shouldThrow('crypto.webkitSubtle.exportKey({}, key)');
     33    shouldThrow('crypto.webkitSubtle.exportKey("", key)');
     34    shouldThrow('crypto.webkitSubtle.exportKey("foobar", key)');
    3535    shouldBeDefined('key.publicKey.algorithm.hash.name');
    3636    shouldBeDefined('key.privateKey.algorithm.hash.name');
    3737
    3838    debug("\nExporting public key as JWK...");
    39     return crypto.subtle.exportKey("jwk", key.publicKey);
     39    return crypto.webkitSubtle.exportKey("jwk", key.publicKey);
    4040}).then(function(result) {
    4141    exportedJWK = JSON.parse(bytesToASCIIString(result));
     
    4848
    4949    debug("\nExporting private key as JWK...");
    50     return crypto.subtle.exportKey("jwk", key.privateKey);
     50    return crypto.webkitSubtle.exportKey("jwk", key.privateKey);
    5151}).then(function(result) {
    5252    exportedJWK = JSON.parse(bytesToASCIIString(result));
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-export-key-expected.txt

    r206882 r206883  
    66
    77Importing a JWK key...
    8 PASS crypto.subtle.exportKey(null, key) threw exception TypeError: Unknown key format.
    9 PASS crypto.subtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.
    10 PASS crypto.subtle.exportKey({}, key) threw exception TypeError: Unknown key format.
    11 PASS crypto.subtle.exportKey("", key) threw exception TypeError: Unknown key format.
    12 PASS crypto.subtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.
     8PASS crypto.webkitSubtle.exportKey(null, key) threw exception TypeError: Unknown key format.
     9PASS crypto.webkitSubtle.exportKey(undefined, key) threw exception TypeError: Unknown key format.
     10PASS crypto.webkitSubtle.exportKey({}, key) threw exception TypeError: Unknown key format.
     11PASS crypto.webkitSubtle.exportKey("", key) threw exception TypeError: Unknown key format.
     12PASS crypto.webkitSubtle.exportKey("foobar", key) threw exception TypeError: Unknown key format.
    1313
    1414Exporting the key as JWK...
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-export-key.html

    r206882 r206883  
    2727
    2828debug("\nImporting a JWK key...");
    29 crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, "RSASSA-PKCS1-v1_5", extractable, ['sign', 'verify']).then(function(result) {
     29crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, "RSASSA-PKCS1-v1_5", extractable, ['sign', 'verify']).then(function(result) {
    3030    key = result;
    3131
    32     shouldThrow('crypto.subtle.exportKey(null, key)');
    33     shouldThrow('crypto.subtle.exportKey(undefined, key)');
    34     shouldThrow('crypto.subtle.exportKey({}, key)');
    35     shouldThrow('crypto.subtle.exportKey("", key)');
    36     shouldThrow('crypto.subtle.exportKey("foobar", key)');
     32    shouldThrow('crypto.webkitSubtle.exportKey(null, key)');
     33    shouldThrow('crypto.webkitSubtle.exportKey(undefined, key)');
     34    shouldThrow('crypto.webkitSubtle.exportKey({}, key)');
     35    shouldThrow('crypto.webkitSubtle.exportKey("", key)');
     36    shouldThrow('crypto.webkitSubtle.exportKey("foobar", key)');
    3737
    3838    debug("\nExporting the key as JWK...");
    39     return crypto.subtle.exportKey("jwk", key);
     39    return crypto.webkitSubtle.exportKey("jwk", key);
    4040}).then(function(result) {
    4141    exportedJWK = JSON.parse(bytesToASCIIString(result));
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-export-private-key.html

    r206882 r206883  
    3434
    3535debug("\nImporting a JWK key...");
    36 crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, "RSASSA-PKCS1-v1_5", extractable, ['sign', 'verify']).then(function(result) {
     36crypto.webkitSubtle.importKey("jwk", jwkKeyAsArrayBuffer, "RSASSA-PKCS1-v1_5", extractable, ['sign', 'verify']).then(function(result) {
    3737    key = result;
    3838
    3939    debug("\nExporting the key as JWK...");
    40     return crypto.subtle.exportKey("jwk", key);
     40    return crypto.webkitSubtle.exportKey("jwk", key);
    4141}).then(function(result) {
    4242    exportedJWK = JSON.parse(bytesToASCIIString(result));
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key-expected.txt

    r206882 r206883  
    55
    66Generating a key pair...
    7 PASS keyPair.toString() is '[object KeyPair]'
     7PASS keyPair.toString() is '[object CryptoKeyPair]'
    88PASS keyPair.publicKey.type is 'public'
    99PASS keyPair.publicKey.extractable is true
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html

    r206882 r206883  
    2323
    2424debug("Generating a key pair...");
    25 crypto.subtle.generateKey(algorithmKeyGen, nonExtractable, []).then(function(result) {
     25crypto.webkitSubtle.generateKey(algorithmKeyGen, nonExtractable, []).then(function(result) {
    2626    keyPair = result;
    27     shouldBe("keyPair.toString()", "'[object KeyPair]'");
     27    shouldBe("keyPair.toString()", "'[object CryptoKeyPair]'");
    2828    shouldBe("keyPair.publicKey.type", "'public'");
    2929    shouldBe("keyPair.publicKey.extractable", "true");
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-key-manipulation-expected.txt

    r206882 r206883  
    55
    66Generating a key pair...
    7 PASS keyPair.toString() is '[object KeyPair]'
     7PASS keyPair.toString() is '[object CryptoKeyPair]'
    88PASS keyPair.publicKey.type is 'public'
    99PASS keyPair.publicKey.algorithm.name is 'RSA-OAEP'
     
    1818
    1919Testing that the keys can't be used with different algorithms...
    20 PASS crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.privateKey, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
    21 PASS crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.publicKey, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
     20PASS crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.privateKey, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
     21PASS crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.publicKey, hexStringToUint8Array("00")) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
    2222
    2323Trying to export keys to raw...
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-key-manipulation.html

    r206882 r206883  
    2323
    2424debug("Generating a key pair...");
    25 crypto.subtle.generateKey(algorithmKeyGen, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {
     25crypto.webkitSubtle.generateKey(algorithmKeyGen, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]).then(function(result) {
    2626    keyPair = result;
    27     shouldBe("keyPair.toString()", "'[object KeyPair]'");
     27    shouldBe("keyPair.toString()", "'[object CryptoKeyPair]'");
    2828    shouldBe("keyPair.publicKey.type", "'public'");
    2929    shouldBe("keyPair.publicKey.algorithm.name", "'RSA-OAEP'");
     
    3939    debug("\nTesting that the keys can't be used with different algorithms...");
    4040    iv = hexStringToUint8Array("000102030405060708090a0b0c0d0e0f");
    41     shouldThrow('crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.privateKey, hexStringToUint8Array("00"))');
    42     shouldThrow('crypto.subtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.publicKey, hexStringToUint8Array("00"))');
     41    shouldThrow('crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.privateKey, hexStringToUint8Array("00"))');
     42    shouldThrow('crypto.webkitSubtle.encrypt({name: "aes-cbc", iv: iv}, keyPair.publicKey, hexStringToUint8Array("00"))');
    4343
    4444    debug("\nTrying to export keys to raw...");
    45     return crypto.subtle.exportKey('raw', keyPair.publicKey);
     45    return crypto.webkitSubtle.exportKey('raw', keyPair.publicKey);
    4646}).then(undefined, function(result) {
    4747    testPassed("Promise rejected for exporting public key");
    48     return crypto.subtle.exportKey('raw', keyPair.privateKey);
     48    return crypto.webkitSubtle.exportKey('raw', keyPair.privateKey);
    4949}).then(undefined, function(result) {
    5050    testPassed("Promise rejected for exporting private key");
    5151
    5252    debug("\nExporting public key to JWK...");
    53     return crypto.subtle.exportKey("jwk", keyPair.publicKey);
     53    return crypto.webkitSubtle.exportKey("jwk", keyPair.publicKey);
    5454}).then(function(result) {
    5555    jwkPublicKeyArray = result;
     
    6363
    6464    debug("\nImporting it back...");
    65     return crypto.subtle.importKey("jwk", jwkPublicKeyArray, null, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);
     65    return crypto.webkitSubtle.importKey("jwk", jwkPublicKeyArray, null, extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"]);
    6666}).then(function(result) {
    6767    exportedPublicKey = result;
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-plaintext-length.html

    r206882 r206883  
    3838
    3939debug("Importing RSA keys...");
    40 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["encrypt", "decrypt"]).then(function(result) {
     40crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["encrypt", "decrypt"]).then(function(result) {
    4141    publicKey = result;
    42     return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["encrypt", "decrypt"]);
     42    return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["encrypt", "decrypt"]);
    4343}).then(function(result) {
    4444    privateKey = result;
    4545
    4646    debug("Encrypting a 214 byte buffer with RSA-OAEP SHA-1, 2048 bit key...");
    47     return crypto.subtle.encrypt({name: "RSA-OAEP", hash: "SHA-1"}, publicKey, new Uint8Array(214));
     47    return crypto.webkitSubtle.encrypt({name: "RSA-OAEP", hash: "SHA-1"}, publicKey, new Uint8Array(214));
    4848}).then(function(result) {
    4949    testPassed("Succeeded");
    5050    debug("Encrypting a 215 byte buffer...");
    51     return crypto.subtle.encrypt({name: "RSA-OAEP", hash: "SHA-1"}, publicKey, new Uint8Array(215));
     51    return crypto.webkitSubtle.encrypt({name: "RSA-OAEP", hash: "SHA-1"}, publicKey, new Uint8Array(215));
    5252}).then(function(result) {
    5353    testFailed("Succeeded");
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html

    r206882 r206883  
    3838
    3939debug("Importing RSA keys...");
    40 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]).then(function(result) {
     40crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]).then(function(result) {
    4141    publicKey = result;
    42     return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]);
     42    return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]);
    4343}).then(function(result) {
    4444    privateKey = result;
     
    4646    debug("Importing an AES key...");
    4747    aesKeyData = hexStringToUint8Array("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4");
    48     return crypto.subtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])
     48    return crypto.webkitSubtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])
    4949}).then(function(result) {
    5050    aesKey = result;
    5151    debug("Wrapping it...");
    5252
    53     return crypto.subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);
     53    return crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);
    5454}).then(function(result) {
    5555    wrappedKey = result;
     
    5757
    5858    debug("Unwrapping it...");
    59     return crypto.subtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);
     59    return crypto.webkitSubtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);
    6060}).then(function(result) {
    6161    unwrappedKey = result;
     
    6868
    6969    debug("Exporting it...");
    70     return crypto.subtle.exportKey("raw", unwrappedKey);
     70    return crypto.webkitSubtle.exportKey("raw", unwrappedKey);
    7171}).then(function(result) {
    7272    unwrappedKeyData = result;
     
    7474
    7575    debug("\nWrapping the same key as JWK...");
    76     return crypto.subtle.wrapKey("jwk", aesKey, publicKey, wrapAlgorithm);
     76    return crypto.webkitSubtle.wrapKey("jwk", aesKey, publicKey, wrapAlgorithm);
    7777}).then(function(result) {
    7878    wrappedKey = result;
     
    8080
    8181    debug("Unwrapping it...");
    82     return crypto.subtle.unwrapKey("jwk", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);
     82    return crypto.webkitSubtle.unwrapKey("jwk", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);
    8383}).then(function(result) {
    8484    unwrappedKey = result;
     
    9191
    9292    debug("Exporting it...");
    93     return crypto.subtle.exportKey("raw", unwrappedKey);
     93    return crypto.webkitSubtle.exportKey("raw", unwrappedKey);
    9494}).then(function(result) {
    9595    unwrappedKeyData = result;
  • trunk/LayoutTests/crypto/webkitSubtle/rsa-postMessage.html

    r206882 r206883  
    3636    shouldBe("key.usages", '["sign", "verify"]');
    3737
    38     crypto.subtle.exportKey("jwk", key).then(function(result) {
     38    crypto.webkitSubtle.exportKey("jwk", key).then(function(result) {
    3939        exportedJWK = JSON.parse(bytesToASCIIString(result));
    4040        debug("\nExported back to JWK:");
     
    5858}, false);
    5959
    60 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, true, ["sign", "verify"]).then(function(result) {
     60crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, true, ["sign", "verify"]).then(function(result) {
    6161    postMessage(result, "*");
    6262});
  • trunk/LayoutTests/crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html

    r206882 r206883  
    3131
    3232debug("Importing an RSA key...");
    33 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["decrypt"]).then(function(result) {
     33crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["decrypt"]).then(function(result) {
    3434    privateKey = result;
    3535
    3636    debug("Decrypting...");
    3737    encryptedMessage = hexStringToUint8Array("6042e745589af03af87520f93c45d8c35985ada1161a37d822e9f9460fc75fcf0179d8491b8f5d1e4de8ceb31e07c4865c5a3efdbbb69a8803b89ee65a430a5809c707569150b580bb686a94c5541c46adcd827960ce244ff688387d1616e85b4d1780c6483606cf924b54f080cf4154e66829bf6e532481048ec41fadc07d755bb34bb28145219cb30d47d0d618709180e90303ff9ef09018bed3da75761da794811f96bc9e8d7c4ba1b5946bda0bd313faec4c993ed2748eed8cce4bdb520ba7db165f9fe56aa8454d6ff33874feeebf29de2df5b7f00aa1d9fb073fc4067b58dc50624e127f711dde2cc2cfdab4919ccf28c83660dfc227b0f500ec1f904f");
    38     return crypto.subtle.decrypt("RSAES-PKCS1-v1_5", privateKey, encryptedMessage);
     38    return crypto.webkitSubtle.decrypt("RSAES-PKCS1-v1_5", privateKey, encryptedMessage);
    3939}).then(function(result) {
    4040    message = result;
  • trunk/LayoutTests/crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html

    r206882 r206883  
    3838
    3939debug("Importing RSA keys...");
    40 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]).then(function(result) {
     40crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]).then(function(result) {
    4141    publicKey = result;
    42     return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]);
     42    return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["wrapKey", "unwrapKey"]);
    4343}).then(function(result) {
    4444    privateKey = result;
     
    4646    debug("Importing an AES key...");
    4747    aesKeyData = hexStringToUint8Array("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4");
    48     return crypto.subtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])
     48    return crypto.webkitSubtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])
    4949}).then(function(result) {
    5050    aesKey = result;
    5151    debug("Wrapping it...");
    5252
    53     return crypto.subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);
     53    return crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);
    5454}).then(function(result) {
    5555    wrappedKey = result;
     
    5757
    5858    debug("Unwrapping it...");
    59     return crypto.subtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);
     59    return crypto.webkitSubtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);
    6060}).then(function(result) {
    6161    unwrappedKey = result;
     
    6868
    6969    debug("Exporting it...");
    70     return crypto.subtle.exportKey("raw", unwrappedKey);
     70    return crypto.webkitSubtle.exportKey("raw", unwrappedKey);
    7171}).then(function(result) {
    7272    unwrappedKeyData = result;
     
    7474
    7575    debug("\nWrapping the same key as JWK...");
    76     return crypto.subtle.wrapKey("jwk", aesKey, publicKey, wrapAlgorithm);
     76    return crypto.webkitSubtle.wrapKey("jwk", aesKey, publicKey, wrapAlgorithm);
    7777}).then(function(result) {
    7878    wrappedKey = result;
     
    8080
    8181    debug("Unwrapping it...");
    82     return crypto.subtle.unwrapKey("jwk", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);
     82    return crypto.webkitSubtle.unwrapKey("jwk", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]);
    8383}).then(function(result) {
    8484    unwrappedKey = result;
     
    9191
    9292    debug("Exporting it...");
    93     return crypto.subtle.exportKey("raw", unwrappedKey);
     93    return crypto.webkitSubtle.exportKey("raw", unwrappedKey);
    9494}).then(function(result) {
    9595    unwrappedKeyData = result;
  • trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-expected.txt

    r206882 r206883  
    55
    66Generating a key pair...
    7 PASS keyPair.toString() is '[object KeyPair]'
     7PASS keyPair.toString() is '[object CryptoKeyPair]'
    88PASS keyPair.publicKey.type is 'public'
    99PASS keyPair.publicKey.algorithm.name is 'RSASSA-PKCS1-v1_5'
  • trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt

    r206882 r206883  
    55
    66Generating a key pair...
    7 PASS keyPair.toString() is '[object KeyPair]'
     7PASS keyPair.toString() is '[object CryptoKeyPair]'
    88PASS keyPair.publicKey.type is 'public'
    99PASS keyPair.publicKey.algorithm.name is 'RSASSA-PKCS1-v1_5'
  • trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html

    r206882 r206883  
    2323
    2424debug("Generating a key pair...");
    25 crypto.subtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) {
     25crypto.webkitSubtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) {
    2626    keyPair = result;
    27     shouldBe("keyPair.toString()", "'[object KeyPair]'");
     27    shouldBe("keyPair.toString()", "'[object CryptoKeyPair]'");
    2828    shouldBe("keyPair.publicKey.type", "'public'");
    2929    shouldBe("keyPair.publicKey.algorithm.name", "'RSASSA-PKCS1-v1_5'");
  • trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html

    r206882 r206883  
    2323
    2424debug("Generating a key pair...");
    25 crypto.subtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) {
     25crypto.webkitSubtle.generateKey(algorithmKeyGen, extractable, ["sign", "verify"]).then(function(result) {
    2626    keyPair = result;
    27     shouldBe("keyPair.toString()", "'[object KeyPair]'");
     27    shouldBe("keyPair.toString()", "'[object CryptoKeyPair]'");
    2828    shouldBe("keyPair.publicKey.type", "'public'");
    2929    shouldBe("keyPair.publicKey.algorithm.name", "'RSASSA-PKCS1-v1_5'");
  • trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html

    r206882 r206883  
    3636};
    3737
    38 shouldThrow('crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"])');
    39 shouldThrow('crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"])');
     38shouldThrow('crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"])');
     39shouldThrow('crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"])');
    4040</script>
    4141
  • trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html

    r206882 r206883  
    3737
    3838debug("Importing a public key...");
    39 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) {
     39crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) {
    4040    publicKey = result;
    4141    shouldBe("publicKey.toString()", "'[object CryptoKey]'");
     
    4747    shouldBe("publicKey.algorithm.hash.name", "'SHA-256'");
    4848    debug("\nImporting a private key...");
    49     return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]);
     49    return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]);
    5050}).then(function(result) {
    5151    privateKey = result;
  • trunk/LayoutTests/crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html

    r206882 r206883  
    3939
    4040debug("Importing a public key...");
    41 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) {
     41crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["sign", "verify"]).then(function(result) {
    4242    publicKey = result;
    4343    debug("\nImporting a private key...");
    44     return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]);
     44    return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["sign", "verify"]);
    4545}).then(function(result) {
    4646    privateKey = result;
    4747    debug("\nSigning some text...");
    48     return crypto.subtle.sign({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, privateKey, data);
     48    return crypto.webkitSubtle.sign({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, privateKey, data);
    4949}).then(function(result) {
    5050    signature = result;
     
    5252
    5353    debug("\nVerifying the signature...");
    54     return crypto.subtle.verify({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, publicKey, signature, data);
     54    return crypto.webkitSubtle.verify({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, publicKey, signature, data);
    5555}).then(function(result) {
    5656    verificationResult = result;
    5757    shouldBe("verificationResult", "true");
    5858    debug("\nVerifying a bad signature...");
    59     return crypto.subtle.verify({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, publicKey, new Uint8Array(256), data);
     59    return crypto.webkitSubtle.verify({ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, publicKey, new Uint8Array(256), data);
    6060}).then(function(result) {
    6161    verificationResult = result;
  • trunk/LayoutTests/crypto/webkitSubtle/sha-1-expected.txt

    r206882 r206883  
    1 Test crypto.subtle.digest.
     1Test crypto.webkitSubtle.digest.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    1010SHA1 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    1111PASS bytesToHexString(new Uint8Array(digest)) is '2c7e7c384f7829694282b1e3a6216def8082d055'
    12 PASS crypto.subtle.generateKey('sha-1') threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
     12PASS crypto.webkitSubtle.generateKey('sha-1') threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
    1313PASS successfullyParsed is true
    1414
  • trunk/LayoutTests/crypto/webkitSubtle/sha-1.html

    r206882 r206883  
    1010
    1111<script>
    12 description("Test crypto.subtle.digest.");
     12description("Test crypto.webkitSubtle.digest.");
    1313
    1414jsTestIsAsync = true;
     
    1616Promise.resolve(null).then(function() {
    1717    debug("SHA1 of []");
    18     return crypto.subtle.digest('sha-1', new Uint8Array([]));
     18    return crypto.webkitSubtle.digest('sha-1', new Uint8Array([]));
    1919}).then(function(result) {
    2020    digest = result;
     
    2222
    2323    debug("SHA1 of [0x0]")
    24     return crypto.subtle.digest({name: 'sha-1'}, new Uint8Array([0]));
     24    return crypto.webkitSubtle.digest({name: 'sha-1'}, new Uint8Array([0]));
    2525}).then(function(result) {
    2626    digest = result;
     
    2929    debug("SHA1 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]");
    3030    var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
    31     return crypto.subtle.digest({name: 'sha-1'}, data);
     31    return crypto.webkitSubtle.digest({name: 'sha-1'}, data);
    3232}).then(function(result) {
    3333    digest = result;
     
    3535
    3636    // All SHA-1 can do is digest.
    37     shouldThrow("crypto.subtle.generateKey('sha-1')");
     37    shouldThrow("crypto.webkitSubtle.generateKey('sha-1')");
    3838    finishJSTest();
    3939});
  • trunk/LayoutTests/crypto/webkitSubtle/sha-224-expected.txt

    r206882 r206883  
    1 Test crypto.subtle.digest.
     1Test crypto.webkitSubtle.digest.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
  • trunk/LayoutTests/crypto/webkitSubtle/sha-224.html

    r206882 r206883  
    1010
    1111<script>
    12 description("Test crypto.subtle.digest.");
     12description("Test crypto.webkitSubtle.digest.");
    1313
    1414jsTestIsAsync = true;
     
    1616Promise.resolve(null).then(function() {
    1717    debug("SHA224 of []");
    18     return crypto.subtle.digest('sha-224', new Uint8Array([]));
     18    return crypto.webkitSubtle.digest('sha-224', new Uint8Array([]));
    1919}).then(function(result) {
    2020    digest = result;
     
    2222
    2323    debug("SHA224 of [0x0]")
    24     return crypto.subtle.digest({name: 'sha-224'}, new Uint8Array([0]));
     24    return crypto.webkitSubtle.digest({name: 'sha-224'}, new Uint8Array([0]));
    2525}).then(function(result) {
    2626    digest = result;
     
    2929    debug("SHA224 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]");
    3030    var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
    31     return crypto.subtle.digest({name: 'sha-224'}, data);
     31    return crypto.webkitSubtle.digest({name: 'sha-224'}, data);
    3232}).then(function(result) {
    3333    digest = result;
  • trunk/LayoutTests/crypto/webkitSubtle/sha-256-expected.txt

    r206882 r206883  
    1 Test crypto.subtle.digest.
     1Test crypto.webkitSubtle.digest.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
  • trunk/LayoutTests/crypto/webkitSubtle/sha-256.html

    r206882 r206883  
    1010
    1111<script>
    12 description("Test crypto.subtle.digest.");
     12description("Test crypto.webkitSubtle.digest.");
    1313
    1414jsTestIsAsync = true;
     
    1616Promise.resolve(null).then(function() {
    1717    debug("SHA256 of []");
    18     return crypto.subtle.digest('sha-256', new Uint8Array([]));
     18    return crypto.webkitSubtle.digest('sha-256', new Uint8Array([]));
    1919}).then(function(result) {
    2020    digest = result;
     
    2222
    2323    debug("SHA256 of [0x0]")
    24     return crypto.subtle.digest({name: 'sha-256'}, new Uint8Array([0]));
     24    return crypto.webkitSubtle.digest({name: 'sha-256'}, new Uint8Array([0]));
    2525}).then(function(result) {
    2626    digest = result;
     
    2929    debug("SHA256 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]");
    3030    var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
    31     return crypto.subtle.digest({name: 'sha-256'}, data);
     31    return crypto.webkitSubtle.digest({name: 'sha-256'}, data);
    3232}).then(function(result) {
    3333    digest = result;
  • trunk/LayoutTests/crypto/webkitSubtle/sha-384-expected.txt

    r206882 r206883  
    1 Test crypto.subtle.digest.
     1Test crypto.webkitSubtle.digest.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
  • trunk/LayoutTests/crypto/webkitSubtle/sha-384.html

    r206882 r206883  
    1010
    1111<script>
    12 description("Test crypto.subtle.digest.");
     12description("Test crypto.webkitSubtle.digest.");
    1313
    1414jsTestIsAsync = true;
     
    1616Promise.resolve(null).then(function() {
    1717    debug("SHA384 of []");
    18     return crypto.subtle.digest('sha-384', new Uint8Array([]));
     18    return crypto.webkitSubtle.digest('sha-384', new Uint8Array([]));
    1919}).then(function(result) {
    2020    digest = result;
     
    2222
    2323    debug("SHA384 of [0x0]")
    24     return crypto.subtle.digest({name: 'sha-384'}, new Uint8Array([0]));
     24    return crypto.webkitSubtle.digest({name: 'sha-384'}, new Uint8Array([0]));
    2525}).then(function(result) {
    2626    digest = result;
     
    2929    debug("SHA384 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]");
    3030    var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
    31     return crypto.subtle.digest({name: 'sha-384'}, data);
     31    return crypto.webkitSubtle.digest({name: 'sha-384'}, data);
    3232}).then(function(result) {
    3333    digest = result;
  • trunk/LayoutTests/crypto/webkitSubtle/sha-512-expected.txt

    r206882 r206883  
    1 Test crypto.subtle.digest.
     1Test crypto.webkitSubtle.digest.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
  • trunk/LayoutTests/crypto/webkitSubtle/sha-512.html

    r206882 r206883  
    1010
    1111<script>
    12 description("Test crypto.subtle.digest.");
     12description("Test crypto.webkitSubtle.digest.");
    1313
    1414jsTestIsAsync = true;
     
    1616Promise.resolve(null).then(function() {
    1717    debug("SHA512 of []");
    18     return crypto.subtle.digest('sha-512', new Uint8Array([]));
     18    return crypto.webkitSubtle.digest('sha-512', new Uint8Array([]));
    1919}).then(function(result) {
    2020    digest = result;
     
    2222
    2323    debug("SHA512 of [0x0]")
    24     return crypto.subtle.digest({name: 'sha-512'}, new Uint8Array([0]));
     24    return crypto.webkitSubtle.digest({name: 'sha-512'}, new Uint8Array([0]));
    2525}).then(function(result) {
    2626    digest = result;
     
    2929    debug("SHA512 of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]");
    3030    var data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
    31     return crypto.subtle.digest({name: 'sha-512'}, data);
     31    return crypto.webkitSubtle.digest({name: 'sha-512'}, data);
    3232}).then(function(result) {
    3333    digest = result;
  • trunk/LayoutTests/crypto/webkitSubtle/unimplemented-unwrap-crash.html

    r206882 r206883  
    1515jsTestIsAsync = true;
    1616
    17 crypto.subtle.generateKey({name: "AES-KW", length: 256}, false, ["wrapKey"]).then(function(wrappingKey) {
    18     return crypto.subtle.generateKey({name: "HMAC", hash: {name: "SHA-256"}}, true, ["sign", "verify"]).then(function(aesKey) {
    19         return crypto.subtle.wrapKey("raw", aesKey, wrappingKey, {name: "AES-KW"});
     17crypto.webkitSubtle.generateKey({name: "AES-KW", length: 256}, false, ["wrapKey"]).then(function(wrappingKey) {
     18    return crypto.webkitSubtle.generateKey({name: "HMAC", hash: {name: "SHA-256"}}, true, ["sign", "verify"]).then(function(aesKey) {
     19        return crypto.webkitSubtle.wrapKey("raw", aesKey, wrappingKey, {name: "AES-KW"});
    2020    });
    2121}).then(finishJSTest, finishJSTest); // OK if the browser does not crash.
  • trunk/LayoutTests/crypto/webkitSubtle/unwrapKey-check-usage-expected.txt

    r206882 r206883  
    99Wrapping it...
    1010Unwrapping it...
    11 PASS crypto.subtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
     11PASS crypto.webkitSubtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"]) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
    1212PASS successfullyParsed is true
    1313
  • trunk/LayoutTests/crypto/webkitSubtle/unwrapKey-check-usage.html

    r206882 r206883  
    3838
    3939debug("Importing RSA keys...");
    40 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey"]).then(function(result) {
     40crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["wrapKey"]).then(function(result) {
    4141    publicKey = result;
    42     return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["encrypt", "decrypt", "wrapKey"]);
     42    return crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), null, extractable, ["encrypt", "decrypt", "wrapKey"]);
    4343}).then(function(result) {
    4444    privateKey = result;
     
    4646    debug("Importing an AES key...");
    4747    aesKeyData = hexStringToUint8Array("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4");
    48     return crypto.subtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])
     48    return crypto.webkitSubtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])
    4949}).then(function(result) {
    5050    aesKey = result;
    5151
    5252    debug("Wrapping it...");
    53     return crypto.subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);
     53    return crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm);
    5454}).then(function(result) {
    5555    wrappedKey = result;
     
    5757    debug("Unwrapping it...");
    5858    // privateKey lacks unwrapKey usage.
    59     shouldThrow('crypto.subtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"])');
     59    shouldThrow('crypto.webkitSubtle.unwrapKey("raw", wrappedKey, privateKey, wrapAlgorithm, "aes-cbc", extractable, ["encrypt", "decrypt"])');
    6060
    6161    finishJSTest();
  • trunk/LayoutTests/crypto/webkitSubtle/wrapKey-check-usage-expected.txt

    r206882 r206883  
    88Importing an AES key...
    99Wrapping it...
    10 PASS crypto.subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
     10PASS crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
    1111PASS successfullyParsed is true
    1212
  • trunk/LayoutTests/crypto/webkitSubtle/wrapKey-check-usage.html

    r206882 r206883  
    2626
    2727debug("Importing an RSA key...");
    28 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["encrypt", "decrypt", "unwrapKey"]).then(function(result) {
     28crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), null, extractable, ["encrypt", "decrypt", "unwrapKey"]).then(function(result) {
    2929    publicKey = result;
    3030
    3131    debug("Importing an AES key...");
    3232    aesKeyData = hexStringToUint8Array("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4");
    33     return crypto.subtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])
     33    return crypto.webkitSubtle.importKey("raw", aesKeyData, "aes-cbc", extractable, ["encrypt", "decrypt", "wrapKey", "unwrapKey"])
    3434}).then(function(result) {
    3535    aesKey = result;
     
    3737    debug("Wrapping it...");
    3838    // publicKey lacks wrapKey usage.
    39     shouldThrow('crypto.subtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm)');
     39    shouldThrow('crypto.webkitSubtle.wrapKey("raw", aesKey, publicKey, wrapAlgorithm)');
    4040    finishJSTest();
    4141});
  • trunk/LayoutTests/crypto/workers/subtle/aes-postMessage-worker.html

    r206882 r206883  
    33<head>
    44<meta charset="utf-8">
    5 <script src="../../resources/js-test-pre.js"></script>
    6 <script src="../resources/common.js"></script>
     5<script src="../../../resources/js-test-pre.js"></script>
     6<script src="../../resources/common.js"></script>
    77</head>
    88<body>
     
    1313jsTestIsAsync = true;
    1414
    15 crypto.subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(localKey) {
     15crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(localKey) {
    1616    var worker = new Worker("resources/aes-postMessage-worker.js");
    1717    worker.onmessage = function(evt) {
     
    3232});
    3333</script>
    34 <script src="../../resources/js-test-post.js"></script>
     34<script src="../../../resources/js-test-post.js"></script>
    3535</body>
    3636</html>
  • trunk/LayoutTests/crypto/workers/subtle/hmac-postMessage-worker.html

    r206882 r206883  
    33<head>
    44<meta charset="utf-8">
    5 <script src="../../resources/js-test-pre.js"></script>
    6 <script src="../resources/common.js"></script>
     5<script src="../../../resources/js-test-pre.js"></script>
     6<script src="../../resources/common.js"></script>
    77</head>
    88<body>
     
    1313jsTestIsAsync = true;
    1414
    15 crypto.subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(localKey) {
     15crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(localKey) {
    1616    var worker = new Worker("resources/hmac-postMessage-worker.js");
    1717    worker.onmessage = function(evt) {
     
    3333});
    3434</script>
    35 <script src="../../resources/js-test-post.js"></script>
     35<script src="../../../resources/js-test-post.js"></script>
    3636</body>
    3737</html>
  • trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker.html

    r206882 r206883  
    33<head>
    44<meta charset="utf-8">
    5 <script src="../../resources/js-test-pre.js"></script>
    6 <script src="../resources/common.js"></script>
     5<script src="../../../resources/js-test-pre.js"></script>
     6<script src="../../resources/common.js"></script>
    77</head>
    88<body>
     
    7373}
    7474
    75 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
     75crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
    7676    worker.postMessage({ publicKey: localPublicKey });
    7777});
    78 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
     78crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
    7979    worker.postMessage({ privateKey: localPrivateKey });
    8080});
    8181</script>
    82 <script src="../../resources/js-test-post.js"></script>
     82<script src="../../../resources/js-test-post.js"></script>
    8383</body>
    8484</html>
  • trunk/LayoutTests/crypto/workers/subtle/multiple-postMessage-worker.html

    r206882 r206883  
    33<head>
    44<meta charset="utf-8">
    5 <script src="../../resources/js-test-pre.js"></script>
    6 <script src="../resources/common.js"></script>
     5<script src="../../../resources/js-test-pre.js"></script>
     6<script src="../../resources/common.js"></script>
    77</head>
    88<body>
     
    3939var usages = ["encrypt", "decrypt"]
    4040for (i = 0; i < 10; i++)
    41     crypto.subtle.importKey(keyFormat, keyData, aesKeyGenParams, true, usages).then(function(localKey) {
     41    crypto.webkitSubtle.importKey(keyFormat, keyData, aesKeyGenParams, true, usages).then(function(localKey) {
    4242        worker.postMessage(localKey);
    4343    });
    4444</script>
    45 <script src="../../resources/js-test-post.js"></script>
     45<script src="../../../resources/js-test-post.js"></script>
    4646</body>
    4747</html>
  • trunk/LayoutTests/crypto/workers/subtle/resources/hrsa-postMessage-worker.js

    r206882 r206883  
    1 importScripts("../../resources/common.js");
     1importScripts("../../../resources/common.js");
    22
    33onmessage = function(evt)
  • trunk/LayoutTests/crypto/workers/subtle/resources/rsa-postMessage-worker.js

    r206882 r206883  
    1 importScripts("../../resources/common.js");
     1importScripts("../../../resources/common.js");
    22
    33onmessage = function(evt)
  • trunk/LayoutTests/crypto/workers/subtle/rsa-postMessage-worker.html

    r206882 r206883  
    33<head>
    44<meta charset="utf-8">
    5 <script src="../../resources/js-test-pre.js"></script>
    6 <script src="../resources/common.js"></script>
     5<script src="../../../resources/js-test-pre.js"></script>
     6<script src="../../resources/common.js"></script>
    77</head>
    88<body>
     
    7373}
    7474
    75 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
     75crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
    7676    worker.postMessage({ publicKey: localPublicKey });
    7777});
    78 crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
     78crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
    7979    worker.postMessage({ privateKey: localPrivateKey });
    8080});
    8181</script>
    82 <script src="../../resources/js-test-post.js"></script>
     82<script src="../../../resources/js-test-post.js"></script>
    8383</body>
    8484</html>
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r206882 r206883  
     12016-10-06  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Add a dummy SubtleCrypto interface
     4        https://bugs.webkit.org/show_bug.cgi?id=162992
     5        <rdar://problem/28643573>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * WebCryptoAPI/digest/test_digest-expected.txt:
     10        * WebCryptoAPI/idlharness-expected.txt:
     11
    1122016-10-06  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/WebCryptoAPI/digest/test_digest-expected.txt

    r203201 r206883  
    22
    33
    4 FAIL SHA-1 with empty source data undefined is not an object (evaluating 'subtle.digest')
    5 FAIL sha-1 with empty source data undefined is not an object (evaluating 'subtle.digest')
    6 FAIL Sha-1 with empty source data undefined is not an object (evaluating 'subtle.digest')
    7 FAIL SHA-1 with empty source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    8 FAIL SHA-256 with empty source data undefined is not an object (evaluating 'subtle.digest')
    9 FAIL sha-256 with empty source data undefined is not an object (evaluating 'subtle.digest')
    10 FAIL Sha-256 with empty source data undefined is not an object (evaluating 'subtle.digest')
    11 FAIL SHA-256 with empty source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    12 FAIL SHA-384 with empty source data undefined is not an object (evaluating 'subtle.digest')
    13 FAIL sha-384 with empty source data undefined is not an object (evaluating 'subtle.digest')
    14 FAIL Sha-384 with empty source data undefined is not an object (evaluating 'subtle.digest')
    15 FAIL SHA-384 with empty source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    16 FAIL SHA-512 with empty source data undefined is not an object (evaluating 'subtle.digest')
    17 FAIL sha-512 with empty source data undefined is not an object (evaluating 'subtle.digest')
    18 FAIL Sha-512 with empty source data undefined is not an object (evaluating 'subtle.digest')
    19 FAIL SHA-512 with empty source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    20 FAIL SHA-1 with short source data undefined is not an object (evaluating 'subtle.digest')
    21 FAIL sha-1 with short source data undefined is not an object (evaluating 'subtle.digest')
    22 FAIL Sha-1 with short source data undefined is not an object (evaluating 'subtle.digest')
    23 FAIL SHA-1 with short source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    24 FAIL SHA-256 with short source data undefined is not an object (evaluating 'subtle.digest')
    25 FAIL sha-256 with short source data undefined is not an object (evaluating 'subtle.digest')
    26 FAIL Sha-256 with short source data undefined is not an object (evaluating 'subtle.digest')
    27 FAIL SHA-256 with short source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    28 FAIL SHA-384 with short source data undefined is not an object (evaluating 'subtle.digest')
    29 FAIL sha-384 with short source data undefined is not an object (evaluating 'subtle.digest')
    30 FAIL Sha-384 with short source data undefined is not an object (evaluating 'subtle.digest')
    31 FAIL SHA-384 with short source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    32 FAIL SHA-512 with short source data undefined is not an object (evaluating 'subtle.digest')
    33 FAIL sha-512 with short source data undefined is not an object (evaluating 'subtle.digest')
    34 FAIL Sha-512 with short source data undefined is not an object (evaluating 'subtle.digest')
    35 FAIL SHA-512 with short source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    36 FAIL SHA-1 with medium source data undefined is not an object (evaluating 'subtle.digest')
    37 FAIL sha-1 with medium source data undefined is not an object (evaluating 'subtle.digest')
    38 FAIL Sha-1 with medium source data undefined is not an object (evaluating 'subtle.digest')
    39 FAIL SHA-1 with medium source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    40 FAIL SHA-256 with medium source data undefined is not an object (evaluating 'subtle.digest')
    41 FAIL sha-256 with medium source data undefined is not an object (evaluating 'subtle.digest')
    42 FAIL Sha-256 with medium source data undefined is not an object (evaluating 'subtle.digest')
    43 FAIL SHA-256 with medium source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    44 FAIL SHA-384 with medium source data undefined is not an object (evaluating 'subtle.digest')
    45 FAIL sha-384 with medium source data undefined is not an object (evaluating 'subtle.digest')
    46 FAIL Sha-384 with medium source data undefined is not an object (evaluating 'subtle.digest')
    47 FAIL SHA-384 with medium source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    48 FAIL SHA-512 with medium source data undefined is not an object (evaluating 'subtle.digest')
    49 FAIL sha-512 with medium source data undefined is not an object (evaluating 'subtle.digest')
    50 FAIL Sha-512 with medium source data undefined is not an object (evaluating 'subtle.digest')
    51 FAIL SHA-512 with medium source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    52 FAIL SHA-1 with long source data undefined is not an object (evaluating 'subtle.digest')
    53 FAIL sha-1 with long source data undefined is not an object (evaluating 'subtle.digest')
    54 FAIL Sha-1 with long source data undefined is not an object (evaluating 'subtle.digest')
    55 FAIL SHA-1 with long source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    56 FAIL SHA-256 with long source data undefined is not an object (evaluating 'subtle.digest')
    57 FAIL sha-256 with long source data undefined is not an object (evaluating 'subtle.digest')
    58 FAIL Sha-256 with long source data undefined is not an object (evaluating 'subtle.digest')
    59 FAIL SHA-256 with long source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    60 FAIL SHA-384 with long source data undefined is not an object (evaluating 'subtle.digest')
    61 FAIL sha-384 with long source data undefined is not an object (evaluating 'subtle.digest')
    62 FAIL Sha-384 with long source data undefined is not an object (evaluating 'subtle.digest')
    63 FAIL SHA-384 with long source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    64 FAIL SHA-512 with long source data undefined is not an object (evaluating 'subtle.digest')
    65 FAIL sha-512 with long source data undefined is not an object (evaluating 'subtle.digest')
    66 FAIL Sha-512 with long source data undefined is not an object (evaluating 'subtle.digest')
    67 FAIL SHA-512 with long source data and altered buffer after call undefined is not an object (evaluating 'subtle.digest')
    68 FAIL AES-GCM with empty undefined is not an object (evaluating 'subtle.digest')
    69 FAIL RSA-OAEP with empty undefined is not an object (evaluating 'subtle.digest')
    70 FAIL PBKDF2 with empty undefined is not an object (evaluating 'subtle.digest')
    71 FAIL AES-KW with empty undefined is not an object (evaluating 'subtle.digest')
    72 FAIL AES-GCM with short undefined is not an object (evaluating 'subtle.digest')
    73 FAIL RSA-OAEP with short undefined is not an object (evaluating 'subtle.digest')
    74 FAIL PBKDF2 with short undefined is not an object (evaluating 'subtle.digest')
    75 FAIL AES-KW with short undefined is not an object (evaluating 'subtle.digest')
    76 FAIL AES-GCM with medium undefined is not an object (evaluating 'subtle.digest')
    77 FAIL RSA-OAEP with medium undefined is not an object (evaluating 'subtle.digest')
    78 FAIL PBKDF2 with medium undefined is not an object (evaluating 'subtle.digest')
    79 FAIL AES-KW with medium undefined is not an object (evaluating 'subtle.digest')
    80 FAIL AES-GCM with long undefined is not an object (evaluating 'subtle.digest')
    81 FAIL RSA-OAEP with long undefined is not an object (evaluating 'subtle.digest')
    82 FAIL PBKDF2 with long undefined is not an object (evaluating 'subtle.digest')
    83 FAIL AES-KW with long undefined is not an object (evaluating 'subtle.digest')
     4FAIL SHA-1 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     5FAIL sha-1 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     6FAIL Sha-1 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     7FAIL SHA-1 with empty source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     8FAIL SHA-256 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     9FAIL sha-256 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     10FAIL Sha-256 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     11FAIL SHA-256 with empty source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     12FAIL SHA-384 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     13FAIL sha-384 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     14FAIL Sha-384 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     15FAIL SHA-384 with empty source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     16FAIL SHA-512 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     17FAIL sha-512 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     18FAIL Sha-512 with empty source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     19FAIL SHA-512 with empty source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     20FAIL SHA-1 with short source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     21FAIL sha-1 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     22FAIL Sha-1 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     23FAIL SHA-1 with short source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     24FAIL SHA-256 with short source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     25FAIL sha-256 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     26FAIL Sha-256 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     27FAIL SHA-256 with short source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     28FAIL SHA-384 with short source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     29FAIL sha-384 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     30FAIL Sha-384 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     31FAIL SHA-384 with short source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     32FAIL SHA-512 with short source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     33FAIL sha-512 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     34FAIL Sha-512 with short source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     35FAIL SHA-512 with short source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     36FAIL SHA-1 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     37FAIL sha-1 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     38FAIL Sha-1 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     39FAIL SHA-1 with medium source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     40FAIL SHA-256 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     41FAIL sha-256 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     42FAIL Sha-256 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     43FAIL SHA-256 with medium source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     44FAIL SHA-384 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     45FAIL sha-384 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     46FAIL Sha-384 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     47FAIL SHA-384 with medium source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     48FAIL SHA-512 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     49FAIL sha-512 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     50FAIL Sha-512 with medium source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     51FAIL SHA-512 with medium source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     52FAIL SHA-1 with long source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     53FAIL sha-1 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     54FAIL Sha-1 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     55FAIL SHA-1 with long source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     56FAIL SHA-256 with long source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     57FAIL sha-256 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     58FAIL Sha-256 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     59FAIL SHA-256 with long source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     60FAIL SHA-384 with long source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     61FAIL sha-384 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     62FAIL Sha-384 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     63FAIL SHA-384 with long source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     64FAIL SHA-512 with long source data subtle.digest is not a function. (In 'subtle.digest({name: upCase}, sourceData[size])', 'subtle.digest' is undefined)
     65FAIL sha-512 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     66FAIL Sha-512 with long source data subtle.digest is not a function. (In 'subtle.digest({name: mixedCase}, sourceData[size])', 'subtle.digest' is undefined)
     67FAIL SHA-512 with long source data and altered buffer after call subtle.digest is not a function. (In 'subtle.digest({name: upCase}, copiedBuffer)', 'subtle.digest' is undefined)
     68FAIL AES-GCM with empty subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     69FAIL RSA-OAEP with empty subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     70FAIL PBKDF2 with empty subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     71FAIL AES-KW with empty subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     72FAIL AES-GCM with short subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     73FAIL RSA-OAEP with short subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     74FAIL PBKDF2 with short subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     75FAIL AES-KW with short subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     76FAIL AES-GCM with medium subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     77FAIL RSA-OAEP with medium subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     78FAIL PBKDF2 with medium subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     79FAIL AES-KW with medium subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     80FAIL AES-GCM with long subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     81FAIL RSA-OAEP with long subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     82FAIL PBKDF2 with long subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
     83FAIL AES-KW with long subtle.digest is not a function. (In 'subtle.digest({name: badName}, sourceData[size])', 'subtle.digest' is undefined)
    8484
  • trunk/LayoutTests/imported/w3c/WebCryptoAPI/idlharness-expected.txt

    r205755 r206883  
    99PASS Crypto interface: existence and properties of interface prototype object
    1010PASS Crypto interface: existence and properties of interface prototype object's "constructor" property
    11 FAIL Crypto interface: attribute subtle assert_true: The prototype object must have a property "subtle" expected true got false
     11PASS Crypto interface: attribute subtle
    1212PASS Crypto interface: operation getRandomValues(ArrayBufferView)
    1313PASS Crypto must be primary interface of crypto
    1414PASS Stringification of crypto
    15 FAIL Crypto interface: crypto must inherit property "subtle" with the proper type (0) assert_inherits: property "subtle" not found in prototype chain
     15PASS Crypto interface: crypto must inherit property "subtle" with the proper type (0)
    1616PASS Crypto interface: crypto must inherit property "getRandomValues" with the proper type (1)
    1717PASS Crypto interface: calling getRandomValues(ArrayBufferView) on crypto with too few arguments must throw TypeError
     
    4242FAIL SubtleCrypto interface: operation wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) assert_own_property: self does not have own property "SubtleCrypto" expected property "SubtleCrypto" missing
    4343FAIL SubtleCrypto interface: operation unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object]) assert_own_property: self does not have own property "SubtleCrypto" expected property "SubtleCrypto" missing
    44 FAIL SubtleCrypto must be primary interface of crypto.subtle assert_equals: wrong typeof object expected "object" but got "undefined"
    45 FAIL Stringification of crypto.subtle assert_equals: wrong typeof object expected "object" but got "undefined"
    46 FAIL SubtleCrypto interface: crypto.subtle must inherit property "encrypt" with the proper type (0) assert_equals: wrong typeof object expected "object" but got "undefined"
    47 FAIL SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    48 FAIL SubtleCrypto interface: crypto.subtle must inherit property "decrypt" with the proper type (1) assert_equals: wrong typeof object expected "object" but got "undefined"
    49 FAIL SubtleCrypto interface: calling decrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    50 FAIL SubtleCrypto interface: crypto.subtle must inherit property "sign" with the proper type (2) assert_equals: wrong typeof object expected "object" but got "undefined"
    51 FAIL SubtleCrypto interface: calling sign(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    52 FAIL SubtleCrypto interface: crypto.subtle must inherit property "verify" with the proper type (3) assert_equals: wrong typeof object expected "object" but got "undefined"
    53 FAIL SubtleCrypto interface: calling verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    54 FAIL SubtleCrypto interface: crypto.subtle must inherit property "digest" with the proper type (4) assert_equals: wrong typeof object expected "object" but got "undefined"
    55 FAIL SubtleCrypto interface: calling digest(AlgorithmIdentifier,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    56 FAIL SubtleCrypto interface: crypto.subtle must inherit property "generateKey" with the proper type (5) assert_equals: wrong typeof object expected "object" but got "undefined"
    57 FAIL SubtleCrypto interface: calling generateKey(AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    58 FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveKey" with the proper type (6) assert_equals: wrong typeof object expected "object" but got "undefined"
    59 FAIL SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    60 FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveBits" with the proper type (7) assert_equals: wrong typeof object expected "object" but got "undefined"
    61 FAIL SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    62 FAIL SubtleCrypto interface: crypto.subtle must inherit property "importKey" with the proper type (8) assert_equals: wrong typeof object expected "object" but got "undefined"
    63 FAIL SubtleCrypto interface: calling importKey(KeyFormat,[object Object],[object Object],AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    64 FAIL SubtleCrypto interface: crypto.subtle must inherit property "exportKey" with the proper type (9) assert_equals: wrong typeof object expected "object" but got "undefined"
    65 FAIL SubtleCrypto interface: calling exportKey(KeyFormat,CryptoKey) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    66 FAIL SubtleCrypto interface: crypto.subtle must inherit property "wrapKey" with the proper type (10) assert_equals: wrong typeof object expected "object" but got "undefined"
    67 FAIL SubtleCrypto interface: calling wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
    68 FAIL SubtleCrypto interface: crypto.subtle must inherit property "unwrapKey" with the proper type (11) assert_equals: wrong typeof object expected "object" but got "undefined"
    69 FAIL SubtleCrypto interface: calling unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
     44FAIL SubtleCrypto must be primary interface of crypto.subtle assert_own_property: self does not have own property "SubtleCrypto" expected property "SubtleCrypto" missing
     45PASS Stringification of crypto.subtle
     46FAIL SubtleCrypto interface: crypto.subtle must inherit property "encrypt" with the proper type (0) assert_inherits: property "encrypt" not found in prototype chain
     47FAIL SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "encrypt" not found in prototype chain
     48FAIL SubtleCrypto interface: crypto.subtle must inherit property "decrypt" with the proper type (1) assert_inherits: property "decrypt" not found in prototype chain
     49FAIL SubtleCrypto interface: calling decrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "decrypt" not found in prototype chain
     50FAIL SubtleCrypto interface: crypto.subtle must inherit property "sign" with the proper type (2) assert_inherits: property "sign" not found in prototype chain
     51FAIL SubtleCrypto interface: calling sign(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "sign" not found in prototype chain
     52FAIL SubtleCrypto interface: crypto.subtle must inherit property "verify" with the proper type (3) assert_inherits: property "verify" not found in prototype chain
     53FAIL SubtleCrypto interface: calling verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "verify" not found in prototype chain
     54FAIL SubtleCrypto interface: crypto.subtle must inherit property "digest" with the proper type (4) assert_inherits: property "digest" not found in prototype chain
     55FAIL SubtleCrypto interface: calling digest(AlgorithmIdentifier,BufferSource) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "digest" not found in prototype chain
     56FAIL SubtleCrypto interface: crypto.subtle must inherit property "generateKey" with the proper type (5) assert_inherits: property "generateKey" not found in prototype chain
     57FAIL SubtleCrypto interface: calling generateKey(AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "generateKey" not found in prototype chain
     58FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveKey" with the proper type (6) assert_inherits: property "deriveKey" not found in prototype chain
     59FAIL SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "deriveKey" not found in prototype chain
     60FAIL SubtleCrypto interface: crypto.subtle must inherit property "deriveBits" with the proper type (7) assert_inherits: property "deriveBits" not found in prototype chain
     61FAIL SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "deriveBits" not found in prototype chain
     62FAIL SubtleCrypto interface: crypto.subtle must inherit property "importKey" with the proper type (8) assert_inherits: property "importKey" not found in prototype chain
     63FAIL SubtleCrypto interface: calling importKey(KeyFormat,[object Object],[object Object],AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "importKey" not found in prototype chain
     64FAIL SubtleCrypto interface: crypto.subtle must inherit property "exportKey" with the proper type (9) assert_inherits: property "exportKey" not found in prototype chain
     65FAIL SubtleCrypto interface: calling exportKey(KeyFormat,CryptoKey) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "exportKey" not found in prototype chain
     66FAIL SubtleCrypto interface: crypto.subtle must inherit property "wrapKey" with the proper type (10) assert_inherits: property "wrapKey" not found in prototype chain
     67FAIL SubtleCrypto interface: calling wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "wrapKey" not found in prototype chain
     68FAIL SubtleCrypto interface: crypto.subtle must inherit property "unwrapKey" with the proper type (11) assert_inherits: property "unwrapKey" not found in prototype chain
     69FAIL SubtleCrypto interface: calling unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object]) on crypto.subtle with too few arguments must throw TypeError assert_inherits: property "unwrapKey" not found in prototype chain
    7070
  • trunk/LayoutTests/platform/efl/TestExpectations

    r206840 r206883  
    376376http/tests/security/cross-origin-worker-indexeddb.html [ Skip ]
    377377
    378 webkit.org/b/87661 crypto/subtle/rsa-indexeddb.html [ Skip ]
     378webkit.org/b/87661 crypto/webkitSubtle/rsa-indexeddb.html [ Skip ]
    379379storage/indexeddb/database-odd-names.html [ Skip ]
    380380
     
    19581958webkit.org/b/133122 crypto/subtle [ Skip ]
    19591959webkit.org/b/133122 crypto/webkitSubtle [ Skip ]
    1960 webkit.org/b/133319 crypto/subtle/sha-1.html [ Pass ]
    1961 webkit.org/b/133319 crypto/subtle/sha-224.html [ Pass ]
    1962 webkit.org/b/133319 crypto/subtle/sha-256.html [ Pass ]
    1963 webkit.org/b/133319 crypto/subtle/sha-384.html [ Pass ]
    1964 webkit.org/b/133319 crypto/subtle/sha-512.html [ Pass ]
    1965 webkit.org/b/133320 crypto/subtle/hmac-check-algorithm.html [ Pass ]
    1966 webkit.org/b/133320 crypto/subtle/hmac-export-key.html [ Pass ]
    1967 webkit.org/b/133320 crypto/subtle/hmac-generate-key.html [ Pass ]
    1968 webkit.org/b/133320 crypto/subtle/hmac-import-jwk.html [ Pass ]
    1969 webkit.org/b/133320 crypto/subtle/hmac-sign-verify-empty-key.html [ Pass ]
    1970 webkit.org/b/133320 crypto/subtle/hmac-sign-verify.html [ Pass ]
     1960webkit.org/b/133319 crypto/webkitSubtle/sha-1.html [ Pass ]
     1961webkit.org/b/133319 crypto/webkitSubtle/sha-224.html [ Pass ]
     1962webkit.org/b/133319 crypto/webkitSubtle/sha-256.html [ Pass ]
     1963webkit.org/b/133319 crypto/webkitSubtle/sha-384.html [ Pass ]
     1964webkit.org/b/133319 crypto/webkitSubtle/sha-512.html [ Pass ]
     1965webkit.org/b/133320 crypto/webkitSubtle/hmac-check-algorithm.html [ Pass ]
     1966webkit.org/b/133320 crypto/webkitSubtle/hmac-export-key.html [ Pass ]
     1967webkit.org/b/133320 crypto/webkitSubtle/hmac-generate-key.html [ Pass ]
     1968webkit.org/b/133320 crypto/webkitSubtle/hmac-import-jwk.html [ Pass ]
     1969webkit.org/b/133320 crypto/webkitSubtle/hmac-sign-verify-empty-key.html [ Pass ]
     1970webkit.org/b/133320 crypto/webkitSubtle/hmac-sign-verify.html [ Pass ]
    19711971
    19721972# Missing EFL's accessibility functions
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r206261 r206883  
    378378webkit.org/b/133122 crypto/subtle [ Skip ]
    379379webkit.org/b/133122 crypto/webkitSubtle [ Skip ]
    380 webkit.org/b/133319 crypto/subtle/sha-1.html [ Pass ]
    381 webkit.org/b/133319 crypto/subtle/sha-224.html [ Pass ]
    382 webkit.org/b/133319 crypto/subtle/sha-256.html [ Pass ]
    383 webkit.org/b/133319 crypto/subtle/sha-384.html [ Pass ]
    384 webkit.org/b/133319 crypto/subtle/sha-512.html [ Pass ]
    385 webkit.org/b/133320 crypto/subtle/hmac-check-algorithm.html [ Pass ]
    386 webkit.org/b/133320 crypto/subtle/hmac-export-key.html [ Pass ]
    387 webkit.org/b/133320 crypto/subtle/hmac-generate-key.html [ Pass ]
    388 webkit.org/b/133320 crypto/subtle/hmac-import-jwk.html [ Pass ]
    389 webkit.org/b/133320 crypto/subtle/hmac-sign-verify-empty-key.html [ Pass ]
    390 webkit.org/b/133320 crypto/subtle/hmac-sign-verify.html [ Pass ]
     380webkit.org/b/133319 crypto/webkitSubtle/sha-1.html [ Pass ]
     381webkit.org/b/133319 crypto/webkitSubtle/sha-224.html [ Pass ]
     382webkit.org/b/133319 crypto/webkitSubtle/sha-256.html [ Pass ]
     383webkit.org/b/133319 crypto/webkitSubtle/sha-384.html [ Pass ]
     384webkit.org/b/133319 crypto/webkitSubtle/sha-512.html [ Pass ]
     385webkit.org/b/133320 crypto/webkitSubtle/hmac-check-algorithm.html [ Pass ]
     386webkit.org/b/133320 crypto/webkitSubtle/hmac-export-key.html [ Pass ]
     387webkit.org/b/133320 crypto/webkitSubtle/hmac-generate-key.html [ Pass ]
     388webkit.org/b/133320 crypto/webkitSubtle/hmac-import-jwk.html [ Pass ]
     389webkit.org/b/133320 crypto/webkitSubtle/hmac-sign-verify-empty-key.html [ Pass ]
     390webkit.org/b/133320 crypto/webkitSubtle/hmac-sign-verify.html [ Pass ]
    391391
    392392# GTK does not implement setAutomaticLinkDetectionEnabled
     
    22622262webkit.org/b/107825 media/video-controls-fullscreen-volume.html [ Failure ]
    22632263
    2264 webkit.org/b/107194 crypto/subtle/rsa-indexeddb.html [ Skip ]
     2264webkit.org/b/107194 crypto/webkitSubtle/rsa-indexeddb.html [ Skip ]
    22652265
    22662266# Test marked in TestExpectations as failing on non-retina displays, passing on GTK port
  • trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations

    r206659 r206883  
    997997imported/w3c/IndexedDB-private-browsing
    998998imported/w3c/web-platform-tests/IndexedDB
    999 crypto/subtle/rsa-indexeddb-non-exportable-private.html
    1000 crypto/subtle/rsa-indexeddb-non-exportable.html
    1001 crypto/subtle/rsa-indexeddb-private.html
    1002 crypto/subtle/rsa-indexeddb.html
     999crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html
     1000crypto/webkitSubtle/rsa-indexeddb-non-exportable.html
     1001crypto/webkitSubtle/rsa-indexeddb-private.html
     1002crypto/webkitSubtle/rsa-indexeddb.html
    10031003fast/history/page-cache-indexed-closed-db.html
    10041004fast/history/page-cache-indexed-opened-db.html
  • trunk/LayoutTests/platform/win/TestExpectations

    r206659 r206883  
    258258http/tests/security/cross-origin-worker-indexeddb.html [ Skip ]
    259259http/tests/security/no-indexeddb-from-sandbox.html [ Skip ]
    260 crypto/subtle/rsa-indexeddb-non-exportable-private.html [ Skip ]
    261 crypto/subtle/rsa-indexeddb-non-exportable.html [ Skip ]
    262 crypto/subtle/rsa-indexeddb-private.html [ Skip ]
    263 crypto/subtle/rsa-indexeddb.html [ Skip ]
     260crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html [ Skip ]
     261crypto/webkitSubtle/rsa-indexeddb-non-exportable.html [ Skip ]
     262crypto/webkitSubtle/rsa-indexeddb-private.html [ Skip ]
     263crypto/webkitSubtle/rsa-indexeddb.html [ Skip ]
    264264fast/history/page-cache-indexed-closed-db.html [ Skip ]
    265265fast/history/page-cache-indexed-opened-db.html [ Skip ]
  • trunk/Source/WebCore/CMakeLists.txt

    r206877 r206883  
    328328    crypto/CryptoKey.idl
    329329    crypto/CryptoKeyPair.idl
     330    crypto/SubtleCrypto.idl
    330331    crypto/WebKitSubtleCrypto.idl
    331332
  • trunk/Source/WebCore/ChangeLog

    r206881 r206883  
     12016-10-06  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Add a dummy SubtleCrypto interface
     4        https://bugs.webkit.org/show_bug.cgi?id=162992
     5        <rdar://problem/28643573>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Add a dummy SubtleCrypto interface and rename KeyPair to CryptoKeyPair.
     10
     11        Tests: crypto/subtle/gc-2.html
     12               crypto/subtle/gc-3.html
     13               crypto/subtle/gc.html
     14               crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html
     15               crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html
     16               crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html
     17               crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html
     18               crypto/webkitSubtle/aes-cbc-generate-key.html
     19               crypto/webkitSubtle/aes-cbc-import-jwk.html
     20               crypto/webkitSubtle/aes-cbc-invalid-length.html
     21               crypto/webkitSubtle/aes-cbc-unwrap-failure.html
     22               crypto/webkitSubtle/aes-cbc-unwrap-rsa.html
     23               crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html
     24               crypto/webkitSubtle/aes-cbc-wrap-rsa.html
     25               crypto/webkitSubtle/aes-cbc-wrong-key-class.html
     26               crypto/webkitSubtle/aes-export-key.html
     27               crypto/webkitSubtle/aes-kw-key-manipulation.html
     28               crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html
     29               crypto/webkitSubtle/aes-postMessage.html
     30               crypto/webkitSubtle/argument-conversion.html
     31               crypto/webkitSubtle/array-buffer-view-offset.html
     32               crypto/webkitSubtle/crypto-key-algorithm-gc.html
     33               crypto/webkitSubtle/crypto-key-usages-gc.html
     34               crypto/webkitSubtle/hmac-check-algorithm.html
     35               crypto/webkitSubtle/hmac-export-key.html
     36               crypto/webkitSubtle/hmac-generate-key.html
     37               crypto/webkitSubtle/hmac-import-jwk.html
     38               crypto/webkitSubtle/hmac-postMessage.html
     39               crypto/webkitSubtle/hmac-sign-verify-empty-key.html
     40               crypto/webkitSubtle/hmac-sign-verify.html
     41               crypto/webkitSubtle/import-jwk.html
     42               crypto/webkitSubtle/jwk-export-use-values.html
     43               crypto/webkitSubtle/jwk-import-use-values.html
     44               crypto/webkitSubtle/rsa-export-generated-keys.html
     45               crypto/webkitSubtle/rsa-export-key.html
     46               crypto/webkitSubtle/rsa-export-private-key.html
     47               crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html
     48               crypto/webkitSubtle/rsa-indexeddb-non-exportable.html
     49               crypto/webkitSubtle/rsa-indexeddb-private.html
     50               crypto/webkitSubtle/rsa-indexeddb.html
     51               crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html
     52               crypto/webkitSubtle/rsa-oaep-key-manipulation.html
     53               crypto/webkitSubtle/rsa-oaep-plaintext-length.html
     54               crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html
     55               crypto/webkitSubtle/rsa-postMessage.html
     56               crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html
     57               crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html
     58               crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html
     59               crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html
     60               crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html
     61               crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html
     62               crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html
     63               crypto/webkitSubtle/sha-1.html
     64               crypto/webkitSubtle/sha-224.html
     65               crypto/webkitSubtle/sha-256.html
     66               crypto/webkitSubtle/sha-384.html
     67               crypto/webkitSubtle/sha-512.html
     68               crypto/webkitSubtle/unimplemented-unwrap-crash.html
     69               crypto/webkitSubtle/unwrapKey-check-usage.html
     70               crypto/webkitSubtle/wrapKey-check-usage.html
     71               crypto/workers/subtle/aes-postMessage-worker.html
     72               crypto/workers/subtle/gc-worker.html
     73               crypto/workers/subtle/hmac-postMessage-worker.html
     74               crypto/workers/subtle/hrsa-postMessage-worker.html
     75               crypto/workers/subtle/multiple-postMessage-worker.html
     76               crypto/workers/subtle/rsa-postMessage-worker.html
     77
     78        * CMakeLists.txt:
     79        * DerivedSources.cpp:
     80        * DerivedSources.make:
     81        * PlatformEfl.cmake:
     82        * PlatformGTK.cmake:
     83        * PlatformMac.cmake:
     84        * WebCore.xcodeproj/project.pbxproj:
     85        * crypto/CryptoKeyPair.idl:
     86        * crypto/SubtleCrypto.cpp:
     87        (WebCore::SubtleCrypto::SubtleCrypto):
     88        * crypto/SubtleCrypto.h:
     89        (WebCore::SubtleCrypto::create):
     90        * crypto/SubtleCrypto.idl: Added.
     91        * page/Crypto.cpp:
     92        (WebCore::Crypto::Crypto):
     93        (WebCore::Crypto::subtle):
     94        * page/Crypto.h:
     95        * page/Crypto.idl:
     96
    1972016-10-06  Anders Carlsson  <andersca@apple.com>
    298
  • trunk/Source/WebCore/DerivedSources.cpp

    r206877 r206883  
    600600#include "JSStyleSheet.cpp"
    601601#include "JSStyleSheetList.cpp"
     602#include "JSSubtleCrypto.cpp"
    602603#include "JSText.cpp"
    603604#include "JSTextEvent.cpp"
  • trunk/Source/WebCore/DerivedSources.make

    r206877 r206883  
    239239    $(WebCore)/crypto/CryptoKey.idl \
    240240    $(WebCore)/crypto/CryptoKeyPair.idl \
     241    $(WebCore)/crypto/SubtleCrypto.idl \
    241242    $(WebCore)/crypto/WebKitSubtleCrypto.idl \
    242243    $(WebCore)/css/CSSCharsetRule.idl \
  • trunk/Source/WebCore/PlatformEfl.cmake

    r206779 r206883  
    408408        crypto/CryptoKey.cpp
    409409        crypto/CryptoKeyPair.cpp
     410        crypto/SubtleCrypto.cpp
    410411        crypto/WebKitSubtleCrypto.cpp
    411412
  • trunk/Source/WebCore/PlatformGTK.cmake

    r206779 r206883  
    401401        crypto/CryptoKey.cpp
    402402        crypto/CryptoKeyPair.cpp
     403        crypto/SubtleCrypto.cpp
    403404        crypto/WebKitSubtleCrypto.cpp
    404405
  • trunk/Source/WebCore/PlatformMac.cmake

    r206779 r206883  
    181181    crypto/CryptoKey.cpp
    182182    crypto/CryptoKeyPair.cpp
     183    crypto/SubtleCrypto.cpp
    183184    crypto/WebKitSubtleCrypto.cpp
    184185
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r206877 r206883  
    22832283                570A99DA1D417408004EC630 /* JSWebKitSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FF8F62180745D800132674 /* JSWebKitSubtleCrypto.cpp */; };
    22842284                570A99DB1D41A2F3004EC630 /* JSWebKitSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = E1FF8F63180745D800132674 /* JSWebKitSubtleCrypto.h */; };
     2285                571F21891DA57C54005C9EFD /* JSSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */; };
     2286                571F218B1DA57C7B005C9EFD /* JSSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */; };
    22852287                572A7F211C6E5719009C6149 /* SimulatedClick.h in Headers */ = {isa = PBXBuildFile; fileRef = 572A7F201C6E5719009C6149 /* SimulatedClick.h */; };
    22862288                572A7F231C6E5A66009C6149 /* SimulatedClick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */; };
     2289                5778BD821DA4806C009E3009 /* SubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 5778BD811DA4802C009E3009 /* SubtleCrypto.h */; };
     2290                5778BD841DA4817B009E3009 /* SubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5778BD831DA4817B009E3009 /* SubtleCrypto.cpp */; };
    22872291                57EF5E601D20C83900171E60 /* TextCodecReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 57EF5E5F1D20C83900171E60 /* TextCodecReplacement.h */; };
    22882292                57EF5E621D20D28700171E60 /* TextCodecReplacement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57EF5E611D20D28700171E60 /* TextCodecReplacement.cpp */; };
     
    93249328                5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitSubtleCrypto.h; sourceTree = "<group>"; };
    93259329                5709E8CC1D413CE3003244AC /* WebKitSubtleCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitSubtleCrypto.idl; sourceTree = "<group>"; };
     9330                571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSubtleCrypto.h; sourceTree = "<group>"; };
     9331                571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSubtleCrypto.cpp; sourceTree = "<group>"; };
    93269332                572A7F201C6E5719009C6149 /* SimulatedClick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimulatedClick.h; sourceTree = "<group>"; };
    93279333                572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimulatedClick.cpp; sourceTree = "<group>"; };
    93289334                574D42791D594FF6002CF50E /* GlobalCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GlobalCrypto.idl; sourceTree = "<group>"; };
     9335                5778BD801DA4733E009E3009 /* SubtleCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SubtleCrypto.idl; sourceTree = "<group>"; };
     9336                5778BD811DA4802C009E3009 /* SubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubtleCrypto.h; sourceTree = "<group>"; };
     9337                5778BD831DA4817B009E3009 /* SubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubtleCrypto.cpp; sourceTree = "<group>"; };
    93299338                57EF5E5F1D20C83900171E60 /* TextCodecReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCodecReplacement.h; sourceTree = "<group>"; };
    93309339                57EF5E611D20D28700171E60 /* TextCodecReplacement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextCodecReplacement.cpp; sourceTree = "<group>"; };
     
    2224922258                                E172AF6F180F289500FBADB9 /* CryptoKeyUsage.h */,
    2225022259                                E18DF33418AAF12C00773E59 /* SerializedCryptoKeyWrap.h */,
     22260                                5778BD811DA4802C009E3009 /* SubtleCrypto.h */,
     22261                                5778BD831DA4817B009E3009 /* SubtleCrypto.cpp */,
     22262                                5778BD801DA4733E009E3009 /* SubtleCrypto.idl */,
    2225122263                                5709E8CA1D413CE3003244AC /* WebKitSubtleCrypto.cpp */,
    2225222264                                5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */,
     
    2226322275                                E1F80B8B183172B5007885C3 /* JSCryptoKeyPair.cpp */,
    2226422276                                E1F80B8C183172B5007885C3 /* JSCryptoKeyPair.h */,
     22277                                571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */,
     22278                                571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */,
    2226522279                                E1FF8F62180745D800132674 /* JSWebKitSubtleCrypto.cpp */,
    2226622280                                E1FF8F63180745D800132674 /* JSWebKitSubtleCrypto.h */,
     
    2450324517                                416E6FE81BBD12DF000A6023 /* FetchInternalsBuiltins.h in Headers */,
    2450424518                                41AD753A1CEF6BD100A31486 /* FetchOptions.h in Headers */,
     24519                                5778BD821DA4806C009E3009 /* SubtleCrypto.h in Headers */,
    2450524520                                84730D8B1248F0B300D3A9C9 /* FETile.h in Headers */,
    2450624521                                84730D8D1248F0B300D3A9C9 /* FETurbulence.h in Headers */,
     
    2517125186                                9752D38E1413104B003305BD /* JSHTMLSpanElement.h in Headers */,
    2517225187                                A80E7B0E0A19D606007FB8C5 /* JSHTMLStyleElement.h in Headers */,
     25188                                571F21891DA57C54005C9EFD /* JSSubtleCrypto.h in Headers */,
    2517325189                                BCA169A30BFD55B40019CA76 /* JSHTMLTableCaptionElement.h in Headers */,
    2517425190                                BC06EDE40BFD6D0D00856E9D /* JSHTMLTableCellElement.h in Headers */,
     
    2755127567                        buildActionMask = 2147483647;
    2755227568                        files = (
     27569                                571F218B1DA57C7B005C9EFD /* JSSubtleCrypto.cpp in Sources */,
    2755327570                                41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */,
    2755427571                                37F57AB91A50726900876F98 /* AccessibilityARIAGrid.cpp in Sources */,
     
    3030030317                                26FAE4CE1852E3A5004C8C46 /* SynchronousResourceHandleCFURLConnectionDelegate.cpp in Sources */,
    3030130318                                E45390AE0EAFF4B5003695C8 /* SystemMemoryIOS.cpp in Sources */,
     30319                                5778BD841DA4817B009E3009 /* SubtleCrypto.cpp in Sources */,
    3030230320                                CDA07FBD18E0A16A004699FA /* SystemSleepListener.cpp in Sources */,
    3030330321                                CDA07FC118E0A22B004699FA /* SystemSleepListenerMac.mm in Sources */,
  • trunk/Source/WebCore/crypto/CryptoKeyPair.idl

    r189873 r206883  
    2727    Conditional=SUBTLE_CRYPTO,
    2828    ImplementationLacksVTable,
    29     InterfaceName=KeyPair,
    3029    JSCustomMarkFunction,
    3130    NoInterfaceObject
  • trunk/Source/WebCore/crypto/SubtleCrypto.cpp

    r206882 r206883  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 [
    27     Conditional=SUBTLE_CRYPTO,
    28     ImplementationLacksVTable,
    29     InterfaceName=KeyPair,
    30     JSCustomMarkFunction,
    31     NoInterfaceObject
    32 ] interface CryptoKeyPair {
    33     readonly attribute CryptoKey publicKey;
    34     readonly attribute CryptoKey privateKey;
    35 };
     26#include "config.h"
     27#include "SubtleCrypto.h"
     28
     29#if ENABLE(SUBTLE_CRYPTO)
     30
     31namespace WebCore {
     32
     33SubtleCrypto::SubtleCrypto(ScriptExecutionContext& context)
     34    : ContextDestructionObserver(&context)
     35{
     36}
     37
     38}
     39
     40#endif
  • trunk/Source/WebCore/crypto/SubtleCrypto.h

    r206882 r206883  
    11/*
    2  * Copyright (C) 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 [
    27     Conditional=SUBTLE_CRYPTO,
    28     ImplementationLacksVTable,
    29     InterfaceName=KeyPair,
    30     JSCustomMarkFunction,
    31     NoInterfaceObject
    32 ] interface CryptoKeyPair {
    33     readonly attribute CryptoKey publicKey;
    34     readonly attribute CryptoKey privateKey;
     26#pragma once
     27
     28#include "ContextDestructionObserver.h"
     29#include <wtf/Ref.h>
     30#include <wtf/RefCounted.h>
     31
     32#if ENABLE(SUBTLE_CRYPTO)
     33
     34namespace WebCore {
     35
     36class SubtleCrypto : public ContextDestructionObserver, public RefCounted<SubtleCrypto> {
     37public:
     38    static Ref<SubtleCrypto> create(ScriptExecutionContext& context) { return adoptRef(*new SubtleCrypto(context)); }
     39
     40private:
     41    SubtleCrypto(ScriptExecutionContext&);
    3542};
     43
     44}
     45
     46#endif
  • trunk/Source/WebCore/page/Crypto.cpp

    r204481 r206883  
    3434#include "Document.h"
    3535#include "ExceptionCode.h"
     36#include "SubtleCrypto.h"
    3637#include "WebKitSubtleCrypto.h"
    3738#include <runtime/ArrayBufferView.h>
     
    4243Crypto::Crypto(ScriptExecutionContext& context)
    4344    : ContextDestructionObserver(&context)
     45#if ENABLE(SUBTLE_CRYPTO)
     46    , m_subtle(SubtleCrypto::create(context))
     47#endif
    4448{
    4549}
     
    6367
    6468#if ENABLE(SUBTLE_CRYPTO)
     69SubtleCrypto& Crypto::subtle()
     70{
     71    return m_subtle;
     72}
     73
    6574WebKitSubtleCrypto* Crypto::webkitSubtle(ExceptionCode& ec)
    6675{
  • trunk/Source/WebCore/page/Crypto.h

    r204481 r206883  
    4646class Document;
    4747class WebKitSubtleCrypto;
     48class SubtleCrypto;
    4849
    4950class Crypto : public ContextDestructionObserver, public RefCounted<Crypto> {
     
    5556
    5657#if ENABLE(SUBTLE_CRYPTO)
     58    SubtleCrypto& subtle();
     59
     60    // Will be deprecated.
    5761    WebKitSubtleCrypto* webkitSubtle(ExceptionCode&);
    5862#endif
     
    6266
    6367#if ENABLE(SUBTLE_CRYPTO)
     68    Ref<SubtleCrypto> m_subtle;
     69
     70    // Will be deprecated.
    6471    RefPtr<WebKitSubtleCrypto> m_webkitSubtle;
    6572#endif
  • trunk/Source/WebCore/page/Crypto.idl

    r206723 r206883  
    3232    GenerateIsReachable=ImplScriptExecutionContext,
    3333] interface Crypto {
     34    [Conditional=SUBTLE_CRYPTO] readonly attribute SubtleCrypto subtle;
    3435    [Custom, MayThrowLegacyException] ArrayBufferView getRandomValues(ArrayBufferView array);
    3536
     37    // Will be deprecated.
    3638    [Conditional=SUBTLE_CRYPTO, GetterMayThrowLegacyException] readonly attribute WebKitSubtleCrypto webkitSubtle;
    3739};
Note: See TracChangeset for help on using the changeset viewer.