Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: LayoutTests/fast/loader/scroll-restore-target-pseudo.html

Issue 1165233002: Apply :target styling even if fragment scrolling was skipped. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « no previous file | LayoutTests/fast/loader/scroll-restore-target-pseudo-expected.txt » ('j') | Source/core/frame/FrameView.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698