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> |