="bar" s]'],
  ['[*|foo="bar" s]', '[*|foo="bar" s]'],
]

tests.forEach(function(arr) {
  var input = arr[0];
  var expected = arr[1];
  ["", " in @media"].forEach(function(use_media) {
    test(function() {
      var sheet = new_sheet(use_media);
      sheet.insertRule(input + ' {}', 0);
      assert_equals(sheet.cssRules.length, 1);
    }, input + ' insertRule' + use_media);

    test(function() {
      var sheet = new_sheet(use_media);
      sheet.insertRule(input + ' {}', 0);
      assert_equals(sheet.c