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

Unified Diff: third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.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: Update old z-index stacking context test 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/css3/blending/isolation-isolate-simple.html
diff --git a/third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html b/third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html
index 851c7658f61b8a1a8a8cf72c4508bf7eca750bbb..31eb076a12a3329049f67cbe38df88df9b869b3e 100644
--- a/third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html
+++ b/third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html
@@ -1,28 +1,26 @@
<!DOCTYPE HTML>
-<html>
-<head>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
<style>
- div {
- width: 10px;
- height: 10px;
- background: green;
- isolation:isolate;
- }
+div {
+ width: 10px;
+ height: 10px;
+ background: green;
+ isolation: isolate;
+}
</style>
-<!-- Isolation should create a stacking context. Test if "isolation:isolate" sets the zIndex to 0, instead of the default "auto" value. -->
-<body>
- <div id="isolator"></div>
- <div id="isolator_accelerated" style="transform: translateZ(0)"></div>
- <script src="../../resources/js-test.js"></script>
- <script>
- // Software path.
- var zIndex = getComputedStyle(document.getElementById("isolator")).zIndex;
- shouldBeZero(zIndex);
+<div id="isolator"></div>
+<div id="isolator_accelerated" style="transform: translateZ(0)"></div>
+
+<script>
+test(() => {
+ // Force style recalc.
+ getComputedStyle(isolator).zIndex;
+ getComputedStyle(isolator_accelerated).zIndex;
- // Hardware path.
- zIndex = getComputedStyle(document.getElementById("isolator_accelerated")).zIndex;
- shouldBeZero(zIndex);
- </script>
-</body>
-</html>
+ assert_true(internals.isStackingContext(isolator), 'software path');
+ assert_true(internals.isStackingContext(isolator_accelerated), 'hardware path');
rune 2016/06/09 09:10:25 I think we should avoid adding new internals APIs.
alancutter (OOO until 2018) 2016/06/10 04:59:30 Done. Removed the stacking context check from the
+}, 'CSS isolation should create a stacking context');
+</script>

Powered by Google App Engine
This is Rietveld 408576698