<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[206627] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206627">206627</a></dd>
<dt>Author</dt> <dd>jiewen_tan@apple.com</dd>
<dt>Date</dt> <dd>2016-09-29 17:47:21 -0700 (Thu, 29 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Expose CryptoKey to web workers
https://bugs.webkit.org/show_bug.cgi?id=162640
&lt;rdar://problem/28182204&gt;

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: crypto/workers/aes-postMessage-worker.html
       crypto/workers/hmac-postMessage-worker.html
       crypto/workers/hrsa-postMessage-worker.html
       crypto/workers/multiple-postMessage-worker.html
       crypto/workers/rsa-postMessage-worker.html

* crypto/CryptoKey.idl:
* crypto/SerializedCryptoKeyWrap.h:
* crypto/mac/SerializedCryptoKeyWrapMac.mm:
(WebCore::deleteDefaultWebCryptoMasterKey):
Add a way to delete the default web crypto master key such that we can test
these APIs and cleanup.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::wrapCryptoKey):
(WebCore::WorkerGlobalScope::unwrapCryptoKey):
* workers/WorkerGlobalScope.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/SerializedCryptoKeyWrap.mm: Added.
(TestWebKitAPI::TEST_F):
Add API tests for SerializedCryptoKeyWrap APIs.

LayoutTests:

