browser_rules_pseudo-visited_with_style-attribute.js (840B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Tests that the rule view works for an element with a visited pseudo class 7 // with a style attribute defined. 8 9 const TEST_URI = URL_ROOT + "doc_visited_with_style_attribute.html"; 10 11 add_task(async () => { 12 info( 13 "Open a page which has an element with a visited pseudo class and a style attribute" 14 ); 15 const tab = await addTab(TEST_URI); 16 17 info("Wait until the link has been visited"); 18 await waitUntilVisitedState(tab, ["#visited"]); 19 20 info("Open the inspector"); 21 const { inspector, view } = await openRuleView(); 22 23 info("Check whether the rule view is shown correctly for visited element"); 24 await selectNode("#visited", inspector); 25 ok(getRuleViewRule(view, "element"), "Rule of a is shown"); 26 });