Two tweaks: * Use variables for tests that rely on background images triggering a load that had otherwise been cached already. printpreview_images_sw.html use serviceworkers, and visited_image_loading_frame.html uses a server script to watch the loads. * Add a null-check for test_rules_out_of_sheets. Now we hit this early return in appendRule[1]. The no-sheet case was what this test was intending to hit anyways, so it was just by chance it didn't before (because the sheet was kept alive by Loader::mInlineSheets, but with the new cache we shallow-clone it). [1]: https://searchfox.org/mozilla-central/rev/5fb48bf50516ed2529d533e5dfe49b4752efb8b8/layout/style/CSSKeyframesRule.cpp#287 Differential Revision: https://phabricator.services.mozilla.com/D243773
30 lines
825 B
HTML
30 lines
825 B
HTML
<!DOCTYPE HTML>
|
|
<title>Test for :visited image loading</title>
|
|
<style>
|
|
:root {
|
|
/* Using variables forces a new load regardless of whether the inline stylesheet was cached. */
|
|
--image-1l: url("visited_image_loading.sjs?1l");
|
|
--image-1v: url("visited_image_loading.sjs?1v");
|
|
--image-2l: url("visited_image_loading.sjs?2l");
|
|
--image-2v: url("visited_image_loading.sjs?2v");
|
|
}
|
|
|
|
:link { background-color: blue }
|
|
:visited { background-color: purple }
|
|
|
|
#link:link {
|
|
background-image: var(--image-1l);
|
|
}
|
|
#link:visited {
|
|
background-image: var(--image-1v);
|
|
}
|
|
#visited:link {
|
|
background-image: var(--image-2l);
|
|
}
|
|
#visited:visited {
|
|
background-image: var(--image-2v);
|
|
}
|
|
</style>
|
|
<a id="link" href="do-not-visit-this-link.html">unvisited link</a>
|
|
<a id="visited" href="visited_image_loading_frame.html">visited link</a>
|