* crypto/resources/common.js: Renamed from LayoutTests/crypto/subtle/resources/common.js.
* crypto/subtle/aes-cbc-192-encrypt-decrypt.html:
* crypto/subtle/aes-cbc-256-encrypt-decrypt.html:
* crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html:
* crypto/subtle/aes-cbc-encrypt-decrypt.html:
* crypto/subtle/aes-cbc-generate-key.html:
* crypto/subtle/aes-cbc-import-jwk.html:
* crypto/subtle/aes-cbc-invalid-length.html:
* crypto/subtle/aes-cbc-unwrap-failure.html:
* crypto/subtle/aes-cbc-unwrap-rsa.html:
* crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html:
* crypto/subtle/aes-cbc-wrap-rsa.html:
* crypto/subtle/aes-cbc-wrong-key-class.html:
* crypto/subtle/aes-export-key.html:
* crypto/subtle/aes-kw-key-manipulation.html:
* crypto/subtle/aes-kw-wrap-unwrap-aes.html:
* crypto/subtle/aes-postMessage-expected.txt:
* crypto/subtle/aes-postMessage.html:
* crypto/subtle/argument-conversion.html:
* crypto/subtle/array-buffer-view-offset.html:
* crypto/subtle/crypto-key-algorithm-gc.html:
* crypto/subtle/crypto-key-usages-gc.html:
* crypto/subtle/hmac-check-algorithm.html:
* crypto/subtle/hmac-export-key.html:
* crypto/subtle/hmac-generate-key.html:
* crypto/subtle/hmac-import-jwk.html:
* crypto/subtle/hmac-postMessage-expected.txt:
* crypto/subtle/hmac-postMessage.html:
* crypto/subtle/hmac-sign-verify-empty-key.html:
* crypto/subtle/hmac-sign-verify.html:
* crypto/subtle/import-jwk.html:
* crypto/subtle/jwk-export-use-values.html:
* crypto/subtle/jwk-import-use-values.html:
* crypto/subtle/postMessage-worker-expected.txt: Removed.
* crypto/subtle/rsa-export-generated-keys.html:
* crypto/subtle/rsa-export-key.html:
* crypto/subtle/rsa-export-private-key.html:
* crypto/subtle/rsa-indexeddb-non-exportable-private.html:
* crypto/subtle/rsa-indexeddb-non-exportable.html:
* crypto/subtle/rsa-indexeddb-private.html:
* crypto/subtle/rsa-indexeddb.html:
* crypto/subtle/rsa-oaep-generate-non-extractable-key.html:
* crypto/subtle/rsa-oaep-key-manipulation.html:
* crypto/subtle/rsa-oaep-plaintext-length.html:
* crypto/subtle/rsa-oaep-wrap-unwrap-aes.html:
* crypto/subtle/rsa-postMessage.html:
* crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html:
* crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html:
* crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html:
* crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html:
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html:
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html:
* crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html:
* crypto/subtle/sha-1.html:
* crypto/subtle/sha-224.html:
* crypto/subtle/sha-256.html:
* crypto/subtle/sha-384.html:
* crypto/subtle/sha-512.html:
* crypto/subtle/unimplemented-unwrap-crash.html:
* crypto/subtle/unwrapKey-check-usage.html:
* crypto/subtle/wrapKey-check-usage.html:
* crypto/workers/aes-postMessage-worker-expected.txt: Added.
* crypto/workers/aes-postMessage-worker.html: Added.
* crypto/workers/hmac-postMessage-worker-expected.txt: Added.
* crypto/workers/hmac-postMessage-worker.html: Renamed from LayoutTests/crypto/subtle/postMessage-worker.html.
* crypto/workers/hrsa-postMessage-worker-expected.txt: Added.
* crypto/workers/hrsa-postMessage-worker.html: Added.
* crypto/workers/multiple-postMessage-worker-expected.txt: Added.
* crypto/workers/multiple-postMessage-worker.html: Added.
* crypto/workers/resources/aes-postMessage-worker.js: Added.
* crypto/workers/resources/hmac-postMessage-worker.js: Renamed from LayoutTests/crypto/subtle/resources/postMessage-worker.js.
* crypto/workers/resources/hrsa-postMessage-worker.js: Added.
* crypto/workers/resources/rsa-postMessage-worker.js: Added.
* crypto/workers/rsa-postMessage-worker-expected.txt: Added.
* crypto/workers/rsa-postMessage-worker.html: Added.
* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbc192encryptdecrypthtml">trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbc256encryptdecrypthtml">trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptdecryptwithpaddinghtml">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptdecrypthtml">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcgeneratekeyhtml">trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcimportjwkhtml">trunk/LayoutTests/crypto/subtle/aes-cbc-import-jwk.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcinvalidlengthhtml">trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcunwrapfailurehtml">trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-failure.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcunwraprsahtml">trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcwraprsanonextractablehtml">trunk/LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcwraprsahtml">trunk/LayoutTests/crypto/subtle/aes-cbc-wrap-rsa.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcwrongkeyclasshtml">trunk/LayoutTests/crypto/subtle/aes-cbc-wrong-key-class.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaesexportkeyhtml">trunk/LayoutTests/crypto/subtle/aes-export-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaeskwkeymanipulationhtml">trunk/LayoutTests/crypto/subtle/aes-kw-key-manipulation.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaeskwwrapunwrapaeshtml">trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaespostMessageexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaespostMessagehtml">trunk/LayoutTests/crypto/subtle/aes-postMessage.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleargumentconversionhtml">trunk/LayoutTests/crypto/subtle/argument-conversion.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlearraybufferviewoffsethtml">trunk/LayoutTests/crypto/subtle/array-buffer-view-offset.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlecryptokeyalgorithmgchtml">trunk/LayoutTests/crypto/subtle/crypto-key-algorithm-gc.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlecryptokeyusagesgchtml">trunk/LayoutTests/crypto/subtle/crypto-key-usages-gc.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmaccheckalgorithmhtml">trunk/LayoutTests/crypto/subtle/hmac-check-algorithm.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacexportkeyhtml">trunk/LayoutTests/crypto/subtle/hmac-export-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacgeneratekeyhtml">trunk/LayoutTests/crypto/subtle/hmac-generate-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacimportjwkhtml">trunk/LayoutTests/crypto/subtle/hmac-import-jwk.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacpostMessageexpectedtxt">trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacpostMessagehtml">trunk/LayoutTests/crypto/subtle/hmac-postMessage.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacsignverifyemptykeyhtml">trunk/LayoutTests/crypto/subtle/hmac-sign-verify-empty-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlehmacsignverifyhtml">trunk/LayoutTests/crypto/subtle/hmac-sign-verify.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleimportjwkhtml">trunk/LayoutTests/crypto/subtle/import-jwk.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlejwkexportusevalueshtml">trunk/LayoutTests/crypto/subtle/jwk-export-use-values.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlejwkimportusevalueshtml">trunk/LayoutTests/crypto/subtle/jwk-import-use-values.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaexportgeneratedkeyshtml">trunk/LayoutTests/crypto/subtle/rsa-export-generated-keys.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaexportkeyhtml">trunk/LayoutTests/crypto/subtle/rsa-export-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaexportprivatekeyhtml">trunk/LayoutTests/crypto/subtle/rsa-export-private-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaindexeddbnonexportableprivatehtml">trunk/LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaindexeddbnonexportablehtml">trunk/LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaindexeddbprivatehtml">trunk/LayoutTests/crypto/subtle/rsa-indexeddb-private.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaindexeddbhtml">trunk/LayoutTests/crypto/subtle/rsa-indexeddb.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepgeneratenonextractablekeyhtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepkeymanipulationhtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepplaintextlengthhtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-plaintext-length.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaoaepwrapunwrapaeshtml">trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersapostMessagehtml">trunk/LayoutTests/crypto/subtle/rsa-postMessage.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaespkcs1v1_5decrypthtml">trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersaespkcs1v1_5wrapunwrapaeshtml">trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersassapkcs1v1_5generatekeywithleadingzeroesinexponenthtml">trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersassapkcs1v1_5generatekeyhtml">trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersassapkcs1v1_5importjwksmallkeyhtml">trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersassapkcs1v1_5importjwkhtml">trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlersassapkcs1v1_5signverifyhtml">trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlesha1html">trunk/LayoutTests/crypto/subtle/sha-1.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlesha224html">trunk/LayoutTests/crypto/subtle/sha-224.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlesha256html">trunk/LayoutTests/crypto/subtle/sha-256.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlesha384html">trunk/LayoutTests/crypto/subtle/sha-384.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlesha512html">trunk/LayoutTests/crypto/subtle/sha-512.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleunimplementedunwrapcrashhtml">trunk/LayoutTests/crypto/subtle/unimplemented-unwrap-crash.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleunwrapKeycheckusagehtml">trunk/LayoutTests/crypto/subtle/unwrapKey-check-usage.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtlewrapKeycheckusagehtml">trunk/LayoutTests/crypto/subtle/wrapKey-check-usage.html</a></li>
<li><a href="#trunkLayoutTestsjsdomglobalconstructorsattributesdedicatedworkerexpectedtxt">trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoKeyidl">trunk/Source/WebCore/crypto/CryptoKey.idl</a></li>
<li><a href="#trunkSourceWebCorecryptoSerializedCryptoKeyWraph">trunk/Source/WebCore/crypto/SerializedCryptoKeyWrap.h</a></li>
<li><a href="#trunkSourceWebCorecryptomacSerializedCryptoKeyWrapMacmm">trunk/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopecpp">trunk/Source/WebCore/workers/WorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopeh">trunk/Source/WebCore/workers/WorkerGlobalScope.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/crypto/resources/</li>
<li><a href="#trunkLayoutTestscryptoresourcescommonjs">trunk/LayoutTests/crypto/resources/common.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkersaespostMessageworkerexpectedtxt">trunk/LayoutTests/crypto/workers/aes-postMessage-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkersaespostMessageworkerhtml">trunk/LayoutTests/crypto/workers/aes-postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkershmacpostMessageworkerexpectedtxt">trunk/LayoutTests/crypto/workers/hmac-postMessage-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkershmacpostMessageworkerhtml">trunk/LayoutTests/crypto/workers/hmac-postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkershrsapostMessageworkerexpectedtxt">trunk/LayoutTests/crypto/workers/hrsa-postMessage-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkershrsapostMessageworkerhtml">trunk/LayoutTests/crypto/workers/hrsa-postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkersmultiplepostMessageworkerexpectedtxt">trunk/LayoutTests/crypto/workers/multiple-postMessage-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkersmultiplepostMessageworkerhtml">trunk/LayoutTests/crypto/workers/multiple-postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkersresourcesaespostMessageworkerjs">trunk/LayoutTests/crypto/workers/resources/aes-postMessage-worker.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkersresourceshmacpostMessageworkerjs">trunk/LayoutTests/crypto/workers/resources/hmac-postMessage-worker.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkersresourceshrsapostMessageworkerjs">trunk/LayoutTests/crypto/workers/resources/hrsa-postMessage-worker.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkersresourcesrsapostMessageworkerjs">trunk/LayoutTests/crypto/workers/resources/rsa-postMessage-worker.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkersrsapostMessageworkerexpectedtxt">trunk/LayoutTests/crypto/workers/rsa-postMessage-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkersrsapostMessageworkerhtml">trunk/LayoutTests/crypto/workers/rsa-postMessage-worker.html</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCoreSerializedCryptoKeyWrapmm">trunk/Tools/TestWebKitAPI/Tests/WebCore/SerializedCryptoKeyWrap.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscryptosubtlepostMessageworkerexpectedtxt">trunk/LayoutTests/crypto/subtle/postMessage-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtlepostMessageworkerhtml">trunk/LayoutTests/crypto/subtle/postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleresourcescommonjs">trunk/LayoutTests/crypto/subtle/resources/common.js</a></li>
<li><a href="#trunkLayoutTestscryptosubtleresourcespostMessageworkerjs">trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/ChangeLog        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -1,3 +1,88 @@
</span><ins>+2016-09-29  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
+
+        Expose CryptoKey to web workers
+        https://bugs.webkit.org/show_bug.cgi?id=162640
+        &lt;rdar://problem/28182204&gt;
+
+        Reviewed by Brent Fulgham.
+
+        * crypto/resources/common.js: Renamed from LayoutTests/crypto/subtle/resources/common.js.
+        * crypto/subtle/aes-cbc-192-encrypt-decrypt.html:
+        * crypto/subtle/aes-cbc-256-encrypt-decrypt.html:
+        * crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html:
+        * crypto/subtle/aes-cbc-encrypt-decrypt.html:
+        * crypto/subtle/aes-cbc-generate-key.html:
+        * crypto/subtle/aes-cbc-import-jwk.html:
+        * crypto/subtle/aes-cbc-invalid-length.html:
+        * crypto/subtle/aes-cbc-unwrap-failure.html:
+        * crypto/subtle/aes-cbc-unwrap-rsa.html:
+        * crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html:
+        * crypto/subtle/aes-cbc-wrap-rsa.html:
+        * crypto/subtle/aes-cbc-wrong-key-class.html:
+        * crypto/subtle/aes-export-key.html:
+        * crypto/subtle/aes-kw-key-manipulation.html:
+        * crypto/subtle/aes-kw-wrap-unwrap-aes.html:
+        * crypto/subtle/aes-postMessage-expected.txt:
+        * crypto/subtle/aes-postMessage.html:
+        * crypto/subtle/argument-conversion.html:
+        * crypto/subtle/array-buffer-view-offset.html:
+        * crypto/subtle/crypto-key-algorithm-gc.html:
+        * crypto/subtle/crypto-key-usages-gc.html:
+        * crypto/subtle/hmac-check-algorithm.html:
+        * crypto/subtle/hmac-export-key.html:
+        * crypto/subtle/hmac-generate-key.html:
+        * crypto/subtle/hmac-import-jwk.html:
+        * crypto/subtle/hmac-postMessage-expected.txt:
+        * crypto/subtle/hmac-postMessage.html:
+        * crypto/subtle/hmac-sign-verify-empty-key.html:
+        * crypto/subtle/hmac-sign-verify.html:
+        * crypto/subtle/import-jwk.html:
+        * crypto/subtle/jwk-export-use-values.html:
+        * crypto/subtle/jwk-import-use-values.html:
+        * crypto/subtle/postMessage-worker-expected.txt: Removed.
+        * crypto/subtle/rsa-export-generated-keys.html:
+        * crypto/subtle/rsa-export-key.html:
+        * crypto/subtle/rsa-export-private-key.html:
+        * crypto/subtle/rsa-indexeddb-non-exportable-private.html:
+        * crypto/subtle/rsa-indexeddb-non-exportable.html:
+        * crypto/subtle/rsa-indexeddb-private.html:
+        * crypto/subtle/rsa-indexeddb.html:
+        * crypto/subtle/rsa-oaep-generate-non-extractable-key.html:
+        * crypto/subtle/rsa-oaep-key-manipulation.html:
+        * crypto/subtle/rsa-oaep-plaintext-length.html:
+        * crypto/subtle/rsa-oaep-wrap-unwrap-aes.html:
+        * crypto/subtle/rsa-postMessage.html:
+        * crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html:
+        * crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html:
+        * crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html:
+        * crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html:
+        * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html:
+        * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html:
+        * crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html:
+        * crypto/subtle/sha-1.html:
+        * crypto/subtle/sha-224.html:
+        * crypto/subtle/sha-256.html:
+        * crypto/subtle/sha-384.html:
+        * crypto/subtle/sha-512.html:
+        * crypto/subtle/unimplemented-unwrap-crash.html:
+        * crypto/subtle/unwrapKey-check-usage.html:
+        * crypto/subtle/wrapKey-check-usage.html:
+        * crypto/workers/aes-postMessage-worker-expected.txt: Added.
+        * crypto/workers/aes-postMessage-worker.html: Added.
+        * crypto/workers/hmac-postMessage-worker-expected.txt: Added.
+        * crypto/workers/hmac-postMessage-worker.html: Renamed from LayoutTests/crypto/subtle/postMessage-worker.html.
+        * crypto/workers/hrsa-postMessage-worker-expected.txt: Added.
+        * crypto/workers/hrsa-postMessage-worker.html: Added.
+        * crypto/workers/multiple-postMessage-worker-expected.txt: Added.
+        * crypto/workers/multiple-postMessage-worker.html: Added.
+        * crypto/workers/resources/aes-postMessage-worker.js: Added.
+        * crypto/workers/resources/hmac-postMessage-worker.js: Renamed from LayoutTests/crypto/subtle/resources/postMessage-worker.js.
+        * crypto/workers/resources/hrsa-postMessage-worker.js: Added.
+        * crypto/workers/resources/rsa-postMessage-worker.js: Added.
+        * crypto/workers/rsa-postMessage-worker-expected.txt: Added.
+        * crypto/workers/rsa-postMessage-worker.html: Added.
+        * js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
+
</ins><span class="cx"> 2016-09-29  Nan Wang  &lt;n_wang@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: iOS: Tapping &lt;input&gt; in Safari zooms in a bit when page has max scale = 1
</span></span></pre></div>
<a id="trunkLayoutTestscryptoresourcescommonjsfromrev206626trunkLayoutTestscryptosubtleresourcescommonjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/resources/common.js (from rev 206626, trunk/LayoutTests/crypto/subtle/resources/common.js) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/resources/common.js                                (rev 0)
+++ trunk/LayoutTests/crypto/resources/common.js        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+// Verifies that the given &quot;bytes&quot; holds the same value as &quot;expectedHexString&quot;.
+// &quot;bytes&quot; can be anything recognized by &quot;bytesToHexString()&quot;.
+function bytesShouldMatchHexString(testDescription, expectedHexString, bytes)
+{
+    expectedHexString = &quot;[&quot; + expectedHexString.toLowerCase() + &quot;]&quot;;
+    var actualHexString = &quot;[&quot; + bytesToHexString(bytes) + &quot;]&quot;;
+
+    if (actualHexString === expectedHexString) {
+        debug(&quot;PASS: &quot; + testDescription + &quot; should be &quot; + expectedHexString + &quot; and was&quot;);
+    } else {
+        debug(&quot;FAIL: &quot; + testDescription + &quot; should be &quot; + expectedHexString + &quot; but was &quot; + actualHexString);
+    }
+}
+
+// Builds a hex string representation for an array-like input.
+// &quot;bytes&quot; can be an Array of bytes, an ArrayBuffer, or any TypedArray.
+// The output looks like this:
+//    ab034c99
+function bytesToHexString(bytes)
+{
+    if (!bytes)
+        return null;
+
+    bytes = new Uint8Array(bytes);
+    var hexBytes = [];
+
+    for (var i = 0; i &lt; bytes.length; ++i) {
+        var byteString = bytes[i].toString(16);
+        if (byteString.length &lt; 2)
+            byteString = &quot;0&quot; + byteString;
+        hexBytes.push(byteString);
+    }
+
+    return hexBytes.join(&quot;&quot;);
+}
+
+function bytesToASCIIString(bytes)
+{
+    return String.fromCharCode.apply(null, new Uint8Array(bytes));
+}
+
+function hexStringToUint8Array(hexString)
+{
+    if (hexString.length % 2 != 0)
+        throw &quot;Invalid hexString&quot;;
+    var arrayBuffer = new Uint8Array(hexString.length / 2);
+
+    for (var i = 0; i &lt; hexString.length; i += 2) {
+        var byteValue = parseInt(hexString.substr(i, 2), 16);
+        if (byteValue == NaN)
+            throw &quot;Invalid hexString&quot;;
+        arrayBuffer[i/2] = byteValue;
+    }
+
+    return arrayBuffer;
+}
+
+function asciiToUint8Array(str)
+{
+    var chars = [];
+    for (var i = 0; i &lt; str.length; ++i)
+        chars.push(str.charCodeAt(i));
+    return new Uint8Array(chars);
+}
+
+function failAndFinishJSTest(error)
+{
+    if (error)
+       debug(error);
+    finishJSTest();
+}
+
+var Base64URL = {
+    stringify: function (a) {
+        var base64string = btoa(String.fromCharCode.apply(0, a));
+        return base64string.replace(/=/g, &quot;&quot;).replace(/\+/g, &quot;-&quot;).replace(/\//g, &quot;_&quot;);
+    },
+    parse: function (s) {
+        s = s.replace(/-/g, &quot;+&quot;).replace(/_/g, &quot;/&quot;).replace(/\s/g, '');
+        return new Uint8Array(Array.prototype.map.call(atob(s), function (c) { return c.charCodeAt(0) }));
+    }
+};
+
+if (!(typeof WorkerGlobalScope !== 'undefined' &amp;&amp; self instanceof WorkerGlobalScope) &amp;&amp; !crypto.subtle)
+    crypto.subtle = crypto.webkitSubtle;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbc192encryptdecrypthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-192-encrypt-decrypt.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbc256encryptdecrypthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-256-encrypt-decrypt.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptdecryptwithpaddinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptdecrypthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-decrypt.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcgeneratekeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-generate-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcimportjwkhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-import-jwk.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-import-jwk.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-import-jwk.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcinvalidlengthhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-invalid-length.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcunwrapfailurehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-failure.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-failure.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-failure.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcunwraprsahtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-unwrap-rsa.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcwraprsanonextractablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcwraprsahtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-wrap-rsa.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-wrap-rsa.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-wrap-rsa.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcwrongkeyclasshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-cbc-wrong-key-class.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-wrong-key-class.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-wrong-key-class.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaesexportkeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-export-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-export-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-export-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaeskwkeymanipulationhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-kw-key-manipulation.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-kw-key-manipulation.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-kw-key-manipulation.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaeskwwrapunwrapaeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-kw-wrap-unwrap-aes.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaespostMessageexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'AES-CBC'
</span><span class="cx"> PASS key.algorithm.length is 128
</span><del>-PASS key.usages is [&quot;decrypt&quot;, &quot;encrypt&quot;, &quot;sign&quot;, &quot;verify&quot;]
</del><ins>+PASS key.usages is [&quot;decrypt&quot;, &quot;encrypt&quot;]
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaespostMessagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-postMessage.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-postMessage.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/aes-postMessage.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="lines">@@ -18,13 +18,13 @@
</span><span class="cx">     shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
</span><span class="cx">     shouldBe(&quot;key.algorithm.name&quot;, &quot;'AES-CBC'&quot;);
</span><span class="cx">     shouldBe(&quot;key.algorithm.length&quot;, &quot;128&quot;);
</span><del>-    shouldBe(&quot;key.usages&quot;, '[&quot;decrypt&quot;, &quot;encrypt&quot;, &quot;sign&quot;, &quot;verify&quot;]');
</del><ins>+    shouldBe(&quot;key.usages&quot;, '[&quot;decrypt&quot;, &quot;encrypt&quot;]');
</ins><span class="cx"> 
</span><span class="cx">     finishJSTest();
</span><span class="cx"> }, false);
</span><span class="cx"> 
</span><del>-importTestKeys().then(function(keys) {
-    postMessage(keys.aesCbc, &quot;*&quot;);
</del><ins>+crypto.subtle.importKey(&quot;raw&quot;, asciiToUint8Array(&quot;16 bytes of key!&quot;), {name: &quot;aes-cbc&quot;, length: 128}, true, [&quot;encrypt&quot;, &quot;decrypt&quot;]).then(function(key) {
+    postMessage(key, &quot;*&quot;);
</ins><span class="cx"> });
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleargumentconversionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/argument-conversion.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/argument-conversion.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/argument-conversion.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlearraybufferviewoffsethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/array-buffer-view-offset.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/array-buffer-view-offset.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/array-buffer-view-offset.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlecryptokeyalgorithmgchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/crypto-key-algorithm-gc.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/crypto-key-algorithm-gc.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/crypto-key-algorithm-gc.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlecryptokeyusagesgchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/crypto-key-usages-gc.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/crypto-key-usages-gc.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/crypto-key-usages-gc.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmaccheckalgorithmhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-check-algorithm.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-check-algorithm.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/hmac-check-algorithm.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacexportkeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-export-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-export-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/hmac-export-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacgeneratekeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-generate-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-generate-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/hmac-generate-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacimportjwkhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-import-jwk.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-import-jwk.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/hmac-import-jwk.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacpostMessageexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> PASS key.extractable is true
</span><span class="cx"> PASS key.algorithm.name is 'HMAC'
</span><span class="cx"> PASS key.algorithm.length is 16
</span><del>-PASS key.usages is [&quot;decrypt&quot;, &quot;encrypt&quot;, &quot;sign&quot;, &quot;verify&quot;]
</del><ins>+PASS key.usages is [&quot;sign&quot;, &quot;verify&quot;]
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacpostMessagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-postMessage.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-postMessage.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/hmac-postMessage.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="lines">@@ -18,13 +18,13 @@
</span><span class="cx">     shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
</span><span class="cx">     shouldBe(&quot;key.algorithm.name&quot;, &quot;'HMAC'&quot;);
</span><span class="cx">     shouldBe(&quot;key.algorithm.length&quot;, &quot;16&quot;);
</span><del>-    shouldBe(&quot;key.usages&quot;, '[&quot;decrypt&quot;, &quot;encrypt&quot;, &quot;sign&quot;, &quot;verify&quot;]');
</del><ins>+    shouldBe(&quot;key.usages&quot;, '[&quot;sign&quot;, &quot;verify&quot;]');
</ins><span class="cx"> 
</span><span class="cx">     finishJSTest();
</span><span class="cx"> }, false);
</span><span class="cx"> 
</span><del>-importTestKeys().then(function(keys) {
-    postMessage(keys.hmacSha1, &quot;*&quot;);
</del><ins>+crypto.subtle.importKey(&quot;raw&quot;, asciiToUint8Array(&quot;16 bytes of key!&quot;), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(key) {
+    postMessage(key, &quot;*&quot;);
</ins><span class="cx"> });
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacsignverifyemptykeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-sign-verify-empty-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-sign-verify-empty-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/hmac-sign-verify-empty-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlehmacsignverifyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/hmac-sign-verify.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/hmac-sign-verify.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/hmac-sign-verify.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleimportjwkhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/import-jwk.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/import-jwk.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/import-jwk.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlejwkexportusevalueshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/jwk-export-use-values.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/jwk-export-use-values.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/jwk-export-use-values.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlejwkimportusevalueshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/jwk-import-use-values.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/jwk-import-use-values.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/jwk-import-use-values.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlepostMessageworkerexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/postMessage-worker-expected.txt (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/postMessage-worker-expected.txt        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/postMessage-worker-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-Test sending crypto keys via postMessage to a worker.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-FAIL Check failed in worker: key is null
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtlepostMessageworkerhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/postMessage-worker.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/postMessage-worker.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/postMessage-worker.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;meta charset=&quot;utf-8&quot;&gt;
-&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;script&gt;
-
-description(&quot;Test sending crypto keys via postMessage to a worker.&quot;);
-
-jsTestIsAsync = true;
-
-importTestKeys().then(function(keys) {
-    var worker = new Worker(&quot;resources/postMessage-worker.js&quot;);
-    worker.onmessage = function(evt) {
-        if (!evt.data.result) {
-            testFailed(&quot;Check failed in worker: &quot; + evt.data.message);
-        } else {
-            testPassed(&quot;All checks passed in worker&quot;);
-            key = evt.data.key;
-            shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
-            shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
-            shouldBe(&quot;key.algorithm.name&quot;, &quot;'HMAC'&quot;);
-            shouldBe(&quot;key.algorithm.length&quot;, &quot;16&quot;);
-            shouldBe(&quot;key.usages&quot;, '[&quot;decrypt&quot;, &quot;encrypt&quot;, &quot;sign&quot;, &quot;verify&quot;]');
-        }
-        finishJSTest();
-    }
-    worker.postMessage(keys.hmacSha1);
-});
-&lt;/script&gt;
-&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtleresourcescommonjs"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/resources/common.js (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/resources/common.js        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/resources/common.js        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -1,105 +0,0 @@
</span><del>-function importTestKeys()
-{
-    var keyFormat = &quot;raw&quot;;
-    var data = asciiToUint8Array(&quot;16 bytes of key!&quot;);
-    var extractable = true;
-    var keyUsages = ['encrypt', 'decrypt', 'sign', 'verify'];
-
-    var hmacPromise = crypto.subtle.importKey(keyFormat, data, {name: 'hmac', hash: {name: 'sha-1'}}, extractable, keyUsages);
-    var aesCbcPromise = crypto.subtle.importKey(keyFormat, data, {name: 'AES-CBC'}, extractable, keyUsages);
-    var aesCbcJustDecrypt = crypto.subtle.importKey(keyFormat, data, {name: 'AES-CBC'}, false, ['decrypt']);
-
-    return Promise.all([hmacPromise, aesCbcPromise, aesCbcJustDecrypt]).then(function(results) {
-        return {
-            hmacSha1: results[0],
-            aesCbc: results[1],
-            aesCbcJustDecrypt: results[2],
-        };
-    });
-}
-
-// Verifies that the given &quot;bytes&quot; holds the same value as &quot;expectedHexString&quot;.
-// &quot;bytes&quot; can be anything recognized by &quot;bytesToHexString()&quot;.
-function bytesShouldMatchHexString(testDescription, expectedHexString, bytes)
-{
-    expectedHexString = &quot;[&quot; + expectedHexString.toLowerCase() + &quot;]&quot;;
-    var actualHexString = &quot;[&quot; + bytesToHexString(bytes) + &quot;]&quot;;
-
-    if (actualHexString === expectedHexString) {
-        debug(&quot;PASS: &quot; + testDescription + &quot; should be &quot; + expectedHexString + &quot; and was&quot;);
-    } else {
-        debug(&quot;FAIL: &quot; + testDescription + &quot; should be &quot; + expectedHexString + &quot; but was &quot; + actualHexString);
-    }
-}
-
-// Builds a hex string representation for an array-like input.
-// &quot;bytes&quot; can be an Array of bytes, an ArrayBuffer, or any TypedArray.
-// The output looks like this:
-//    ab034c99
-function bytesToHexString(bytes)
-{
-    if (!bytes)
-        return null;
-
-    bytes = new Uint8Array(bytes);
-    var hexBytes = [];
-
-    for (var i = 0; i &lt; bytes.length; ++i) {
-        var byteString = bytes[i].toString(16);
-        if (byteString.length &lt; 2)
-            byteString = &quot;0&quot; + byteString;
-        hexBytes.push(byteString);
-    }
-
-    return hexBytes.join(&quot;&quot;);
-}
-
-function bytesToASCIIString(bytes)
-{
-    return String.fromCharCode.apply(null, new Uint8Array(bytes));
-}
-
-function hexStringToUint8Array(hexString)
-{
-    if (hexString.length % 2 != 0)
-        throw &quot;Invalid hexString&quot;;
-    var arrayBuffer = new Uint8Array(hexString.length / 2);
-
-    for (var i = 0; i &lt; hexString.length; i += 2) {
-        var byteValue = parseInt(hexString.substr(i, 2), 16);
-        if (byteValue == NaN)
-            throw &quot;Invalid hexString&quot;;
-        arrayBuffer[i/2] = byteValue;
-    }
-
-    return arrayBuffer;
-}
-
-function asciiToUint8Array(str)
-{
-    var chars = [];
-    for (var i = 0; i &lt; str.length; ++i)
-        chars.push(str.charCodeAt(i));
-    return new Uint8Array(chars);
-}
-
-function failAndFinishJSTest(error)
-{
-    if (error)
-       debug(error);
-    finishJSTest();
-}
-
-var Base64URL = {
-    stringify: function (a) {
-        var base64string = btoa(String.fromCharCode.apply(0, a));
-        return base64string.replace(/=/g, &quot;&quot;).replace(/\+/g, &quot;-&quot;).replace(/\//g, &quot;_&quot;);
-    },
-    parse: function (s) {
-        s = s.replace(/-/g, &quot;+&quot;).replace(/_/g, &quot;/&quot;).replace(/\s/g, '');
-        return new Uint8Array(Array.prototype.map.call(atob(s), function (c) { return c.charCodeAt(0) }));
-    }
-};
-
-if (!crypto.subtle)
-    crypto.subtle = crypto.webkitSubtle;
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtleresourcespostMessageworkerjs"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>-onmessage = function(evt)
-{
-    var key = evt.data;
-    if (!key)
-        postMessage({ result:false, message:'key is ' + key });
-    if (key.type != 'secret')
-        postMessage({ result:false, message:'key.type should be &quot;secret&quot;' });
-    else if (!key.extractable)
-        postMessage({ result:false, message:'key.extractable should be true' });
-    else if (key.algorithm.name != &quot;HMAC&quot;)
-        postMessage({ result:false, message:'key.algorithm.name should be &quot;HMAC&quot;' });
-    else if (key.usages.toString() != &quot;decrypt,encrypt,sign,verify&quot;)
-        postMessage({ result:false, message:'key.usages should be [&quot;decrypt&quot;, &quot;encrypt&quot;, &quot;sign&quot;, &quot;verify&quot;]' });
-    else
-        postMessage({ result:true, key:key });
-}
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaexportgeneratedkeyshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-export-generated-keys.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-export-generated-keys.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-export-generated-keys.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaexportkeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-export-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-export-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-export-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaexportprivatekeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-export-private-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-export-private-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-export-private-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaindexeddbnonexportableprivatehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable-private.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> enablePrivateBrowsing = true;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script src=&quot;resources/rsa-indexeddb-non-exportable.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaindexeddbnonexportablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-indexeddb-non-exportable.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script src=&quot;resources/rsa-indexeddb-non-exportable.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaindexeddbprivatehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-indexeddb-private.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-indexeddb-private.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-indexeddb-private.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> enablePrivateBrowsing = true;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script src=&quot;resources/rsa-indexeddb.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaindexeddbhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-indexeddb.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-indexeddb.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-indexeddb.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script src=&quot;resources/rsa-indexeddb.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepgeneratenonextractablekeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-generate-non-extractable-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepkeymanipulationhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-key-manipulation.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepplaintextlengthhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-oaep-plaintext-length.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-plaintext-length.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-plaintext-length.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaoaepwrapunwrapaeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-oaep-wrap-unwrap-aes.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersapostMessagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsa-postMessage.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsa-postMessage.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsa-postMessage.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;meta charset=&quot;utf-8&quot;&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaespkcs1v1_5decrypthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersaespkcs1v1_5wrapunwrapaeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersassapkcs1v1_5generatekeywithleadingzeroesinexponenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersassapkcs1v1_5generatekeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersassapkcs1v1_5importjwksmallkeyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersassapkcs1v1_5importjwkhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlersassapkcs1v1_5signverifyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlesha1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/sha-1.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/sha-1.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/sha-1.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlesha224html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/sha-224.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/sha-224.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/sha-224.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlesha256html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/sha-256.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/sha-256.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/sha-256.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlesha384html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/sha-384.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/sha-384.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/sha-384.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlesha512html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/sha-512.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/sha-512.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/sha-512.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleunimplementedunwrapcrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/unimplemented-unwrap-crash.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/unimplemented-unwrap-crash.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/unimplemented-unwrap-crash.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleunwrapKeycheckusagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/unwrapKey-check-usage.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/unwrapKey-check-usage.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/unwrapKey-check-usage.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtlewrapKeycheckusagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/wrapKey-check-usage.html (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/wrapKey-check-usage.html        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/crypto/subtle/wrapKey-check-usage.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/common.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkersaespostMessageworkerexpectedtxtfromrev206626trunkLayoutTestscryptosubtleaespostMessageexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/workers/aes-postMessage-worker-expected.txt (from rev 206626, trunk/LayoutTests/crypto/subtle/aes-postMessage-expected.txt) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/aes-postMessage-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/aes-postMessage-worker-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test sending aes crypto keys via postMessage to a worker.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS All checks passed in worker
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersaespostMessageworkerhtmlfromrev206626trunkLayoutTestscryptosubtlepostMessageworkerhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/workers/aes-postMessage-worker.html (from rev 206626, trunk/LayoutTests/crypto/subtle/postMessage-worker.html) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/aes-postMessage-worker.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/aes-postMessage-worker.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+description(&quot;Test sending aes crypto keys via postMessage to a worker.&quot;);
+
+jsTestIsAsync = true;
+
+crypto.subtle.importKey(&quot;raw&quot;, asciiToUint8Array(&quot;16 bytes of key!&quot;), {name: &quot;aes-cbc&quot;, length: 128}, true, [&quot;encrypt&quot;, &quot;decrypt&quot;]).then(function(localKey) {
+    var worker = new Worker(&quot;resources/aes-postMessage-worker.js&quot;);
+    worker.onmessage = function(evt) {
+        if (!evt.data.result) {
+            testFailed(&quot;Check failed in worker: &quot; + evt.data.message);
+        } else {
+            testPassed(&quot;All checks passed in worker&quot;);
+            key = evt.data.key;
+            shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
+            shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
+            shouldBe(&quot;key.algorithm.name&quot;, &quot;'AES-CBC'&quot;);
+            shouldBe(&quot;key.algorithm.length&quot;, &quot;128&quot;);
+            shouldBe(&quot;key.usages&quot;, &quot;['decrypt', 'encrypt']&quot;);
+        }
+        finishJSTest();
+    }
+    worker.postMessage(localKey);
+});
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkershmacpostMessageworkerexpectedtxtfromrev206626trunkLayoutTestscryptosubtlehmacpostMessageexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/workers/hmac-postMessage-worker-expected.txt (from rev 206626, trunk/LayoutTests/crypto/subtle/hmac-postMessage-expected.txt) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/hmac-postMessage-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/hmac-postMessage-worker-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Test sending hmac crypto keys via postMessage to a worker.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS All checks passed in worker
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'HMAC'
+PASS key.algorithm.length is 16
+PASS key.algorithm.hash.name is 'SHA-1'
+PASS key.usages is [&quot;sign&quot;, &quot;verify&quot;]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkershmacpostMessageworkerhtmlfromrev206626trunkLayoutTestscryptosubtlepostMessageworkerhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/workers/hmac-postMessage-worker.html (from rev 206626, trunk/LayoutTests/crypto/subtle/postMessage-worker.html) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/hmac-postMessage-worker.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/hmac-postMessage-worker.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+description(&quot;Test sending hmac crypto keys via postMessage to a worker.&quot;);
+
+jsTestIsAsync = true;
+
+crypto.subtle.importKey(&quot;raw&quot;, asciiToUint8Array(&quot;16 bytes of key!&quot;), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(localKey) {
+    var worker = new Worker(&quot;resources/hmac-postMessage-worker.js&quot;);
+    worker.onmessage = function(evt) {
+        if (!evt.data.result) {
+            testFailed(&quot;Check failed in worker: &quot; + evt.data.message);
+        } else {
+            testPassed(&quot;All checks passed in worker&quot;);
+            key = evt.data.key;
+            shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
+            shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
+            shouldBe(&quot;key.algorithm.name&quot;, &quot;'HMAC'&quot;);
+            shouldBe(&quot;key.algorithm.length&quot;, &quot;16&quot;);
+            shouldBe(&quot;key.algorithm.hash.name&quot;, &quot;'SHA-1'&quot;);
+            shouldBe(&quot;key.usages&quot;, '[&quot;sign&quot;, &quot;verify&quot;]');
+        }
+        finishJSTest();
+    }
+    worker.postMessage(localKey);
+});
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkershrsapostMessageworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/hrsa-postMessage-worker-expected.txt (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/hrsa-postMessage-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/hrsa-postMessage-worker-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+Test sending hashed rsa crypto keys via postMessage to a worker.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS All checks passed in worker for private key
+PASS privateKey.type is 'private'
+PASS privateKey.extractable is false
+PASS privateKey.algorithm.name is 'RSASSA-PKCS1-v1_5'
+PASS privateKey.algorithm.modulusLength is 2048
+PASS bytesToHexString(privateKey.algorithm.publicExponent) is '010001'
+PASS privateKey.algorithm.hash.name is 'SHA-256'
+PASS privateKey.usages is ['decrypt']
+PASS All checks passed in worker for public key
+PASS publicKey.type is 'public'
+PASS publicKey.extractable is true
+PASS publicKey.algorithm.name is 'RSASSA-PKCS1-v1_5'
+PASS publicKey.algorithm.modulusLength is 2048
+PASS bytesToHexString(publicKey.algorithm.publicExponent) is '010001'
+PASS publicKey.algorithm.hash.name is 'SHA-256'
+PASS publicKey.usages is ['encrypt']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkershrsapostMessageworkerhtmlfromrev206626trunkLayoutTestscryptosubtlersassapkcs1v1_5importjwkhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/workers/hrsa-postMessage-worker.html (from rev 206626, trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/hrsa-postMessage-worker.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/hrsa-postMessage-worker.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+description(&quot;Test sending hashed rsa crypto keys via postMessage to a worker.&quot;);
+
+jsTestIsAsync = true;
+
+var publicKeyJSON = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RS256&quot;,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+
+var privateKeyJSON = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RS256&quot;,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;,
+    d: &quot;eNLS37aCz7RXSNPD_DtLBJ6j5T8cSxdzRBCjPaI6WcGqJp16lq3UTwuoDLAqlA9oGYm238dsIWpuucP_lQtbWe-7SpxoI6_vmYGf7YVUHv1-DF9qiOmSrMmdxMnVOzYXY8RaT6thPjn_J5cfLV2xI_LwsrMtmpdSyNlgX0zTUhwtuahgAKMEChYjH2EnjHdHw6sY2-wApdcQI7ULE0oo5RzbQZpmuhcN9hiBc0L3hhF0qo50mbl02_65_GQ7DpVkXBxNgRBLzlPabmzzG2oAhfefLgYmSC1opaCkXE6vRWQNWNL45RZNZFYM3uoJghOMqGeocM0BpjdChHrPOlFvSQ&quot;,
+    p: &quot;4miTuAjKMeH5uJ5KB397QUwhbkYEgSbcA2mifmSkvE2018gb55qkBHK1eVryf1_m43LNlc6O_ak6gfzdZIZvS5NCGjPl0q09plUpu8qFOSspBwA67qGH76lFlZLn_d4yglS7wfLru4_5Ys8qLLs-DqVLviwposOnyyWqwM5AXp0&quot;,
+    q: &quot;xHYrzkivtmnz_sGchnWGc0q-pDOkKicptRpv2pMFIIXxnFX5aMeEXIZjVujXtwUy1UlFIN2GZJSvy5KJ79mu_XyNnFHMzedH-A3ee3u8h1UUrZF-vUu1_e4U_x67NN1dedzUSKynN7pFl3OkuShMBWGV-cwzOPdcVAfVuZlxUMc&quot;,
+    dp: &quot;fBzDzYDUBmBQGop7Hn0dvf_T27V6RqpctWo074CQZcFbP2atFVtKSj3viWT3xid2VHzcgiDHdfpM3nEVlEO1wwIonGCSvdjGEOZiiFVOjrZAOVxA8guOjyyFvqbXke06VwPIIVvfKeSU2zuhbP__1tt6F_fxow4Kb2xonGT0GGk&quot;,
+    dq: &quot;jmE2DiIPdhwDgLXAQpIaBqQ81bO3XfVT_LRULAwwwwlPuQV148H04zlh9TJ6Y2GZHYokV1U0eOBpJxfkb7dLYtpJpuiBjRf4yIUEoGlkkI_QlJnFSFr-YjGRdfNHqWBkxlSMZL770R9mIATndGkH7z5x-r9KwBZFC4FCG2hg_zE&quot;,
+    qi: &quot;YCX_pLwbMBA1ThVH0WcwmnytqNcrMCEwTm7ByA2eU6nWbQrULvf7m9_kzfLUcjsnpAVlBQG5JMXMy0Sq4ptwbywsa5-G8KAOOOR2L3v4hC-Eys9ftgFM_3i0o40eeQH4b3haPbntrIeMg8IzlOuVYKf9-2QuKDoWeRdd7NsdxTk&quot;
+};
+
+var algorithmKeyGen = {
+    name: &quot;RSASSA-PKCS1-v1_5&quot;,
+    // RsaKeyGenParams
+    modulusLength: 2048,
+    publicExponent: new Uint8Array([0x01, 0x00, 0x01]),  // Equivalent to 65537
+};
+
+var count = 0;
+var worker = new Worker(&quot;resources/hrsa-postMessage-worker.js&quot;);
+worker.onmessage = function(evt) {
+    if (!evt.data.result) {
+        testFailed(&quot;Check failed in worker: &quot; + evt.data.message);
+        finishJSTest();
+    } else {
+        if (publicKey = evt.data.publicKey) {
+            testPassed(&quot;All checks passed in worker for public key&quot;);
+            shouldBe(&quot;publicKey.type&quot;, &quot;'public'&quot;);
+            shouldBe(&quot;publicKey.extractable&quot;, &quot;true&quot;);
+            shouldBe(&quot;publicKey.algorithm.name&quot;, &quot;'RSASSA-PKCS1-v1_5'&quot;);
+            shouldBe(&quot;publicKey.algorithm.modulusLength&quot;, &quot;2048&quot;);
+            shouldBe(&quot;bytesToHexString(publicKey.algorithm.publicExponent)&quot;, &quot;'010001'&quot;);
+            shouldBe(&quot;publicKey.algorithm.hash.name&quot;, &quot;'SHA-256'&quot;);
+            shouldBe(&quot;publicKey.usages&quot;, &quot;['encrypt']&quot;);
+        } else if (privateKey = evt.data.privateKey) {
+            testPassed(&quot;All checks passed in worker for private key&quot;);
+            shouldBe(&quot;privateKey.type&quot;, &quot;'private'&quot;);
+            shouldBe(&quot;privateKey.extractable&quot;, &quot;false&quot;);
+            shouldBe(&quot;privateKey.algorithm.name&quot;, &quot;'RSASSA-PKCS1-v1_5'&quot;);
+            shouldBe(&quot;privateKey.algorithm.modulusLength&quot;, &quot;2048&quot;);
+            shouldBe(&quot;bytesToHexString(privateKey.algorithm.publicExponent)&quot;, &quot;'010001'&quot;);
+            shouldBe(&quot;privateKey.algorithm.hash.name&quot;, &quot;'SHA-256'&quot;);
+            shouldBe(&quot;privateKey.usages&quot;, &quot;['decrypt']&quot;);
+        }
+        count = count + 1;
+    }
+
+    if (count == 2)
+        finishJSTest();
+}
+
+crypto.subtle.importKey(&quot;jwk&quot;, asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
+    worker.postMessage({ publicKey: localPublicKey });
+});
+crypto.subtle.importKey(&quot;jwk&quot;, asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
+    worker.postMessage({ privateKey: localPrivateKey });
+});
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersmultiplepostMessageworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/multiple-postMessage-worker-expected.txt (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/multiple-postMessage-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/multiple-postMessage-worker-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+Test sending multiple crypto keys via postMessage to a worker.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS All checks passed in worker: 0
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 1
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 2
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 3
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 4
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 5
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 6
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 7
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 8
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS All checks passed in worker: 9
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CBC'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersmultiplepostMessageworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/multiple-postMessage-worker.html (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/multiple-postMessage-worker.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/multiple-postMessage-worker.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+description(&quot;Test sending multiple crypto keys via postMessage to a worker.&quot;);
+
+jsTestIsAsync = true;
+
+var count = 0;
+var worker = new Worker(&quot;resources/aes-postMessage-worker.js&quot;);
+worker.onmessage = function(evt) {
+    if (!evt.data.result) {
+        testFailed(&quot;Check failed in worker: &quot; + evt.data.message);
+        finishJSTest();
+    } else {
+        testPassed(&quot;All checks passed in worker: &quot; + count);
+        key = evt.data.key;
+        shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
+        shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
+        shouldBe(&quot;key.algorithm.name&quot;, &quot;'AES-CBC'&quot;);
+        shouldBe(&quot;key.algorithm.length&quot;, &quot;128&quot;);
+        shouldBe(&quot;key.usages&quot;, &quot;['decrypt', 'encrypt']&quot;);
+        count = count + 1;
+    }
+
+    if (count == 10)
+        finishJSTest();
+}
+
+var keyFormat = &quot;raw&quot;;
+var keyData = asciiToUint8Array(&quot;16 bytes of key!&quot;);
+var aesKeyGenParams = {name: &quot;aes-cbc&quot;, length: 128};
+var usages = [&quot;encrypt&quot;, &quot;decrypt&quot;]
+for (i = 0; i &lt; 10; i++)
+    crypto.subtle.importKey(keyFormat, keyData, aesKeyGenParams, true, usages).then(function(localKey) {
+        worker.postMessage(localKey);
+    });
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersresourcesaespostMessageworkerjsfromrev206626trunkLayoutTestscryptosubtleresourcespostMessageworkerjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/workers/resources/aes-postMessage-worker.js (from rev 206626, trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/resources/aes-postMessage-worker.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/resources/aes-postMessage-worker.js        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+onmessage = function(evt)
+{
+    var key = evt.data;
+    if (!key)
+        postMessage({ result:false, message:'key is ' + key });
+    if (key.type != 'secret')
+        postMessage({ result:false, message:'key.type should be &quot;secret&quot;' });
+    else if (!key.extractable)
+        postMessage({ result:false, message:'key.extractable should be true' });
+    else if (key.algorithm.name != &quot;AES-CBC&quot;)
+        postMessage({ result:false, message:'key.algorithm.name should be &quot;AES-CBC&quot;' });
+    else if (key.algorithm.length != 128)
+        postMessage({ result:false, message:'key.algorithm.length should be 128' });
+    else if (key.usages.toString() != &quot;decrypt,encrypt&quot;)
+        postMessage({ result:false, message:'key.usages should be [&quot;decrypt&quot;, &quot;encrypt&quot;]' });
+    else
+        postMessage({ result:true, key:key });
+}
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersresourceshmacpostMessageworkerjsfromrev206626trunkLayoutTestscryptosubtleresourcespostMessageworkerjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/workers/resources/hmac-postMessage-worker.js (from rev 206626, trunk/LayoutTests/crypto/subtle/resources/postMessage-worker.js) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/resources/hmac-postMessage-worker.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/resources/hmac-postMessage-worker.js        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+onmessage = function(evt)
+{
+    var key = evt.data;
+    if (!key)
+        postMessage({ result:false, message:'key is ' + key });
+    if (key.type != 'secret')
+        postMessage({ result:false, message:'key.type should be &quot;secret&quot;' });
+    else if (!key.extractable)
+        postMessage({ result:false, message:'key.extractable should be true' });
+    else if (key.algorithm.name != &quot;HMAC&quot;)
+        postMessage({ result:false, message:'key.algorithm.name should be &quot;HMAC&quot;' });
+    else if (key.algorithm.length != 16)
+        postMessage({ result:false, message:'key.algorithm.length should be 16' });
+    else if (key.algorithm.hash.name != &quot;SHA-1&quot;)
+        postMessage({ result:false, message:'key.algorithm.hash.name should be &quot;SHA-1&quot;' });
+    else if (key.usages.toString() != &quot;sign,verify&quot;)
+        postMessage({ result:false, message:'key.usages should be [&quot;sign&quot;, &quot;verify&quot;]' });
+    else
+        postMessage({ result:true, key:key });
+}
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersresourceshrsapostMessageworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/resources/hrsa-postMessage-worker.js (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/resources/hrsa-postMessage-worker.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/resources/hrsa-postMessage-worker.js        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+importScripts(&quot;../../resources/common.js&quot;);
+
+onmessage = function(evt)
+{
+    if (publicKey = evt.data.publicKey) {
+        if (publicKey.type != 'public')
+            postMessage({ result:false, message:'publicKey.type should be &quot;public&quot;' });
+        else if (!publicKey.extractable)
+            postMessage({ result:false, message:'publicKey.extractable should be true' });
+        else if (publicKey.algorithm.name != &quot;RSASSA-PKCS1-v1_5&quot;)
+            postMessage({ result:false, message:'publicKey.algorithm.name should be &quot;RSASSA-PKCS1-v1_5&quot;' });
+        else if (publicKey.algorithm.modulusLength != 2048)
+            postMessage({ result:false, message:'publicKey.algorithm.modulusLength should be 2048' });
+        else if (bytesToHexString(publicKey.algorithm.publicExponent) != &quot;010001&quot;)
+            postMessage({ result:false, message:'publicKey.algorithm.publicExponent should be &quot;010001&quot;' });
+        else if (publicKey.algorithm.hash.name != &quot;SHA-256&quot;)
+            postMessage({ result:false, message:'publicKey.algorithm.hash.name should be &quot;SHA-256&quot;' });
+        else if (publicKey.usages.toString() != &quot;encrypt&quot;)
+            postMessage({ result:false, message:'publicKey.usages should be [&quot;encrypt&quot;]' });
+        else
+            postMessage({ result:true, publicKey:publicKey });
+    } else if (privateKey = evt.data.privateKey) {
+        if (privateKey.type != 'private')
+            postMessage({ result:false, message:'privateKey.type should be &quot;private&quot;' });
+        else if (privateKey.extractable)
+            postMessage({ result:false, message:'privateKey.extractable should be false' });
+        else if (privateKey.algorithm.name != &quot;RSASSA-PKCS1-v1_5&quot;)
+            postMessage({ result:false, message:'privateKey.algorithm.name should be &quot;RSASSA-PKCS1-v1_5&quot;' });
+        else if (privateKey.algorithm.modulusLength != 2048)
+            postMessage({ result:false, message:'privateKey.algorithm.modulusLength should be 2048' });
+        else if (bytesToHexString(privateKey.algorithm.publicExponent) != &quot;010001&quot;)
+            postMessage({ result:false, message:'privateKey.algorithm.publicExponent should be &quot;010001&quot;' });
+        else if (privateKey.algorithm.hash.name != &quot;SHA-256&quot;)
+            postMessage({ result:false, message:'publicKey.algorithm.hash.name should be &quot;SHA-256&quot;' });
+        else if (privateKey.usages.toString() != &quot;decrypt&quot;)
+            postMessage({ result:false, message:'privateKey.usages should be [&quot;decrypt&quot;]' });
+        else
+            postMessage({ result:true, privateKey:privateKey });
+    } else {
+        postMessage({ result:false, message:'key is ' + key });
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersresourcesrsapostMessageworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/resources/rsa-postMessage-worker.js (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/resources/rsa-postMessage-worker.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/resources/rsa-postMessage-worker.js        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+importScripts(&quot;../../resources/common.js&quot;);
+
+onmessage = function(evt)
+{
+    if (publicKey = evt.data.publicKey) {
+        if (publicKey.type != 'public')
+            postMessage({ result:false, message:'publicKey.type should be &quot;public&quot;' });
+        else if (!publicKey.extractable)
+            postMessage({ result:false, message:'publicKey.extractable should be true' });
+        else if (publicKey.algorithm.name != &quot;RSAES-PKCS1-v1_5&quot;)
+            postMessage({ result:false, message:'publicKey.algorithm.name should be &quot;RSAES-PKCS1-v1_5&quot;' });
+        else if (publicKey.algorithm.modulusLength != 2048)
+            postMessage({ result:false, message:'publicKey.algorithm.modulusLength should be 2048' });
+        else if (bytesToHexString(publicKey.algorithm.publicExponent) != &quot;010001&quot;)
+            postMessage({ result:false, message:'publicKey.algorithm.publicExponent should be &quot;010001&quot;' });
+        else if (typeof publicKey.algorithm.hash != 'undefined')
+            postMessage({ result:false, message:'publicKey.algorithm.hash should be undefined' });
+        else if (publicKey.usages.toString() != &quot;encrypt&quot;)
+            postMessage({ result:false, message:'publicKey.usages should be [&quot;encrypt&quot;]' });
+        else
+            postMessage({ result:true, publicKey:publicKey });
+    } else if (privateKey = evt.data.privateKey) {
+        if (privateKey.type != 'private')
+            postMessage({ result:false, message:'privateKey.type should be &quot;private&quot;' });
+        else if (privateKey.extractable)
+            postMessage({ result:false, message:'privateKey.extractable should be false' });
+        else if (privateKey.algorithm.name != &quot;RSAES-PKCS1-v1_5&quot;)
+            postMessage({ result:false, message:'privateKey.algorithm.name should be &quot;RSAES-PKCS1-v1_5&quot;' });
+        else if (privateKey.algorithm.modulusLength != 2048)
+            postMessage({ result:false, message:'privateKey.algorithm.modulusLength should be 2048' });
+        else if (bytesToHexString(privateKey.algorithm.publicExponent) != &quot;010001&quot;)
+            postMessage({ result:false, message:'privateKey.algorithm.publicExponent should be &quot;010001&quot;' });
+        else if (typeof privateKey.algorithm.hash != 'undefined')
+            postMessage({ result:false, message:'privateKey.algorithm.hash should be undefined' });
+        else if (privateKey.usages.toString() != &quot;decrypt&quot;)
+            postMessage({ result:false, message:'privateKey.usages should be [&quot;decrypt&quot;]' });
+        else
+            postMessage({ result:true, privateKey:privateKey });
+    } else {
+        postMessage({ result:false, message:'key is ' + key });
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersrsapostMessageworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/rsa-postMessage-worker-expected.txt (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/rsa-postMessage-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/rsa-postMessage-worker-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+Test sending rsa crypto keys via postMessage to a worker.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS All checks passed in worker for private key
+PASS privateKey.type is 'private'
+PASS privateKey.extractable is false
+PASS privateKey.algorithm.name is 'RSAES-PKCS1-v1_5'
+PASS privateKey.algorithm.modulusLength is 2048
+PASS bytesToHexString(privateKey.algorithm.publicExponent) is '010001'
+PASS privateKey.algorithm.hash is undefined.
+PASS privateKey.usages is ['decrypt']
+PASS All checks passed in worker for public key
+PASS publicKey.type is 'public'
+PASS publicKey.extractable is true
+PASS publicKey.algorithm.name is 'RSAES-PKCS1-v1_5'
+PASS publicKey.algorithm.modulusLength is 2048
+PASS bytesToHexString(publicKey.algorithm.publicExponent) is '010001'
+PASS publicKey.algorithm.hash is undefined.
+PASS publicKey.usages is ['encrypt']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkersrsapostMessageworkerhtmlfromrev206626trunkLayoutTestscryptosubtlersassapkcs1v1_5importjwkhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/workers/rsa-postMessage-worker.html (from rev 206626, trunk/LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html) (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/rsa-postMessage-worker.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/rsa-postMessage-worker.html        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+description(&quot;Test sending rsa crypto keys via postMessage to a worker.&quot;);
+
+jsTestIsAsync = true;
+
+var publicKeyJSON = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA1_5&quot;,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+
+var privateKeyJSON = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA1_5&quot;,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;,
+    d: &quot;eNLS37aCz7RXSNPD_DtLBJ6j5T8cSxdzRBCjPaI6WcGqJp16lq3UTwuoDLAqlA9oGYm238dsIWpuucP_lQtbWe-7SpxoI6_vmYGf7YVUHv1-DF9qiOmSrMmdxMnVOzYXY8RaT6thPjn_J5cfLV2xI_LwsrMtmpdSyNlgX0zTUhwtuahgAKMEChYjH2EnjHdHw6sY2-wApdcQI7ULE0oo5RzbQZpmuhcN9hiBc0L3hhF0qo50mbl02_65_GQ7DpVkXBxNgRBLzlPabmzzG2oAhfefLgYmSC1opaCkXE6vRWQNWNL45RZNZFYM3uoJghOMqGeocM0BpjdChHrPOlFvSQ&quot;,
+    p: &quot;4miTuAjKMeH5uJ5KB397QUwhbkYEgSbcA2mifmSkvE2018gb55qkBHK1eVryf1_m43LNlc6O_ak6gfzdZIZvS5NCGjPl0q09plUpu8qFOSspBwA67qGH76lFlZLn_d4yglS7wfLru4_5Ys8qLLs-DqVLviwposOnyyWqwM5AXp0&quot;,
+    q: &quot;xHYrzkivtmnz_sGchnWGc0q-pDOkKicptRpv2pMFIIXxnFX5aMeEXIZjVujXtwUy1UlFIN2GZJSvy5KJ79mu_XyNnFHMzedH-A3ee3u8h1UUrZF-vUu1_e4U_x67NN1dedzUSKynN7pFl3OkuShMBWGV-cwzOPdcVAfVuZlxUMc&quot;,
+    dp: &quot;fBzDzYDUBmBQGop7Hn0dvf_T27V6RqpctWo074CQZcFbP2atFVtKSj3viWT3xid2VHzcgiDHdfpM3nEVlEO1wwIonGCSvdjGEOZiiFVOjrZAOVxA8guOjyyFvqbXke06VwPIIVvfKeSU2zuhbP__1tt6F_fxow4Kb2xonGT0GGk&quot;,
+    dq: &quot;jmE2DiIPdhwDgLXAQpIaBqQ81bO3XfVT_LRULAwwwwlPuQV148H04zlh9TJ6Y2GZHYokV1U0eOBpJxfkb7dLYtpJpuiBjRf4yIUEoGlkkI_QlJnFSFr-YjGRdfNHqWBkxlSMZL770R9mIATndGkH7z5x-r9KwBZFC4FCG2hg_zE&quot;,
+    qi: &quot;YCX_pLwbMBA1ThVH0WcwmnytqNcrMCEwTm7ByA2eU6nWbQrULvf7m9_kzfLUcjsnpAVlBQG5JMXMy0Sq4ptwbywsa5-G8KAOOOR2L3v4hC-Eys9ftgFM_3i0o40eeQH4b3haPbntrIeMg8IzlOuVYKf9-2QuKDoWeRdd7NsdxTk&quot;
+};
+
+var algorithmKeyGen = {
+    name: &quot;RSAES-PKCS1-v1_5&quot;,
+    // RsaKeyGenParams
+    modulusLength: 2048,
+    publicExponent: new Uint8Array([0x01, 0x00, 0x01]),  // Equivalent to 65537
+};
+
+var count = 0;
+var worker = new Worker(&quot;resources/rsa-postMessage-worker.js&quot;);
+worker.onmessage = function(evt) {
+    if (!evt.data.result) {
+        testFailed(&quot;Check failed in worker: &quot; + evt.data.message);
+        finishJSTest();
+    } else {
+        if (publicKey = evt.data.publicKey) {
+            testPassed(&quot;All checks passed in worker for public key&quot;);
+            shouldBe(&quot;publicKey.type&quot;, &quot;'public'&quot;);
+            shouldBe(&quot;publicKey.extractable&quot;, &quot;true&quot;);
+            shouldBe(&quot;publicKey.algorithm.name&quot;, &quot;'RSAES-PKCS1-v1_5'&quot;);
+            shouldBe(&quot;publicKey.algorithm.modulusLength&quot;, &quot;2048&quot;);
+            shouldBe(&quot;bytesToHexString(publicKey.algorithm.publicExponent)&quot;, &quot;'010001'&quot;);
+            shouldBeUndefined(&quot;publicKey.algorithm.hash&quot;);
+            shouldBe(&quot;publicKey.usages&quot;, &quot;['encrypt']&quot;);
+        } else if (privateKey = evt.data.privateKey) {
+            testPassed(&quot;All checks passed in worker for private key&quot;);
+            shouldBe(&quot;privateKey.type&quot;, &quot;'private'&quot;);
+            shouldBe(&quot;privateKey.extractable&quot;, &quot;false&quot;);
+            shouldBe(&quot;privateKey.algorithm.name&quot;, &quot;'RSAES-PKCS1-v1_5'&quot;);
+            shouldBe(&quot;privateKey.algorithm.modulusLength&quot;, &quot;2048&quot;);
+            shouldBe(&quot;bytesToHexString(privateKey.algorithm.publicExponent)&quot;, &quot;'010001'&quot;);
+            shouldBeUndefined(&quot;privateKey.algorithm.hash&quot;);
+            shouldBe(&quot;privateKey.usages&quot;, &quot;['decrypt']&quot;);
+        }
+        count = count + 1;
+    }
+
+    if (count == 2)
+        finishJSTest();
+}
+
+crypto.subtle.importKey(&quot;jwk&quot;, asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
+    worker.postMessage({ publicKey: localPublicKey });
+});
+crypto.subtle.importKey(&quot;jwk&quot;, asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
+    worker.postMessage({ privateKey: localPrivateKey });
+});
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdomglobalconstructorsattributesdedicatedworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -39,6 +39,11 @@
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Crypto').hasOwnProperty('set') is false
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Crypto').enumerable is false
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Crypto').configurable is true
</span><ins>+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CryptoKey').value is CryptoKey
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CryptoKey').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CryptoKey').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CryptoKey').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CryptoKey').configurable is true
</ins><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMException').value is DOMException
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMException').hasOwnProperty('get') is false
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMException').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/Source/WebCore/ChangeLog        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-09-29  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
+
+        Expose CryptoKey to web workers
+        https://bugs.webkit.org/show_bug.cgi?id=162640
+        &lt;rdar://problem/28182204&gt;
+
+        Reviewed by Brent Fulgham.
+
+        Tests: crypto/workers/aes-postMessage-worker.html
+               crypto/workers/hmac-postMessage-worker.html
+               crypto/workers/hrsa-postMessage-worker.html
+               crypto/workers/multiple-postMessage-worker.html
+               crypto/workers/rsa-postMessage-worker.html
+
+        * crypto/CryptoKey.idl:
+        * crypto/SerializedCryptoKeyWrap.h:
+        * crypto/mac/SerializedCryptoKeyWrapMac.mm:
+        (WebCore::deleteDefaultWebCryptoMasterKey):
+        Add a way to delete the default web crypto master key such that we can test
+        these APIs and cleanup.
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::wrapCryptoKey):
+        (WebCore::WorkerGlobalScope::unwrapCryptoKey):
+        * workers/WorkerGlobalScope.h:
+
</ins><span class="cx"> 2016-09-29  Nan Wang  &lt;n_wang@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: iOS: Tapping &lt;input&gt; in Safari zooms in a bit when page has max scale = 1
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoKeyidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoKey.idl (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoKey.idl        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/Source/WebCore/crypto/CryptoKey.idl        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=SUBTLE_CRYPTO,
</span><ins>+    Exposed=(Window,Worker),
</ins><span class="cx">     GenerateIsReachable=Impl,
</span><span class="cx">     SkipVTableValidation
</span><span class="cx"> ] interface CryptoKey {
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoSerializedCryptoKeyWraph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/SerializedCryptoKeyWrap.h (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/SerializedCryptoKeyWrap.h        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/Source/WebCore/crypto/SerializedCryptoKeyWrap.h        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -33,7 +33,15 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+// The purpose of the following APIs is to protect serialized CryptoKey data in IndexedDB or
+// any other local storage that go through the structured clone algorithm. However, a side effect
+// of this extra layer of protection is redundant communications between mainThread(document) and
+// workerThreads. Please refer to WorkerGlobalScope for detailed explanation. P.S. This extra layer
+// of protection is not required by the spec as of 11 December 2014:
+// https://www.w3.org/TR/WebCryptoAPI/#security-developers
+
</ins><span class="cx"> WEBCORE_EXPORT bool getDefaultWebCryptoMasterKey(Vector&lt;uint8_t&gt;&amp;);
</span><ins>+WEBCORE_EXPORT bool deleteDefaultWebCryptoMasterKey();
</ins><span class="cx"> 
</span><span class="cx"> WEBCORE_EXPORT bool wrapSerializedCryptoKey(const Vector&lt;uint8_t&gt;&amp; masterKey, const Vector&lt;uint8_t&gt;&amp; key, Vector&lt;uint8_t&gt;&amp; result);
</span><span class="cx"> WEBCORE_EXPORT bool unwrapSerializedCryptoKey(const Vector&lt;uint8_t&gt;&amp; masterKey, const Vector&lt;uint8_t&gt;&amp; wrappedKey, Vector&lt;uint8_t&gt;&amp; key);
</span></span></pre></div>
<a id="trunkSourceWebCorecryptomacSerializedCryptoKeyWrapMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -169,6 +169,22 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool deleteDefaultWebCryptoMasterKey()
+{
+    NSDictionary *query = @{
+        (id)kSecClass : (id)kSecClassGenericPassword,
+        (id)kSecAttrAccount : masterKeyAccountNameForCurrentApplication(),
+    };
+
+    OSStatus status = SecItemDelete((CFDictionaryRef)query);
+    if (status) {
+        if (status != errSecItemNotFound &amp;&amp; status != errSecUserCanceled)
+            WTFLogAlways(&quot;Could not delete WebCrypto master key in Keychain, error %d&quot;, (int)status);
+        return false;
+    }
+    return true;
+}
+
</ins><span class="cx"> bool wrapSerializedCryptoKey(const Vector&lt;uint8_t&gt;&amp; masterKey, const Vector&lt;uint8_t&gt;&amp; key, Vector&lt;uint8_t&gt;&amp; result)
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;uint8_t&gt; kek(16);
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> #include &quot;SecurityOriginPolicy.h&quot;
</span><span class="cx"> #include &quot;SocketProvider.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><ins>+#include &quot;WorkerLoaderProxy.h&quot;
</ins><span class="cx"> #include &quot;WorkerLocation.h&quot;
</span><span class="cx"> #include &quot;WorkerNavigator.h&quot;
</span><span class="cx"> #include &quot;WorkerObjectProxy.h&quot;
</span><span class="lines">@@ -383,14 +384,40 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><del>-bool WorkerGlobalScope::wrapCryptoKey(const Vector&lt;uint8_t&gt;&amp;, Vector&lt;uint8_t&gt;&amp;)
</del><ins>+bool WorkerGlobalScope::wrapCryptoKey(const Vector&lt;uint8_t&gt;&amp; key, Vector&lt;uint8_t&gt;&amp; wrappedKey)
</ins><span class="cx"> {
</span><del>-    return false;
</del><ins>+    bool result = false, done = false;
+    m_thread.workerLoaderProxy().postTaskToLoader([&amp;result, &amp;key, &amp;wrappedKey, &amp;done, workerGlobalScope = this](ScriptExecutionContext&amp; context) {
+        result = context.wrapCryptoKey(key, wrappedKey);
+        done = true;
+        workerGlobalScope-&gt;postTask([](ScriptExecutionContext&amp; context) {
+            ASSERT_UNUSED(context, context.isWorkerGlobalScope());
+        });
+    });
+
+    MessageQueueWaitResult waitResult = MessageQueueMessageReceived;
+    while (!done &amp;&amp; waitResult != MessageQueueTerminated)
+        waitResult = m_thread.runLoop().runInMode(this, WorkerRunLoop::defaultMode());
+
+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WorkerGlobalScope::unwrapCryptoKey(const Vector&lt;uint8_t&gt;&amp;, Vector&lt;uint8_t&gt;&amp;)
</del><ins>+bool WorkerGlobalScope::unwrapCryptoKey(const Vector&lt;uint8_t&gt;&amp; wrappedKey, Vector&lt;uint8_t&gt;&amp; key)
</ins><span class="cx"> {
</span><del>-    return false;
</del><ins>+    bool result = false, done = false;
+    m_thread.workerLoaderProxy().postTaskToLoader([&amp;result, &amp;wrappedKey, &amp;key, &amp;done, workerGlobalScope = this](ScriptExecutionContext&amp; context) {
+        result = context.unwrapCryptoKey(wrappedKey, key);
+        done = true;
+        workerGlobalScope-&gt;postTask([](ScriptExecutionContext&amp; context) {
+            ASSERT_UNUSED(context, context.isWorkerGlobalScope());
+        });
+    });
+
+    MessageQueueWaitResult waitResult = MessageQueueMessageReceived;
+    while (!done &amp;&amp; waitResult != MessageQueueTerminated)
+        waitResult = m_thread.runLoop().runInMode(this, WorkerRunLoop::defaultMode());
+
+    return result;
</ins><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.h        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -145,8 +145,15 @@
</span><span class="cx">     void addConsoleMessage(MessageSource, MessageLevel, const String&amp; message, unsigned long requestIdentifier = 0) override;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><del>-    bool wrapCryptoKey(const Vector&lt;uint8_t&gt;&amp; key, Vector&lt;uint8_t&gt;&amp; wrappedKey) override;
-    bool unwrapCryptoKey(const Vector&lt;uint8_t&gt;&amp; wrappedKey, Vector&lt;uint8_t&gt;&amp; key) override;
</del><ins>+    // The following two functions are side effects of providing extra protection to serialized
+    // CryptoKey data that went through the structured clone algorithm to local storage such as
+    // IndexedDB. They don't provide any proctection against communications between mainThread
+    // and workerThreads. In fact, they cause extra expense as workerThreads cannot talk to clients
+    // to unwrap/wrap crypto keys. Hence, workerThreads must always ask mainThread to unwrap/wrap
+    // keys, which results in a second communication and plain keys being transferred between
+    // workerThreads and the mainThread.
+    bool wrapCryptoKey(const Vector&lt;uint8_t&gt;&amp; key, Vector&lt;uint8_t&gt;&amp; wrappedKey) final;
+    bool unwrapCryptoKey(const Vector&lt;uint8_t&gt;&amp; wrappedKey, Vector&lt;uint8_t&gt;&amp; key) final;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     Crypto&amp; crypto() const;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/Tools/ChangeLog        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-09-29  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
+
+        Expose CryptoKey to web workers
+        https://bugs.webkit.org/show_bug.cgi?id=162640
+        &lt;rdar://problem/28182204&gt;
+
+        Reviewed by Brent Fulgham.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebCore/SerializedCryptoKeyWrap.mm: Added.
+        (TestWebKitAPI::TEST_F):
+        Add API tests for SerializedCryptoKeyWrap APIs.
+
</ins><span class="cx"> 2016-09-29  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix syntax violation handling in IPv4 address parsing
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (206626 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-09-30 00:38:18 UTC (rev 206626)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -142,6 +142,7 @@
</span><span class="cx">                 5714ECB91CA8B5B000051AC8 /* DownloadRequestOriginalURL.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5714ECB81CA8B58800051AC8 /* DownloadRequestOriginalURL.html */; };
</span><span class="cx">                 5714ECBB1CA8BFE400051AC8 /* DownloadRequestOriginalURLFrame.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5714ECBA1CA8BFD100051AC8 /* DownloadRequestOriginalURLFrame.html */; };
</span><span class="cx">                 5714ECBD1CA8C22A00051AC8 /* DownloadRequestOriginalURL2.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5714ECBC1CA8C21800051AC8 /* DownloadRequestOriginalURL2.html */; };
</span><ins>+                5769C50B1D9B0002000847FB /* SerializedCryptoKeyWrap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5769C50A1D9B0001000847FB /* SerializedCryptoKeyWrap.mm */; };
</ins><span class="cx">                 57901FB11CAF142D00ED64F9 /* LoadInvalidURLRequest.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 57901FB01CAF141C00ED64F9 /* LoadInvalidURLRequest.html */; };
</span><span class="cx">                 57F56A5C1C7F8CC100F31D7E /* IsNavigationActionTrusted.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 57F56A5B1C7F8A4000F31D7E /* IsNavigationActionTrusted.html */; };
</span><span class="cx">                 5C2936931D5BF70D00DEAB1E /* CookieAcceptPolicy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C2936911D5BF63E00DEAB1E /* CookieAcceptPolicy.mm */; };
</span><span class="lines">@@ -910,6 +911,7 @@
</span><span class="cx">                 5714ECB81CA8B58800051AC8 /* DownloadRequestOriginalURL.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DownloadRequestOriginalURL.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5714ECBA1CA8BFD100051AC8 /* DownloadRequestOriginalURLFrame.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DownloadRequestOriginalURLFrame.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5714ECBC1CA8C21800051AC8 /* DownloadRequestOriginalURL2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DownloadRequestOriginalURL2.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                5769C50A1D9B0001000847FB /* SerializedCryptoKeyWrap.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedCryptoKeyWrap.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 57901FAC1CAF12C200ED64F9 /* LoadInvalidURLRequest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadInvalidURLRequest.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 57901FAE1CAF137100ED64F9 /* LoadInvalidURLRequest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadInvalidURLRequest.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 57901FB01CAF141C00ED64F9 /* LoadInvalidURLRequest.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = LoadInvalidURLRequest.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2013,6 +2015,7 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 93A7EB3C18FA63A4009E7670 /* URLExtras.mm */,
</span><span class="cx">                                 CD89D0381C4EDB2A00040A04 /* WebCoreNSURLSession.mm */,
</span><ins>+                                5769C50A1D9B0001000847FB /* SerializedCryptoKeyWrap.mm */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = cocoa;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -2412,6 +2415,7 @@
</span><span class="cx">                                 7CCE7F051A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutFrames.cpp in Sources */,
</span><span class="cx">                                 7CCE7F251A411AF600447C4C /* OpenAndCloseWindow.mm in Sources */,
</span><span class="cx">                                 7CCB4DA91C83AE7300CC6918 /* PageGroup.cpp in Sources */,
</span><ins>+                                5769C50B1D9B0002000847FB /* SerializedCryptoKeyWrap.mm in Sources */,
</ins><span class="cx">                                 7CCE7F071A411AE600447C4C /* PageLoadBasic.cpp in Sources */,
</span><span class="cx">                                 7CCE7F081A411AE600447C4C /* PageLoadDidChangeLocationWithinPageForFrame.cpp in Sources */,
</span><span class="cx">                                 7CCE7EC71A411A7E00447C4C /* PageVisibilityStateWithWindowChanges.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreSerializedCryptoKeyWrapmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebCore/SerializedCryptoKeyWrap.mm (0 => 206627)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/SerializedCryptoKeyWrap.mm                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/SerializedCryptoKeyWrap.mm        2016-09-30 00:47:21 UTC (rev 206627)
</span><span class="lines">@@ -0,0 +1,101 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+
+#import &lt;WebCore/SerializedCryptoKeyWrap.h&gt;
+#import &lt;wtf/MainThread.h&gt;
+
+namespace TestWebKitAPI {
+
+// TODO: We should enable the following tests on iOS simulator once &lt;rdar://problem/28534666&gt; is fixed.
+// A seperate bug is filed about this: &lt;rdar://problem/28507240&gt;.
+#if !PLATFORM(IOS)
+class SerializedCryptoKeyWrapTest : public testing::Test {
+public:
+    virtual void SetUp()
+    {
+        WTF::initializeMainThread();
+        WebCore::deleteDefaultWebCryptoMasterKey();
+    }
+
+    virtual void TearDown()
+    {
+        WebCore::deleteDefaultWebCryptoMasterKey();
+    }
+};
+
+TEST_F(SerializedCryptoKeyWrapTest, GetDefaultWebCryptoMasterKey)
+{
+    Vector&lt;uint8_t&gt; masterKey1;
+    EXPECT_TRUE(WebCore::getDefaultWebCryptoMasterKey(masterKey1));
+
+    Vector&lt;uint8_t&gt; masterKey2;
+    EXPECT_TRUE(WebCore::getDefaultWebCryptoMasterKey(masterKey2));
+
+    EXPECT_TRUE(masterKey1 == masterKey2);
+}
+
+TEST_F(SerializedCryptoKeyWrapTest, DeleteDefaultWebCryptoMasterKey)
+{
+    Vector&lt;uint8_t&gt; masterKey1;
+    EXPECT_TRUE(WebCore::getDefaultWebCryptoMasterKey(masterKey1));
+    EXPECT_TRUE(WebCore::deleteDefaultWebCryptoMasterKey());
+
+    Vector&lt;uint8_t&gt; masterKey2;
+    EXPECT_TRUE(WebCore::getDefaultWebCryptoMasterKey(masterKey2));
+
+    EXPECT_TRUE(masterKey1 != masterKey2);
+}
+
+TEST_F(SerializedCryptoKeyWrapTest, SerializedCryptoKeyWrapUnwrap)
+{
+    Vector&lt;uint8_t&gt; masterKey;
+    EXPECT_TRUE(WebCore::getDefaultWebCryptoMasterKey(masterKey));
+
+    Vector&lt;uint8_t&gt; cryptoKey(16, 1);
+    Vector&lt;uint8_t&gt; wrappedKey;
+    EXPECT_TRUE(WebCore::wrapSerializedCryptoKey(masterKey, cryptoKey, wrappedKey));
+    EXPECT_TRUE(cryptoKey != wrappedKey);
+    // ensure wrappedKey doesn't contain cryptoKey
+    bool notContained = true;
+    size_t limit = wrappedKey.size() - cryptoKey.size() + 1;
+    for (size_t i = 0; i &lt; limit; i++) {
+        size_t j = 0;
+        for (; j &lt; cryptoKey.size() &amp;&amp; wrappedKey[i + j] == cryptoKey[j]; j++) { }
+        if (j &gt;= cryptoKey.size()) {
+            notContained = false;
+            break;
+        }
+    }
+    EXPECT_TRUE(notContained);
+
+    Vector&lt;uint8_t&gt; unwrappedKey;
+    EXPECT_TRUE(WebCore::unwrapSerializedCryptoKey(masterKey, wrappedKey, unwrappedKey));
+    EXPECT_TRUE(unwrappedKey == cryptoKey);
+}
+#endif
+
+} // namespace TestWebKitAPI
</ins></span></pre>
</div>
</div>

</body>
</html>