s(sheet.media.item(1), "print");
    assert_true(sheet.disabled);
    assert_equals(sheet.cssRules.length, 1);
    assert_equals(sheet.cssRules[0].cssText, redStyleTexts[0]);

    sheet.insertRule(redStyleTexts[1]);
    assert_equals(sheet.cssRules.length, 2);
    assert_equals(sheet.cssRules[0].cssText, redStyleTexts[1]);
  });
}, 'CSSStyleSheet.replace produces Promise<CSSStyleSheet>');

function createAllSheetsPromise() {
  const greenSheet = new CSSStyleSheet();
  const redSheet = new CSSStyleSheet({med