File: test-partitioned-access-to-idb-in-iframes.https.window.js

package info (click to toggle)
firefox 143.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,617,328 kB
  • sloc: cpp: 7,478,492; javascript: 6,417,157; ansic: 3,720,058; python: 1,396,372; xml: 627,523; asm: 438,677; java: 186,156; sh: 63,477; makefile: 19,171; objc: 13,059; perl: 12,983; yacc: 4,583; cs: 3,846; pascal: 3,405; lex: 1,720; ruby: 1,003; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 53; csh: 10
file content (81 lines) | stat: -rw-r--r-- 3,448 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// META: resource=support/test-partitioned-access-in-different-origin-iframes.https.sub.html
// META: resource=support/test-partitioned-access-in-same-origin-iframes.https.sub.html
// META: resource=support/test-partitioned-iframes-in-different-origin-windows.https.sub.html
// META: resource=support/test-partitioned-iframes-in-same-origin-windows.https.sub.html
// META: resource=support/test-partitioned-parent-reader-and-different-origin-window-writer-iframe.https.sub.html
// META: resource=support/test-partitioned-parent-writer-and-different-origin-window-reader-iframe.https.sub.html
// META: resource=support/test-read-and-notify-worker.https.html
// META: resource=support/test-read-and-notify-wrapper.https.sub.html
// META: resource=support/test-read-and-notify.https.html
// META: resource=support/test-read-and-notify.js
// META: resource=support/test-write-and-notify-worker.https.html
// META: resource=support/test-write-and-notify-wrapper.https.sub.html
// META: resource=support/test-write-and-notify.https.html
// META: resource=support/test-write-and-notify.js
// META: script=/resources/testharness.js
// META: script=/resources/testharnessreport.js
// META: script=support/testHelpers.js

/**
 * IndexedDB
 */

// [ write: A, read: A ]
promise_test(
  expectNamesForTestWindow(
    ["SameOriginIFramesWithIDB", "WorkerSameOriginIFramesWithIDB"],
    "support/test-partitioned-access-in-same-origin-iframes.https.sub.html?api=IDB"
  ),
  "iframes of origin A in a window of origin B can access the same data with IDB"
);

// [ write: A, read: B ]
promise_test(
  expectNamesForTestWindow(
    ["DifferentOriginIFramesWithIDB", "WorkerDifferentOriginIFramesWithIDB"],
    "support/test-partitioned-access-in-different-origin-iframes.https.sub.html?api=IDB"
  ),
  "iframes of origin A and B are isolated with IDB"
);

// [ write: B[A], read: B[A] ]
promise_test(
  expectNamesForTestWindow(
    ["SameOriginWindowsWithIDB", "WorkerSameOriginWindowsWithIDB"],
    "support/test-partitioned-iframes-in-same-origin-windows.https.sub.html?api=IDB"
  ),
  "iframes of origin A in two child windows of origin B can access the same data with IDB"
);

// [ write: A[A], read: B[A] ]
promise_test(
  expectNamesForTestWindow(
    ["DifferentOriginWindowsWithIDB", "WorkerDifferentOriginWindowsWithIDB"],
    "support/test-partitioned-iframes-in-different-origin-windows.https.sub.html?api=IDB"
  ),
  "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"
);

// [ write: A, read: B[A] ]
promise_test(
  expectNamesForTestWindow(
    [
      "ReadIFrameWriteDifferentOriginWindowWithIDB",
      "WorkerReadIFrameWriteDifferentOriginWindowWithIDB",
    ],
    "support/test-partitioned-parent-reader-and-different-origin-window-writer-iframe.https.sub.html?api=IDB"
  ),
  "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"
);

// [ write: B[A], read: A ]
promise_test(
  expectNamesForTestWindow(
    [
      "WriteIFrameReadDifferentOriginWindowWithIDB",
      "WorkerWriteIFrameReadDifferentOriginWindowWithIDB",
    ],
    "support/test-partitioned-parent-writer-and-different-origin-window-reader-iframe.https.sub.html?api=IDB"
  ),
  "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"
);