Bug 1918529 - fix some subpixel misalignment issues with gfx.webrender.svg-filter...
[gecko.git] / dom / mls / tests / test_group_create.html
blob6b299a9e23e17b5be90184c5a746eb63ba881b3c
3 <!DOCTYPE HTML>
4 <html>
5 <head>
6 <title>Test for Messaging Layer Security</title>
7 <!-- SimpleTest Helpers -->
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 <!-- Local Helpers -->
11 <script src="head_mls.js"></script>
12 </head>
13 <body>
14 <pre id="test">
15 <script class="testbody" type="text/javascript">
17 async function test_group_create() {
19 const mls = new MLS();
21 // Alice: Create signature keypair and credential
22 const alice = await mls.generateIdentity();
23 const credential_alice = await mls.generateCredential("alice");
25 // Alice: Create a group
26 const group_alice = await mls.groupCreate(alice, credential_alice);
28 // Test: compare the generated group identifier to incorrect values
29 // Note: there is no deterministic test for this value as it is generated randomly
30 isnot(byteArrayToHexString(group_alice.groupId), "", "Group Identifier != ''");
32 // Test: the generated group epoch is of size 32
33 is(group_alice.groupId.length, 32, "Group Epoch should be of size 32");
35 SimpleTest.finish();
38 SimpleTest.waitForExplicitFinish();
39 test_group_create();
41 </script>
42 </pre>
43 </body>
44 </html>