r, "rgb(0, 0, 0)");
    assert_equals(getComputedStyle(redSpan).color, "rgb(255, 0, 0)");
    assert_equals(getComputedStyle(blueSpan).color, "rgb(0, 0, 0)");
    assert_equals(getComputedStyle(whiteSpan).color, "rgb(255, 0, 0)");
    assert_equals(getComputedStyle(yellowSpan).color, "rgb(0, 0, 0)");
  });
}, 'Stylesheets constructed on the main Document cannot be used in iframes');

promise_test(async () => {
  const iframe = document.createElement("iframe");
  const iframeLoaded = new Promise(resolve => i