browser_rules_pseudo-visited_in_media-query.js (735B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Tests for visited/unvisited rule. 7 8 const TEST_URI = URL_ROOT + "doc_visited_in_media_query.html"; 9 10 add_task(async () => { 11 info("Open a url which has a visited link and the style in the media query"); 12 const tab = await addTab(TEST_URI); 13 14 info("Wait until the visited link is available"); 15 await waitUntilVisitedState(tab, ["#visited"]); 16 17 info("Open the inspector"); 18 const { inspector, view } = await openRuleView(); 19 20 info("Check whether the rule view is shown correctly for visited element"); 21 await selectNode("#visited", inspector); 22 ok(getRuleViewRule(view, "a"), "Rule of a is shown"); 23 });