Index: third_party/WebKit/LayoutTests/csspaint/style-before-pseudo.html |
diff --git a/third_party/WebKit/LayoutTests/csspaint/style-before-pseudo.html b/third_party/WebKit/LayoutTests/csspaint/style-before-pseudo.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6b4a08898621d82cdf99228ba281fab38ecb5ddb |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/csspaint/style-before-pseudo.html |
@@ -0,0 +1,42 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../resources/run-after-layout-and-paint.js"></script> |
+<script src="resources/test-runner-paint-worklet.js"></script> |
+<script src="resources/generate-paint-style-logging.js"></script> |
+<style> |
+ div { |
+ border-radius: 3px; |
+ } |
+ |
+ div::before { |
+ width: 100px; |
+ height: 100px; |
+ content: 'foo'; |
+ |
+ background-image: paint(test); |
+ border-radius: 2px; |
+ --foo: bar; |
+ } |
+</style> |
+</head> |
+<body> |
+<div></div> |
+<script> |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ importPaintWorkletAndTerminateTestAfterAsyncPaint( |
+ generatePaintStyleLogging([ |
+ '--bar', |
+ '--foo', |
+ 'border-radius', |
+ ])); |
+</script> |
+<p>This tests the style information in the paint callback.</p> |
+<p>See the devtools console for test output. The console should log:</p> |
+--bar: [null]<br> |
+--foo: bar<br> |
+border-radius: 2px |
+</body> |
+</html> |