File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
tests-shared/src/main/scala/org/scalajs/dom/tests/shared Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import scala.scalajs.js
1717import scala .scalajs .js .Thenable .Implicits ._
1818import scala .util .Try
1919
20- trait BrowserTests {
20+ trait BrowserTests extends WebCryptoApiTests {
2121
2222 def read [T ](reader : ReadableStreamReader [T ])(values : Seq [T ]): Future [Seq [T ]] = {
2323 reader
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package org.scalajs.dom.tests.shared
33import org .scalajs .dom .tests .shared .AsyncTesting ._
44import org .junit .Test
55
6- trait SharedTests extends WebCryptoApiTests {
6+ trait SharedTests {
77
88 // ===================================================================================================================
99 // Tests WITHOUT org.scalajs.dom._ in scope
Original file line number Diff line number Diff line change @@ -29,12 +29,14 @@ trait WebCryptoApiTests {
2929 }
3030
3131 @ Test final def aesKeyDerivationWorks : AsyncResult = async {
32+ import scalajs .js .| ._
33+
3234 val derivationAlgorithm = " PBKDF2"
3335 val pbdkf2 = new dom.Pbkdf2Params {
3436 val name = derivationAlgorithm
35- val salt = " salt" .getBytes.toTypedArray.buffer
37+ val salt : dom. BufferSource = " salt" .getBytes.toTypedArray.buffer
3638 val iterations = 100 .toDouble
37- val hash = " SHA-512"
39+ val hash : dom. HashAlgorithmIdentifier = dom. HashAlgorithm .` SHA-512`
3840 }
3941 val aesCtr = new dom.AesDerivedKeyParams {
4042 val name = " AES-GCM"
@@ -90,7 +92,7 @@ trait WebCryptoApiTests {
9092 val name = " AES-GCM"
9193 val iv = iv0
9294 val tagLength = 128
93- val additionalData = " " .getBytes.toTypedArray.buffer
95+ val additionalData : dom. BufferSource = " " .getBytes.toTypedArray.buffer
9496 },
9597 key,
9698 data.getBytes().toTypedArray
@@ -106,7 +108,7 @@ trait WebCryptoApiTests {
106108 val name = " AES-GCM"
107109 val iv = iv0
108110 val tagLength = 128
109- val additionalData = " " .getBytes.toTypedArray.buffer
111+ val additionalData : dom. BufferSource = " " .getBytes.toTypedArray.buffer
110112 },
111113 key,
112114 encrypted
You can’t perform that action at this time.
0 commit comments