<style> type="" edge cases "use strict"; test(() => { assertApplied("test1"); }, "With no type attribute, the style should apply"); test(() => { assertApplied("test2"); }, "With an empty type attribute, the style should apply"); test(() => { assertApplied("test3"); }, "With a mixed-case type attribute, the style should apply"); test(() => { assertNotApplied("test4"); }, "With a whitespace-surrounded type attribute, the style should not apply"); test(() => { assertNotApplied("test5"); }, "With a charset parameter in the type attribute, the style should not apply"); function getColor(id) { return window.getComputedStyle(document.getElementById(id)).color; } function assertApplied(id) { assert_equals(getColor(id), "rgb(0, 128, 0)"); } function assertNotApplied(id) { assert_not_equals(getColor(id), "rgb(0, 128, 0)"); }