From fbb0aae478a9fee85adabb5b274b0a92bbe82948 Mon Sep 17 00:00:00 2001 From: "Volodymyr Klymenko ext:(%3E)" Date: Fri, 14 Dec 2018 00:44:52 +0000 Subject: [PATCH] Bug 1508825 - Enable ESLint for dom/crypto/ (automatic changes) r=Standard8,Ehsan Differential Revision: https://phabricator.services.mozilla.com/D13693 --HG-- extra : moz-landing-system : lando --- dom/crypto/test/file_indexedDB.html | 10 +- dom/crypto/test/test-array.js | 40 ++-- dom/crypto/test/test-vectors.js | 90 ++++----- dom/crypto/test/test-worker.js | 6 +- dom/crypto/test/test_WebCrypto.html | 172 +++++++++--------- dom/crypto/test/test_WebCrypto_DH.html | 32 ++-- dom/crypto/test/test_WebCrypto_ECDH.html | 80 ++++---- dom/crypto/test/test_WebCrypto_ECDSA.html | 22 +-- dom/crypto/test/test_WebCrypto_HKDF.html | 32 ++-- ...Crypto_Import_Multiple_Identical_Keys.html | 10 +- dom/crypto/test/test_WebCrypto_JWK.html | 142 +++++++-------- dom/crypto/test/test_WebCrypto_Normalize.html | 6 +- dom/crypto/test/test_WebCrypto_PBKDF2.html | 26 +-- dom/crypto/test/test_WebCrypto_RSA_OAEP.html | 42 ++--- dom/crypto/test/test_WebCrypto_RSA_PSS.html | 42 ++--- ...Reject_Generating_Keys_Without_Usages.html | 14 +- .../test_WebCrypto_Structured_Cloning.html | 20 +- dom/crypto/test/test_WebCrypto_Workers.html | 10 +- .../test/test_WebCrypto_Wrap_Unwrap.html | 80 ++++---- dom/crypto/test/test_indexedDB.html | 4 +- dom/crypto/test/util.js | 16 +- 21 files changed, 448 insertions(+), 448 deletions(-) diff --git a/dom/crypto/test/file_indexedDB.html b/dom/crypto/test/file_indexedDB.html index 720a06dcdb6e..390b3f80dbf2 100644 --- a/dom/crypto/test/file_indexedDB.html +++ b/dom/crypto/test/file_indexedDB.html @@ -17,7 +17,7 @@ let request = indexedDB.open("keystore", 1); request.onerror = err(reject); - request.onsuccess = function (event) { + request.onsuccess = function(event) { db = event.target.result; resolve(); }; @@ -38,11 +38,11 @@ transaction.onabort = err(reject); transaction.onerror = err(reject); - transaction.oncomplete = function () { + transaction.oncomplete = function() { resolve(key); }; }); - }; + } function retrieveKey() { return new Promise((resolve, reject) => { @@ -52,7 +52,7 @@ cursor.onerror = err(reject); cursor.onabort = err(reject); - cursor.onsuccess = function (event) { + cursor.onsuccess = function(event) { try { let result = event.target.result; resolve(result && result.value); @@ -68,7 +68,7 @@ name: "RSASSA-PKCS1-v1_5", hash: "SHA-256", modulusLength: 1024, - publicExponent: new Uint8Array([0x01, 0x00, 0x01]) + publicExponent: new Uint8Array([0x01, 0x00, 0x01]), }; return crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]); diff --git a/dom/crypto/test/test-array.js b/dom/crypto/test/test-array.js index 1297f8eb8945..5dbe6bea50ae 100644 --- a/dom/crypto/test/test-array.js +++ b/dom/crypto/test/test-array.js @@ -62,7 +62,7 @@ function Test(name, test) { if (this.name) { this.row[0].innerHTML = this.name; var that = this; - this.row[0].onclick = function() { that.run(); } + this.row[0].onclick = function() { that.run(); }; } else { this.row[0] = ""; } @@ -75,12 +75,12 @@ function Test(name, test) { this.row[1].className = "fail"; this.row[1].innerHTML = "FAIL"; } else { - //this.row[1].innerHTML = ""; + // this.row[1].innerHTML = ""; this.row[1].innerHTML = this.result; } // Print the elapsed time, if known - if (this.startTime && this.endTime) { + if (this.startTime && this.endTime) { this.row[2].innerHTML = (this.endTime - this.startTime) + " ms"; } else { this.row[2].innerHTML = ""; @@ -128,7 +128,7 @@ var TestArray = { currTest: 0, worker: new Worker("test-worker.js"), - addTest: function(name, testFn) { + addTest(name, testFn) { // Give it a reference to the array var test = new Test(name, testFn); test.ta = this; @@ -140,19 +140,19 @@ var TestArray = { this.tests.push(new WorkerTest(this.worker, name, testFn)); }, - updateSummary: function() { + updateSummary() { this.pass = this.fail = this.pending = 0; - for (var i=0; i= this.tests.length) { @@ -189,10 +189,10 @@ var TestArray = { var self = this; this.tests[i].oncomplete = function() { self.runNextTest(); - } + }; this.tests[i].run(); - } -} + }, +}; if (window.addEventListener) { window.addEventListener("load", function() { TestArray.load(); } ); @@ -218,25 +218,25 @@ function error(test) { console.log("ERROR :: " + x); test.complete(false); throw x; - } + }; } function complete(test, valid) { return function(x) { - console.log("COMPLETE") + console.log("COMPLETE"); console.log(x); if (valid) { test.complete(valid(x)); } else { test.complete(true); } - } + }; } function memcmp_complete(test, value) { return function(x) { - console.log("COMPLETE") + console.log("COMPLETE"); console.log(x); test.memcmp_complete(value, x); - } + }; } diff --git a/dom/crypto/test/test-vectors.js b/dom/crypto/test/test-vectors.js index cabef4c734ea..ac4187e8490a 100644 --- a/dom/crypto/test/test-vectors.js +++ b/dom/crypto/test/test-vectors.js @@ -105,7 +105,7 @@ tv = { "feffe9928665731c6d6a8f9467308308"), key_jwk: { kty: "oct", - k: "_v_pkoZlcxxtao-UZzCDCP7_6ZKGZXMcbWqPlGcwgwg" + k: "_v_pkoZlcxxtao-UZzCDCP7_6ZKGZXMcbWqPlGcwgwg", }, iv: util.hex2abv("9313225df88406e555909c5aff5269aa" + "6a7a9538534f7da1e4c303d2a318a728" + @@ -295,7 +295,7 @@ tv = { dq: "Gos485j6cSBJiY1_t57gp3ZoeRKZzfoJ78DlB6yyHtdDAe9b_Ui-RV6utuFng" + "lWCdYCo5OjhQVHRUQqCo_LnKQ", qi: "JxVqukEm0kqB86Uoy_sn9WiG-ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2" + - "FhBlOshkKz4MrhH8To9JKefTQ" + "FhBlOshkKz4MrhH8To9JKefTQ", }, spki: util.hex2abv( "30819f300d06092a864886f70d010101050003818d0030818902818100a56e4a" + @@ -516,7 +516,7 @@ tv = { "8442e03da015b136e543f7ab07c0c13e4225b8de8cce25d4f6eb8400f81f7e18" + "33b7ee6e334d370964ca79fdb872b4d75223b5eeb08101591fb532d155a6de87" ), - saltLength: 20 + saltLength: 20, }, // [SigVerPSS_186-3.rsp] from @@ -541,7 +541,7 @@ tv = { "d2ab24f789b3464c5c43a256bbc1d692cf7f04801dac5bb401a4a03ab7d5728a" + "860c19e1a4dc797ca542c8203cec2e601eb0c51f567f2eda022b0b9ebddeeefa" ), - saltLength: 10 + saltLength: 10, }, // [SigVerPSS_186-3.rsp] from @@ -566,7 +566,7 @@ tv = { "9b41cdbd530c69d17cdbc84bc6b9830fc7dc8e1b2412cfe06dcf8c1a0cc3453f" + "93f25ebf10cb0c90334fac573f449138616e1a194c67f44efac34cc07a526267" ), - saltLength: 10 + saltLength: 10, }, // [SigVerPSS_186-3.rsp] from @@ -591,7 +591,7 @@ tv = { "6551cdf93197e9f8fb048044473ab41a801e9f7fc983c62b324361dade9f71a6" + "5952bd35c59faaa4d6ff462f68a6c4ec0b428aa47336f2178aeb276136563b7d" ), - saltLength: 10 + saltLength: 10, }, key_wrap_known_answer: { @@ -599,7 +599,7 @@ tv = { wrapping_key: util.hex2abv("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"), wrapping_iv: util.hex2abv("0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c"), wrapped_key: util.hex2abv("9ed0283a9a2b7e4292ebc5135e6342cc" + - "8a7f65802a1f6fd41bd3251c4da0c138") + "8a7f65802a1f6fd41bd3251c4da0c138"), }, // AES Key Wrap @@ -609,14 +609,14 @@ tv = { wrapping_key: { kty: "oct", alg: "A256KW", - k: "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8" + k: "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8", }, key: { kty: "oct", - k: "ABEiM0RVZneImaq7zN3u_w" + k: "ABEiM0RVZneImaq7zN3u_w", }, - wrapped_key: util.hex2abv("64e8c3f9ce0f5ba263e9777905818a2a"+ - "93c8191e7d6e8ae7") + wrapped_key: util.hex2abv("64e8c3f9ce0f5ba263e9777905818a2a" + + "93c8191e7d6e8ae7"), }, // RFC 6070 @@ -632,8 +632,8 @@ tv = { jwk: { kty: "oct", - k: "cGFzc3dvcmRQQVNTV09SRHBhc3N3b3Jk" - } + k: "cGFzc3dvcmRQQVNTV09SRHBhc3N3b3Jk", + }, }, // https://stackoverflow.com/questions/5130513/pbkdf2-hmac-sha2-test-vectors @@ -646,7 +646,7 @@ tv = { derived: util.hex2abv( "348c89dbcbd32b2f32d814b8116e84cf2b17347ebc1800181c4e2a1fb8dd53e1" + "c635518c7dac47e9" - ) + ), }, pbkdf2_sha256_no_salt: { @@ -656,7 +656,7 @@ tv = { iterations: 1, derived: util.hex2abv( - "ef29dd382fa66a83a95be7ccfb71f1ccfee494977855a4c260d90c2f8c91e062") + "ef29dd382fa66a83a95be7ccfb71f1ccfee494977855a4c260d90c2f8c91e062"), }, pbkdf2_sha256_no_pwd: { @@ -666,7 +666,7 @@ tv = { iterations: 1, derived: util.hex2abv( - "1635fa0f0542cc84f51207ff6cad5284aee3b0264faa55868eca95a7efd2335c") + "1635fa0f0542cc84f51207ff6cad5284aee3b0264faa55868eca95a7efd2335c"), }, broken_pkcs8: { @@ -684,7 +684,7 @@ tv = { "fd6d95e9cefcb0745763cddf564c87bcf4ba7928e74fd6a3080481f588d535e4" + "c026b58a21e1e5ec412ff241b436043e29173f1dc6cb943c09742de989547288" + "0416021442c6ee70beb7465928a1efe692d2281b8f7b53d6" - ) + ), }, // KASValidityTest_ECCEphemeralUnified_NOKC_ZZOnly_init.fax [EC] @@ -694,7 +694,7 @@ tv = { kty: "EC", crv: "P-256", x: "XOe4bjsyZgQD5jcS7wmY3q4QJ_rsPBvp92-TTf61jpg", - y: "9M8HWzlAXdHxresJAQftz7K0ljc52HZ54wVssFV9Ct8" + y: "9M8HWzlAXdHxresJAQftz7K0ljc52HZ54wVssFV9Ct8", }, jwk_priv: { @@ -702,7 +702,7 @@ tv = { crv: "P-256", d: "qq_LEzeJpR00KM5DQvL2MNtJcbi0KcGVcoPIHNnwm2A", x: "FNwJHA-FwnSx5tKXFV_iLN408gbKUHRV06WnQlzTdN4", - y: "is9pWAaneK4RdxmdLfsq5IwizDmUS2w8OGS99sKm3ek" + y: "is9pWAaneK4RdxmdLfsq5IwizDmUS2w8OGS99sKm3ek", }, // vector with algorithm = id-ecDH @@ -726,7 +726,7 @@ tv = { secret: util.hex2abv( "35669cd5c244ba6c1ea89b8802c3d1db815cd769979072e6556eb98548c65f7d" - ) + ), }, // KASValidityTest_ECCEphemeralUnified_NOKC_ZZOnly_init.fax [ED] @@ -736,7 +736,7 @@ tv = { kty: "EC", crv: "P-384", x: "YoV6fhCph4kyt7sUkqiZOtbRs0rF6etPqlnrn1nzSB95NElaw4uTK7Pn2nlFFqqH", - y: "bf3tRz6icq3-W6hhmoqDTBKjdOQUJ5xHr5kX4X-h5MZk_P_nCrG3IUVl1SAbhWDw" + y: "bf3tRz6icq3-W6hhmoqDTBKjdOQUJ5xHr5kX4X-h5MZk_P_nCrG3IUVl1SAbhWDw", }, jwk_priv: { @@ -744,13 +744,13 @@ tv = { crv: "P-384", d: "RT8f0pRw4CL1Tgk4rwuNnNbFoQBNTTBkr7WVLLm4fDA3boYZpNB_t-rbMVLx0CRp", x: "_XwhXRnOzEfCsWIRCz3QLClaDkigQFvXmqYNdh_7vJdADykPbfGi1VgAu3XJdXoD", - y: "S1P_FBCXYGE-5VPvTCRnFT7bPIPmUPV9qKTM24TQFYEUgIDfzCLsyGCWK-rhP6jU" + y: "S1P_FBCXYGE-5VPvTCRnFT7bPIPmUPV9qKTM24TQFYEUgIDfzCLsyGCWK-rhP6jU", }, secret: util.hex2abv( "a3d28aa18f905a48a5f166b4ddbf5f6b499e43858ccdd80b869946aba2c5d461" + "db6a1e5b1137687801878ff0f8d9a7b3" - ) + ), }, // KASValidityTest_ECCEphemeralUnified_NOKC_ZZOnly_init.fax [EE] @@ -762,7 +762,7 @@ tv = { x: "AeCLgRZ-BPqfhq4jt409-E26VHW5l29q74cHbIbQiS_-Gcqdo-087jHdPXUksGpr" + "Nyp_RcTZd94t3peXzQziQIqo", y: "AZIAp8QVnU9hBOkLScv0dy540uGtBWHkWj4DGh-Exh4iWZ0E-YBS8-HVx2eB-nfG" + - "AGEy4-BzfpFFlfidOS1Tg77J" + "AGEy4-BzfpFFlfidOS1Tg77J", }, jwk_priv: { @@ -773,14 +773,14 @@ tv = { x: "AcD_6Eb4A-8QdUM70c6F0WthN1kvV4fohS8QHbod6B4y1ZDU54mQuCR-3IBjcV1c" + "oh18uxbyUn5szMuCgjZUiD0y", y: "AU3WKJffztkhAQetBXaLvUSIHa87HMn8vZFB04lWipH-SrsrAu_4N-6iam0OD4EJ" + - "0kOMH8iEh7yuivaKsFRzm2-m" + "0kOMH8iEh7yuivaKsFRzm2-m", }, secret: util.hex2abv( "00561eb17d856552c21b8cbe7d3d60d1ea0db738b77d4050fa2dbd0773edc395" + "09854d9e30e843964ed3fd303339e338f31289120a38f94e9dc9ff7d4b3ea8f2" + "5e01" - ) + ), }, // Some test vectors that we should fail to import. @@ -790,21 +790,21 @@ tv = { kty: "EC", crv: "P-123", x: "XOe4bjsyZgQD5jcS7wmY3q4QJ_rsPBvp92-TTf61jpg", - y: "9M8HWzlAXdHxresJAQftz7K0ljc52HZ54wVssFV9Ct8" + y: "9M8HWzlAXdHxresJAQftz7K0ljc52HZ54wVssFV9Ct8", }, // The crv parameter is missing. jwk_missing_crv: { kty: "EC", x: "XOe4bjsyZgQD5jcS7wmY3q4QJ_rsPBvp92-TTf61jpg", - y: "9M8HWzlAXdHxresJAQftz7K0ljc52HZ54wVssFV9Ct8" + y: "9M8HWzlAXdHxresJAQftz7K0ljc52HZ54wVssFV9Ct8", }, // The X coordinate is missing. jwk_missing_x: { kty: "EC", crv: "P-256", - y: "9M8HWzlAXdHxresJAQftz7K0ljc52HZ54wVssFV9Ct8" + y: "9M8HWzlAXdHxresJAQftz7K0ljc52HZ54wVssFV9Ct8", }, // The Y coordinate is missing. @@ -836,7 +836,7 @@ tv = { raw_compressed: util.hex2abv( "025ce7b86e3b32660403e63712ef0998deae1027faec3c1be9f76f934dfeb58e" + "98f4cf075b39405dd1f1adeb090107edcfb2b4963739d87679e3056cb0557d0adf" - ) + ), }, // NIST ECDSA test vectors @@ -882,7 +882,7 @@ tv = { "99e4bc72fd79d28a380f8d4b4c919ac290d248c37983ba05aea42e2dd79fdd33e8" + "0087488c859a96fea266ea13bf6d114c429b163be97a57559086edb64aed4a1859" + "4b46fb9efc7fd25d8b2de8f09ca0587f54bd287299f47b2ff124aac56600000000" - ) + ), }, ecdsa_bad: { @@ -892,8 +892,8 @@ tv = { "x": "BhOH_WuVkU6IX5Eu37tfsnRlUCfyFsQJHKg-GTNnQP2B" + "rt_gR_UbQr32gWESEBPg1VsRehTkMD-SbI3rt3p_2q0B", "y": "AUNouOdGgHsraPNhXNeNdhpGTd15GPyN9R0iWWL98ePc" + - "JD4mUQD/DsEzNZ4zLkTdSa/Y5fOP6GEzVzQy0zwC+goD" - } + "JD4mUQD/DsEzNZ4zLkTdSa/Y5fOP6GEzVzQy0zwC+goD", + }, }, // RFC 2409 @@ -952,7 +952,7 @@ tv = { "7a08b0c7c509110b9e7c6dbc961ca4360362d3dbcffc5bf2bb7207e0a5922f77" + "cf5464b316aa49fb62b338ebcdb30bf573d07b663bb7777b69d6317df0a4f636" + "ba3d9acbf9e8ac" - ) + ), }, // Taken from appendix A of RFC 5869. @@ -969,8 +969,8 @@ tv = { ), jwk: { kty: "oct", - k: "CwsLCwsLCwsLCwsLCwsLCwsLCwsLCw" - } + k: "CwsLCwsLCwsLCwsLCwsLCwsLCwsLCw", + }, }, { prf: "SHA-256", @@ -993,7 +993,7 @@ tv = { "b11e398dc80327a1c8e7f78c596a49344f012eda2d4efad8a050cc4c19afa97c" + "59045a99cac7827271cb41c65e590e09da3275600c2f09b8367793a9aca3db71" + "cc30c58179ec3e87c14c01d5c1f3434f1d87" - ) + ), }, { prf: "SHA-256", @@ -1003,7 +1003,7 @@ tv = { data: util.hex2abv( "8da4e775a563c18f715f802a063c5a31b8a11f5c5ee1879ec3454e5f3c738d2d" + "9d201395faa4b61a96c8" - ) + ), }, { prf: "SHA-1", @@ -1013,7 +1013,7 @@ tv = { data: util.hex2abv( "085a01ea1b10f36933068b56efa5ad81a4f14b822f5b091568a9cdd4f155fda2" + "c22e422478d305f3f896" - ) + ), }, { prf: "SHA-1", @@ -1036,7 +1036,7 @@ tv = { "0bd770a74d1160f7c9f12cd5912a06ebff6adcae899d92191fe4305673ba2ffe" + "8fa3f1a4e5ad79f3f334b3b202b2173c486ea37ce3d397ed034c7f9dfeb15c5e" + "927336d0441f4c4300e2cff0d0900b52d3b4" - ) + ), }, { prf: "SHA-1", @@ -1046,7 +1046,7 @@ tv = { data: util.hex2abv( "0ac1af7002b3d761d1e55298da9d0506b9ae52057220a306e07b6b87e8df21d0" + "ea00033de03984d34918" - ) + ), }, { prf: "SHA-1", @@ -1056,7 +1056,7 @@ tv = { data: util.hex2abv( "2c91117204d745f3500d636a62f64f0ab3bae548aa53d423b0d1f27ebba6f5e5" + "673a081d70cce7acfc48" - ) - } - ] -} + ), + }, + ], +}; diff --git a/dom/crypto/test/test-worker.js b/dom/crypto/test/test-worker.js index 02f248fae74e..65edf0329a68 100644 --- a/dom/crypto/test/test-worker.js +++ b/dom/crypto/test/test-worker.js @@ -22,18 +22,18 @@ function complete(test, valid) { } function memcmp_complete(test, value) { - return function (x) { + return function(x) { finish(util.memcmp(x, value)); }; } function error(test) { - return function (x) { + return function(x) { throw x; }; } -onmessage = function (msg) { +onmessage = function(msg) { var test = eval("(" + msg.data + ")"); try { diff --git a/dom/crypto/test/test_WebCrypto.html b/dom/crypto/test/test_WebCrypto.html index aff04f20acfd..7d95ee6796f6 100644 --- a/dom/crypto/test/test_WebCrypto.html +++ b/dom/crypto/test/test_WebCrypto.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_DH.html b/dom/crypto/test/test_WebCrypto_DH.html index 55d83e15ca13..d6bc48710c04 100644 --- a/dom/crypto/test/test_WebCrypto_DH.html +++ b/dom/crypto/test/test_WebCrypto_DH.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_ECDH.html b/dom/crypto/test/test_WebCrypto_ECDH.html index 671c7c693a1b..32fe28f27e52 100644 --- a/dom/crypto/test/test_WebCrypto_ECDH.html +++ b/dom/crypto/test/test_WebCrypto_ECDH.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_ECDSA.html b/dom/crypto/test/test_WebCrypto_ECDSA.html index bc9bf1a3f7c5..f4ff95bcf400 100644 --- a/dom/crypto/test/test_WebCrypto_ECDSA.html +++ b/dom/crypto/test/test_WebCrypto_ECDSA.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_HKDF.html b/dom/crypto/test/test_WebCrypto_HKDF.html index dcc871ffad21..e9ae9a4b37ba 100644 --- a/dom/crypto/test/test_WebCrypto_HKDF.html +++ b/dom/crypto/test/test_WebCrypto_HKDF.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_Import_Multiple_Identical_Keys.html b/dom/crypto/test/test_WebCrypto_Import_Multiple_Identical_Keys.html index 6913bb78e34b..22c198d62a3c 100644 --- a/dom/crypto/test/test_WebCrypto_Import_Multiple_Identical_Keys.html +++ b/dom/crypto/test/test_WebCrypto_Import_Multiple_Identical_Keys.html @@ -10,13 +10,13 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_JWK.html b/dom/crypto/test/test_WebCrypto_JWK.html index f9916f5f2dce..6e83a73d8d59 100644 --- a/dom/crypto/test/test_WebCrypto_JWK.html +++ b/dom/crypto/test/test_WebCrypto_JWK.html @@ -19,13 +19,13 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_Normalize.html b/dom/crypto/test/test_WebCrypto_Normalize.html index f293c09808c5..eb5c7d071311 100644 --- a/dom/crypto/test/test_WebCrypto_Normalize.html +++ b/dom/crypto/test/test_WebCrypto_Normalize.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_PBKDF2.html b/dom/crypto/test/test_WebCrypto_PBKDF2.html index 0e3cdd088b65..6e7823d82691 100644 --- a/dom/crypto/test/test_WebCrypto_PBKDF2.html +++ b/dom/crypto/test/test_WebCrypto_PBKDF2.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_RSA_OAEP.html b/dom/crypto/test/test_WebCrypto_RSA_OAEP.html index d2a49caf2c91..e54694ac69b0 100644 --- a/dom/crypto/test/test_WebCrypto_RSA_OAEP.html +++ b/dom/crypto/test/test_WebCrypto_RSA_OAEP.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_RSA_PSS.html b/dom/crypto/test/test_WebCrypto_RSA_PSS.html index 5c3975140a52..7cce4fd1add5 100644 --- a/dom/crypto/test/test_WebCrypto_RSA_PSS.html +++ b/dom/crypto/test/test_WebCrypto_RSA_PSS.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_Reject_Generating_Keys_Without_Usages.html b/dom/crypto/test/test_WebCrypto_Reject_Generating_Keys_Without_Usages.html index d252ed2da0a5..ac046efc63ba 100644 --- a/dom/crypto/test/test_WebCrypto_Reject_Generating_Keys_Without_Usages.html +++ b/dom/crypto/test/test_WebCrypto_Reject_Generating_Keys_Without_Usages.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_Structured_Cloning.html b/dom/crypto/test/test_WebCrypto_Structured_Cloning.html index 3275c546699d..b76f20c828c1 100644 --- a/dom/crypto/test/test_WebCrypto_Structured_Cloning.html +++ b/dom/crypto/test/test_WebCrypto_Structured_Cloning.html @@ -19,7 +19,7 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_Workers.html b/dom/crypto/test/test_WebCrypto_Workers.html index d92f6169f23d..15368495f035 100644 --- a/dom/crypto/test/test_WebCrypto_Workers.html +++ b/dom/crypto/test/test_WebCrypto_Workers.html @@ -19,13 +19,13 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_WebCrypto_Wrap_Unwrap.html b/dom/crypto/test/test_WebCrypto_Wrap_Unwrap.html index c2c7e57e688b..7897347fc227 100644 --- a/dom/crypto/test/test_WebCrypto_Wrap_Unwrap.html +++ b/dom/crypto/test/test_WebCrypto_Wrap_Unwrap.html @@ -19,25 +19,25 @@ - +/* ]]>*/ diff --git a/dom/crypto/test/test_indexedDB.html b/dom/crypto/test/test_indexedDB.html index b77495673672..951b03b05f61 100644 --- a/dom/crypto/test/test_indexedDB.html +++ b/dom/crypto/test/test_indexedDB.html @@ -47,12 +47,12 @@ }); } - addEventListener("load", function () { + addEventListener("load", function() { SpecialPowers.addPermission("browser", true, document); SpecialPowers.pushPrefEnv({set: [ ["dom.ipc.browser_frames.oop_by_default", true], ["dom.mozBrowserFramesEnabled", true], - ["network.disable.ipc.security", true] + ["network.disable.ipc.security", true], ]}, runTest); }); diff --git a/dom/crypto/test/util.js b/dom/crypto/test/util.js index f7b4c260f3aa..7a3b473c0bde 100644 --- a/dom/crypto/test/util.js +++ b/dom/crypto/test/util.js @@ -11,7 +11,7 @@ var util = { var yb = new Uint8Array(y); if (x.byteLength !== y.byteLength) { return false; } - for (var i=0; i { let {port1, port2} = new MessageChannel(); @@ -55,7 +55,7 @@ var util = { }); }, - cloneExportCompareKeys: function (key) { + cloneExportCompareKeys(key) { return util.clone(key).then(clone => { var exports = []; @@ -79,7 +79,7 @@ var util = { return clone; }); }); - } + }, }; function exists(x) { @@ -89,7 +89,7 @@ function exists(x) { function hasFields(object, fields) { return fields .map(x => exists(object[x])) - .reduce((x,y) => (x && y)); + .reduce((x, y) => (x && y)); } function hasKeyFields(x) {