verify-key-value.https.html (1162B)
1 <!DOCTYPE html> 2 <html> 3 <script src=/resources/testharness.js></script> 4 <script src=/shared-storage/resources/util.js></script> 5 <script src=/fenced-frame/resources/utils.js></script> 6 <body> 7 <script> 8 9 async function init() { 10 const [outerKey, innerKey] = parseKeylist(); 11 const parsedData = parseExpectedKeyAndValueData(); 12 let url0 = generateURL("/shared-storage/resources/frame0.html", [innerKey]); 13 let url1 = generateURL("/shared-storage/resources/frame1.html", [innerKey]); 14 15 await addModuleOnce("/shared-storage/resources/simple-module.js"); 16 let fencedFrameConfig = await sharedStorage.selectURL( 17 "verify-key-value", [{url: url0}, {url: url1}], 18 {data: parsedData, resolveToConfig: true}); 19 assert_true(validateSelectURLResult(fencedFrameConfig, true)); 20 21 attachFencedFrame(fencedFrameConfig, 'opaque-ads'); 22 const result = await nextValueFromServer(innerKey); 23 const dataStr = JSON.stringify(parsedData); 24 assert_equals(result, "frame1_loaded", 25 `verifying key, value ${dataStr} found for ${location.origin};`); 26 27 await writeValueToServer(outerKey, 28 "verify_key_value_loaded"); 29 } 30 31 init(); 32 </script> 33 </body> 34 </html>