We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c53dea commit 4a19984Copy full SHA for 4a19984
tests-chrome/src/test/scala/org/scalajs/dom/tests/chrome/CryptoTests.scala
@@ -0,0 +1,21 @@
1
+package org.scalajs.dom.tests.chrome
2
+
3
+import org.junit.Test
4
5
+class CryptoTests {
6
+ import org.scalajs.dom
7
+ import scala.scalajs.js.typedarray._
8
9
+ @Test final def cryptoGetRandomValuesWork(): Unit = {
10
+ // This fails
11
+ dom.crypto.getRandomValues(Array.ofDim[Byte](8).toTypedArray)
12
+ }
13
14
+ @Test final def webcryptoGetRandomValuesWork(): Unit = {
15
+ dom.webcrypto.getRandomValues(Array.ofDim[Byte](8).toTypedArray)
16
17
18
+ @Test final def cryptoCryptoGetRandomValuesWork(): Unit = {
19
+ dom.crypto.crypto.getRandomValues(Array.ofDim[Byte](8).toTypedArray)
20
21
+}
0 commit comments