.add_cleanup(() => { doc.body.innerHTML = ''; })
    doc.body.innerHTML = `
      <style>
        body {
          color: red;
        }
        @media (${feature}) {
          body {
            color: green;
          }
        }
      </style>
      `;
    assert_equals(win.getComputedStyle(doc.body).color, result);
  }, description);
}

function test_media_query_applies(feature) {
  test_media_query(feature, 'rgb(0, 128, 0)', `@media(${feature}) applies`);
}

function test_media_query_does_not_apply(fea