diff --git a/toolkit/components/url-classifier/tests/mochitest/bad.css b/toolkit/components/url-classifier/tests/mochitest/bad.css new file mode 100644 index 000000000000..f57b36a77845 --- /dev/null +++ b/toolkit/components/url-classifier/tests/mochitest/bad.css @@ -0,0 +1 @@ +#styleBad { visibility: hidden; } diff --git a/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html b/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html index 1cd520284779..c7923f448411 100644 --- a/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html +++ b/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html @@ -15,6 +15,14 @@ function checkLoads() { var style = document.defaultView.getComputedStyle(elt, ""); window.parent.isnot(style.visibility, "hidden", "Should not load bad css"); + elt = document.getElementById("styleBad"); + style = document.defaultView.getComputedStyle(elt, ""); + window.parent.isnot(style.visibility, "hidden", "Should not load bad css"); + + elt = document.getElementById("styleImport"); + style = document.defaultView.getComputedStyle(elt, ""); + window.parent.isnot(style.visibility, "visible", "Should import clean css"); + // Call parent.loadTestFrame again to test classification metadata in HTTP // cache entries. if (window.parent.firstLoad) { @@ -36,7 +44,6 @@ function checkLoads() { - @@ -44,5 +51,7 @@ function checkLoads() {
The following should not be hidden: