File tree 3 files changed +8
-6
lines changed
tests-shared/src/main/scala/org/scalajs/dom/tests/shared
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
17
17
import scala .scalajs .js .Thenable .Implicits ._
18
18
import scala .util .Try
19
19
20
- trait BrowserTests {
20
+ trait BrowserTests extends WebCryptoApiTests {
21
21
22
22
def read [T ](reader : ReadableStreamReader [T ])(values : Seq [T ]): Future [Seq [T ]] = {
23
23
reader
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package org.scalajs.dom.tests.shared
3
3
import org .scalajs .dom .tests .shared .AsyncTesting ._
4
4
import org .junit .Test
5
5
6
- trait SharedTests extends WebCryptoApiTests {
6
+ trait SharedTests {
7
7
8
8
// ===================================================================================================================
9
9
// Tests WITHOUT org.scalajs.dom._ in scope
Original file line number Diff line number Diff line change @@ -29,12 +29,14 @@ trait WebCryptoApiTests {
29
29
}
30
30
31
31
@ Test final def aesKeyDerivationWorks : AsyncResult = async {
32
+ import scalajs .js .| ._
33
+
32
34
val derivationAlgorithm = " PBKDF2"
33
35
val pbdkf2 = new dom.Pbkdf2Params {
34
36
val name = derivationAlgorithm
35
- val salt = " salt" .getBytes.toTypedArray.buffer
37
+ val salt : dom. BufferSource = " salt" .getBytes.toTypedArray.buffer
36
38
val iterations = 100 .toDouble
37
- val hash = " SHA-512"
39
+ val hash : dom. HashAlgorithmIdentifier = dom. HashAlgorithm .` SHA-512`
38
40
}
39
41
val aesCtr = new dom.AesDerivedKeyParams {
40
42
val name = " AES-GCM"
@@ -90,7 +92,7 @@ trait WebCryptoApiTests {
90
92
val name = " AES-GCM"
91
93
val iv = iv0
92
94
val tagLength = 128
93
- val additionalData = " " .getBytes.toTypedArray.buffer
95
+ val additionalData : dom. BufferSource = " " .getBytes.toTypedArray.buffer
94
96
},
95
97
key,
96
98
data.getBytes().toTypedArray
@@ -106,7 +108,7 @@ trait WebCryptoApiTests {
106
108
val name = " AES-GCM"
107
109
val iv = iv0
108
110
val tagLength = 128
109
- val additionalData = " " .getBytes.toTypedArray.buffer
111
+ val additionalData : dom. BufferSource = " " .getBytes.toTypedArray.buffer
110
112
},
111
113
key,
112
114
encrypted
You can’t perform that action at this time.
0 commit comments