// Now set the href of the link to a location that's actually visited. link.href = top.location;
start = Date.now();
// And wait for the link to get restyled when the history lets us
// know it is (asynchronously).
setTimeout(poll_for_visited_style, 100);
}
function poll_for_visited_style()
{ var snapshot = snapshotWindow(subwin, false);
if (snapshotsEqual(unvisref, snapshot)) {
// hasn't been styled yet
setTimeout(poll_for_visited_style, 100);
// If it never gets styled correctly, this test will fail because
// this loop will never complete.
} else { var end = Date.now();
timeout = 3 * Math.max(end - start, 300);
SpecialPowers.pushPrefEnv({"set":[["layout.css.visited_links_enabled", false]]}, step2);
}
}
function step2()
{
// we don't handle dynamic changes of this pref; it only takes effect
// when a new page loads
reinsert_node(link);
setTimeout(step3, timeout);
}
function step3()
{ var snapshot = snapshotWindow(subwin, false);
ok(snapshotsEqual(unvisref, snapshot), ":visited selector does not apply given false preference");
SimpleTest.finish();
}
</script>
</pre>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.24 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.