| Index: LayoutTests/fast/loader/scroll-restore-target-pseudo.html
|
| diff --git a/LayoutTests/fast/loader/scroll-restore-target-pseudo.html b/LayoutTests/fast/loader/scroll-restore-target-pseudo.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..54918b4fb16b837f2c83cac3e8332b27ce37f8ee
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/loader/scroll-restore-target-pseudo.html
|
| @@ -0,0 +1,39 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<script src="../../resources/run-after-layout-and-paint.js"></script>
|
| +<style>
|
| + #frag {
|
| + background-color: #ccc;
|
| + display: block;
|
| + height: 100px;
|
| + position: absolute;
|
| + top: 150px;
|
| + width: 100px;
|
| + }
|
| + #frag:target {
|
| + width: 200px;
|
| + }
|
| +</style>
|
| +<p>
|
| + Tests that a :target pseudo selector is correctly applied, even when history
|
| + scroll restoration suppresses scrolling to the fragment.
|
| +</p>
|
| +<div id="console"></div>
|
| +<a id="frag" name="frag"></a>
|
| +<script>
|
| +
|
| +jsTestIsAsync = true;
|
| +if (location.hash == "") {
|
| + runAfterLayoutAndPaint(function() {
|
| + location.hash = 'frag';
|
| + location.reload();
|
| + });
|
| +} else {
|
| + runAfterLayoutAndPaint(function() {
|
| + shouldBe(String(document.querySelector("#frag").clientWidth), '200');
|
| + history.back();
|
| + finishJSTest();
|
| + });
|
| +}
|
| +
|
| +</script>
|
|
|