test-partitioned-access-to-idb-in-iframes.https.window.js (3448B)
1 // META: resource=support/test-partitioned-access-in-different-origin-iframes.https.sub.html 2 // META: resource=support/test-partitioned-access-in-same-origin-iframes.https.sub.html 3 // META: resource=support/test-partitioned-iframes-in-different-origin-windows.https.sub.html 4 // META: resource=support/test-partitioned-iframes-in-same-origin-windows.https.sub.html 5 // META: resource=support/test-partitioned-parent-reader-and-different-origin-window-writer-iframe.https.sub.html 6 // META: resource=support/test-partitioned-parent-writer-and-different-origin-window-reader-iframe.https.sub.html 7 // META: resource=support/test-read-and-notify-worker.https.html 8 // META: resource=support/test-read-and-notify-wrapper.https.sub.html 9 // META: resource=support/test-read-and-notify.https.html 10 // META: resource=support/test-read-and-notify.js 11 // META: resource=support/test-write-and-notify-worker.https.html 12 // META: resource=support/test-write-and-notify-wrapper.https.sub.html 13 // META: resource=support/test-write-and-notify.https.html 14 // META: resource=support/test-write-and-notify.js 15 // META: script=/resources/testharness.js 16 // META: script=/resources/testharnessreport.js 17 // META: script=support/testHelpers.js 18 19 /** 20 * IndexedDB 21 */ 22 23 // [ write: A, read: A ] 24 promise_test( 25 expectNamesForTestWindow( 26 ["SameOriginIFramesWithIDB", "WorkerSameOriginIFramesWithIDB"], 27 "support/test-partitioned-access-in-same-origin-iframes.https.sub.html?api=IDB" 28 ), 29 "iframes of origin A in a window of origin B can access the same data with IDB" 30 ); 31 32 // [ write: A, read: B ] 33 promise_test( 34 expectNamesForTestWindow( 35 ["DifferentOriginIFramesWithIDB", "WorkerDifferentOriginIFramesWithIDB"], 36 "support/test-partitioned-access-in-different-origin-iframes.https.sub.html?api=IDB" 37 ), 38 "iframes of origin A and B are isolated with IDB" 39 ); 40 41 // [ write: B[A], read: B[A] ] 42 promise_test( 43 expectNamesForTestWindow( 44 ["SameOriginWindowsWithIDB", "WorkerSameOriginWindowsWithIDB"], 45 "support/test-partitioned-iframes-in-same-origin-windows.https.sub.html?api=IDB" 46 ), 47 "iframes of origin A in two child windows of origin B can access the same data with IDB" 48 ); 49 50 // [ write: A[A], read: B[A] ] 51 promise_test( 52 expectNamesForTestWindow( 53 ["DifferentOriginWindowsWithIDB", "WorkerDifferentOriginWindowsWithIDB"], 54 "support/test-partitioned-iframes-in-different-origin-windows.https.sub.html?api=IDB" 55 ), 56 "iframe of origin A in a child window of origin B cannot read data written by iframe of origin A in a child window of origin A with IDB" 57 ); 58 59 // [ write: A, read: B[A] ] 60 promise_test( 61 expectNamesForTestWindow( 62 [ 63 "ReadIFrameWriteDifferentOriginWindowWithIDB", 64 "WorkerReadIFrameWriteDifferentOriginWindowWithIDB", 65 ], 66 "support/test-partitioned-parent-reader-and-different-origin-window-writer-iframe.https.sub.html?api=IDB" 67 ), 68 "iframe of origin A in a child window of origin B cannot cannot read data written by iframe of origin A in the parent window with IDB" 69 ); 70 71 // [ write: B[A], read: A ] 72 promise_test( 73 expectNamesForTestWindow( 74 [ 75 "WriteIFrameReadDifferentOriginWindowWithIDB", 76 "WorkerWriteIFrameReadDifferentOriginWindowWithIDB", 77 ], 78 "support/test-partitioned-parent-writer-and-different-origin-window-reader-iframe.https.sub.html?api=IDB" 79 ), 80 "iframe of origin A in the parent window cannot read data written by iframe of origin A in child a window of origin B with IDB" 81 );