xref: /third_party/node/test/fixtures/wpt/streams/queuing-strategies-size-function-per-global.window.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/wpt/streams/
11cb0ef41Sopenharmony_ciconst iframe = document.createElement('iframe');
21cb0ef41Sopenharmony_cidocument.body.appendChild(iframe);
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_cifor (const type of ['CountQueuingStrategy', 'ByteLengthQueuingStrategy']) {
51cb0ef41Sopenharmony_ci  test(() => {
61cb0ef41Sopenharmony_ci    const myQs = new window[type]({ highWaterMark: 1 });
71cb0ef41Sopenharmony_ci    const yourQs = new iframe.contentWindow[type]({ highWaterMark: 1 });
81cb0ef41Sopenharmony_ci    assert_not_equals(myQs.size, yourQs.size,
91cb0ef41Sopenharmony_ci                      'size should not be the same object');
101cb0ef41Sopenharmony_ci  }, `${type} size should be different for objects in different realms`);
111cb0ef41Sopenharmony_ci}
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ci// Cleanup the document to avoid messing up the result page.
141cb0ef41Sopenharmony_ciiframe.remove();
15

Indexes created Thu Nov 07 10:32:03 CST 2024