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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto.html

Issue 2047283002: Avoid touching z-index in StyleAdjuster by using an isStackingContext flag instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Animation expectation Created 4 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: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto.html b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto.html
new file mode 100644
index 0000000000000000000000000000000000000000..a9424bb2641b19e27d44e094c7da778cbae65106
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-non-auto.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+
+<div style="z-index: 20" id='nonPositionedDiv'></div>
+<div style="z-index: 20; position: absolute" id='positionedDiv'></div>
+
+<script>
+test(() => {
+ assert_equals(getComputedStyle(nonPositionedDiv).zIndex, '20', 'Computed style');
+ assert_equals(nonPositionedDiv.style.zIndex, '20', 'Inline style');
+}, 'z-index on non-positioned div');
+
+test(() => {
+ assert_equals(getComputedStyle(positionedDiv).zIndex, '20', 'Computed style');
+ assert_equals(positionedDiv.style.zIndex, '20', 'Inline style');
+}, 'z-index on positioned div');
+</script>

Powered by Google App Engine
This is Rietveld 408576698