Chromium Code Reviews| 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> |