<!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>[209564] trunk/LayoutTests</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/209564">209564</a></dd>
<dt>Author</dt> <dd>jiewen_tan@apple.com</dd>
<dt>Date</dt> <dd>2016-12-08 13:42:53 -0800 (Thu, 08 Dec 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[WebCrypto] Replace webkitSubtle with subtle for all crypto/workers/subtle/ tests
https://bugs.webkit.org/show_bug.cgi?id=165540
Reviewed by Brent Fulgham.
* crypto/workers/subtle/aes-postMessage-worker.html:
* crypto/workers/subtle/hmac-postMessage-worker.html:
* crypto/workers/subtle/hrsa-postMessage-worker-expected.txt:
* crypto/workers/subtle/hrsa-postMessage-worker.html:
* crypto/workers/subtle/multiple-postMessage-worker.html:
* crypto/workers/subtle/resources/hrsa-postMessage-worker.js:
* crypto/workers/subtle/rsa-postMessage-worker.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaespostMessageworkerhtml">trunk/LayoutTests/crypto/workers/subtle/aes-postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlehmacpostMessageworkerhtml">trunk/LayoutTests/crypto/workers/subtle/hmac-postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlehrsapostMessageworkerexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlehrsapostMessageworkerhtml">trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlemultiplepostMessageworkerhtml">trunk/LayoutTests/crypto/workers/subtle/multiple-postMessage-worker.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourceshrsapostMessageworkerjs">trunk/LayoutTests/crypto/workers/subtle/resources/hrsa-postMessage-worker.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtlersapostMessageworkerhtml">trunk/LayoutTests/crypto/workers/subtle/rsa-postMessage-worker.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209563 => 209564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-08 21:42:24 UTC (rev 209563)
+++ trunk/LayoutTests/ChangeLog        2016-12-08 21:42:53 UTC (rev 209564)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-12-08 Jiewen Tan <jiewen_tan@apple.com>
+
+ [WebCrypto] Replace webkitSubtle with subtle for all crypto/workers/subtle/ tests
+ https://bugs.webkit.org/show_bug.cgi?id=165540
+
+ Reviewed by Brent Fulgham.
+
+ * crypto/workers/subtle/aes-postMessage-worker.html:
+ * crypto/workers/subtle/hmac-postMessage-worker.html:
+ * crypto/workers/subtle/hrsa-postMessage-worker-expected.txt:
+ * crypto/workers/subtle/hrsa-postMessage-worker.html:
+ * crypto/workers/subtle/multiple-postMessage-worker.html:
+ * crypto/workers/subtle/resources/hrsa-postMessage-worker.js:
+ * crypto/workers/subtle/rsa-postMessage-worker.html:
+
</ins><span class="cx"> 2016-12-08 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Rebaseline some css tests for ios-simulator.
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaespostMessageworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/workers/subtle/aes-postMessage-worker.html (209563 => 209564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-postMessage-worker.html        2016-12-08 21:42:24 UTC (rev 209563)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-postMessage-worker.html        2016-12-08 21:42:53 UTC (rev 209564)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">
</span><span class="cx"> jsTestIsAsync = true;
</span><span class="cx">
</span><del>-crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(localKey) {
</del><ins>+crypto.subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: "aes-cbc", length: 128}, true, ["encrypt", "decrypt"]).then(function(localKey) {
</ins><span class="cx"> var worker = new Worker("resources/aes-postMessage-worker.js");
</span><span class="cx"> worker.onmessage = function(evt) {
</span><span class="cx"> if (!evt.data.result) {
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlehmacpostMessageworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/workers/subtle/hmac-postMessage-worker.html (209563 => 209564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/hmac-postMessage-worker.html        2016-12-08 21:42:24 UTC (rev 209563)
+++ trunk/LayoutTests/crypto/workers/subtle/hmac-postMessage-worker.html        2016-12-08 21:42:53 UTC (rev 209564)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">
</span><span class="cx"> jsTestIsAsync = true;
</span><span class="cx">
</span><del>-crypto.webkitSubtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(localKey) {
</del><ins>+crypto.subtle.importKey("raw", asciiToUint8Array("16 bytes of key!"), {name: 'hmac', hash: {name: 'sha-1'}}, true, ['sign', 'verify']).then(function(localKey) {
</ins><span class="cx"> var worker = new Worker("resources/hmac-postMessage-worker.js");
</span><span class="cx"> worker.onmessage = function(evt) {
</span><span class="cx"> if (!evt.data.result) {
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlehrsapostMessageworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker-expected.txt (209563 => 209564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker-expected.txt        2016-12-08 21:42:24 UTC (rev 209563)
+++ trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker-expected.txt        2016-12-08 21:42:53 UTC (rev 209564)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> PASS privateKey.algorithm.modulusLength is 2048
</span><span class="cx"> PASS bytesToHexString(privateKey.algorithm.publicExponent) is '010001'
</span><span class="cx"> PASS privateKey.algorithm.hash.name is 'SHA-256'
</span><del>-PASS privateKey.usages is ['decrypt']
</del><ins>+PASS privateKey.usages is ['sign']
</ins><span class="cx"> PASS All checks passed in worker for public key
</span><span class="cx"> PASS publicKey.type is 'public'
</span><span class="cx"> PASS publicKey.extractable is true
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> PASS publicKey.algorithm.modulusLength is 2048
</span><span class="cx"> PASS bytesToHexString(publicKey.algorithm.publicExponent) is '010001'
</span><span class="cx"> PASS publicKey.algorithm.hash.name is 'SHA-256'
</span><del>-PASS publicKey.usages is ['encrypt']
</del><ins>+PASS publicKey.usages is ['verify']
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlehrsapostMessageworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker.html (209563 => 209564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker.html        2016-12-08 21:42:24 UTC (rev 209563)
+++ trunk/LayoutTests/crypto/workers/subtle/hrsa-postMessage-worker.html        2016-12-08 21:42:53 UTC (rev 209564)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> // RsaKeyGenParams
</span><span class="cx"> modulusLength: 2048,
</span><span class="cx"> publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // Equivalent to 65537
</span><ins>+ hash: "sha-256",
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> var count = 0;
</span><span class="lines">@@ -54,7 +55,7 @@
</span><span class="cx"> shouldBe("publicKey.algorithm.modulusLength", "2048");
</span><span class="cx"> shouldBe("bytesToHexString(publicKey.algorithm.publicExponent)", "'010001'");
</span><span class="cx"> shouldBe("publicKey.algorithm.hash.name", "'SHA-256'");
</span><del>- shouldBe("publicKey.usages", "['encrypt']");
</del><ins>+ shouldBe("publicKey.usages", "['verify']");
</ins><span class="cx"> } else if (privateKey = evt.data.privateKey) {
</span><span class="cx"> testPassed("All checks passed in worker for private key");
</span><span class="cx"> shouldBe("privateKey.type", "'private'");
</span><span class="lines">@@ -63,7 +64,7 @@
</span><span class="cx"> shouldBe("privateKey.algorithm.modulusLength", "2048");
</span><span class="cx"> shouldBe("bytesToHexString(privateKey.algorithm.publicExponent)", "'010001'");
</span><span class="cx"> shouldBe("privateKey.algorithm.hash.name", "'SHA-256'");
</span><del>- shouldBe("privateKey.usages", "['decrypt']");
</del><ins>+ shouldBe("privateKey.usages", "['sign']");
</ins><span class="cx"> }
</span><span class="cx"> count = count + 1;
</span><span class="cx"> }
</span><span class="lines">@@ -72,10 +73,10 @@
</span><span class="cx"> finishJSTest();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
</del><ins>+crypto.subtle.importKey("jwk", publicKeyJSON, algorithmKeyGen, true, ['verify']).then(function(localPublicKey) {
</ins><span class="cx"> worker.postMessage({ publicKey: localPublicKey });
</span><span class="cx"> });
</span><del>-crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
</del><ins>+crypto.subtle.importKey("jwk", privateKeyJSON, algorithmKeyGen, false, ['sign']).then(function(localPrivateKey) {
</ins><span class="cx"> worker.postMessage({ privateKey: localPrivateKey });
</span><span class="cx"> });
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlemultiplepostMessageworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/workers/subtle/multiple-postMessage-worker.html (209563 => 209564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/multiple-postMessage-worker.html        2016-12-08 21:42:24 UTC (rev 209563)
+++ trunk/LayoutTests/crypto/workers/subtle/multiple-postMessage-worker.html        2016-12-08 21:42:53 UTC (rev 209564)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> var aesKeyGenParams = {name: "aes-cbc", length: 128};
</span><span class="cx"> var usages = ["encrypt", "decrypt"]
</span><span class="cx"> for (i = 0; i < 10; i++)
</span><del>- crypto.webkitSubtle.importKey(keyFormat, keyData, aesKeyGenParams, true, usages).then(function(localKey) {
</del><ins>+ crypto.subtle.importKey(keyFormat, keyData, aesKeyGenParams, true, usages).then(function(localKey) {
</ins><span class="cx"> worker.postMessage(localKey);
</span><span class="cx"> });
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourceshrsapostMessageworkerjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/workers/subtle/resources/hrsa-postMessage-worker.js (209563 => 209564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/hrsa-postMessage-worker.js        2016-12-08 21:42:24 UTC (rev 209563)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/hrsa-postMessage-worker.js        2016-12-08 21:42:53 UTC (rev 209564)
</span><span class="lines">@@ -15,8 +15,8 @@
</span><span class="cx"> postMessage({ result:false, message:'publicKey.algorithm.publicExponent should be "010001"' });
</span><span class="cx"> else if (publicKey.algorithm.hash.name != "SHA-256")
</span><span class="cx"> postMessage({ result:false, message:'publicKey.algorithm.hash.name should be "SHA-256"' });
</span><del>- else if (publicKey.usages.toString() != "encrypt")
- postMessage({ result:false, message:'publicKey.usages should be ["encrypt"]' });
</del><ins>+ else if (publicKey.usages.toString() != "verify")
+ postMessage({ result:false, message:'publicKey.usages should be ["verify"]' });
</ins><span class="cx"> else
</span><span class="cx"> postMessage({ result:true, publicKey:publicKey });
</span><span class="cx"> } else if (privateKey = evt.data.privateKey) {
</span><span class="lines">@@ -32,8 +32,8 @@
</span><span class="cx"> postMessage({ result:false, message:'privateKey.algorithm.publicExponent should be "010001"' });
</span><span class="cx"> else if (privateKey.algorithm.hash.name != "SHA-256")
</span><span class="cx"> postMessage({ result:false, message:'publicKey.algorithm.hash.name should be "SHA-256"' });
</span><del>- else if (privateKey.usages.toString() != "decrypt")
- postMessage({ result:false, message:'privateKey.usages should be ["decrypt"]' });
</del><ins>+ else if (privateKey.usages.toString() != "sign")
+ postMessage({ result:false, message:'privateKey.usages should be ["sign"]' });
</ins><span class="cx"> else
</span><span class="cx"> postMessage({ result:true, privateKey:privateKey });
</span><span class="cx"> } else {
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtlersapostMessageworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/workers/subtle/rsa-postMessage-worker.html (209563 => 209564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/rsa-postMessage-worker.html        2016-12-08 21:42:24 UTC (rev 209563)
+++ trunk/LayoutTests/crypto/workers/subtle/rsa-postMessage-worker.html        2016-12-08 21:42:53 UTC (rev 209564)
</span><span class="lines">@@ -72,10 +72,10 @@
</span><span class="cx"> finishJSTest();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(publicKeyJSON)), algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
</del><ins>+crypto.subtle.importKey("jwk", publicKeyJSON, algorithmKeyGen, true, ['encrypt']).then(function(localPublicKey) {
</ins><span class="cx"> worker.postMessage({ publicKey: localPublicKey });
</span><span class="cx"> });
</span><del>-crypto.webkitSubtle.importKey("jwk", asciiToUint8Array(JSON.stringify(privateKeyJSON)), algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
</del><ins>+crypto.subtle.importKey("jwk", privateKeyJSON, algorithmKeyGen, false, ['decrypt']).then(function(localPrivateKey) {
</ins><span class="cx"> worker.postMessage({ privateKey: localPrivateKey });
</span><span class="cx"> });
</span><span class="cx"> </script>
</span></span></pre>
</div>
</div>
</body>
</html>