1const iframe = document.createElement('iframe');
2document.body.appendChild(iframe);
3
4for (const type of ['CountQueuingStrategy', 'ByteLengthQueuingStrategy']) {
5  test(() => {
6    const myQs = new window[type]({ highWaterMark: 1 });
7    const yourQs = new iframe.contentWindow[type]({ highWaterMark: 1 });
8    assert_not_equals(myQs.size, yourQs.size,
9                      'size should not be the same object');
10  }, `${type} size should be different for objects in different realms`);
11}
12
13// Cleanup the document to avoid messing up the result page.
14iframe.remove();
15