browser_rules_blob_stylesheet.js (665B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Test that the rule-view content is correct for stylesheet generated 7 // with createObjectURL(cssBlob) 8 const TEST_URL = URL_ROOT + "doc_blob_stylesheet.html"; 9 10 add_task(async function () { 11 await addTab(TEST_URL); 12 const { inspector, view } = await openRuleView(); 13 14 await selectNode("h1", inspector); 15 is( 16 view.element.querySelectorAll("#noResults").length, 17 0, 18 "The no-results element is not displayed" 19 ); 20 21 is( 22 view.element.querySelectorAll(".ruleview-rule").length, 23 2, 24 "There are 2 displayed rules" 25 ); 26 });