test_ua_sheet_disable.html (705B)
1 <!DOCTYPE html> 2 <title>Test for bug 1534399</title> 3 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 4 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/> 5 <script> 6 function start() { 7 let sheet = InspectorUtils.getAllStyleSheets(document, false)[0]; 8 ok(sheet.href.indexOf("test.css") == -1, "Shouldn't have found the author sheet"); 9 10 is(sheet.disabled, false, "Sheet should initially be enabled"); 11 12 sheet.disabled = true; 13 is(sheet.disabled, false, "Shouldn't be able to disable a UA sheet"); 14 15 SimpleTest.finish(); 16 } 17 18 SimpleTest.waitForExplicitFinish(); 19 document.addEventListener('DOMContentLoaded', start) 20 </script>