File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
plugins/image-prioritizer/tests Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,34 @@ public function data_provider_test_filter_tag_walker_visitors(): array {
86
86
' ,
87
87
),
88
88
89
+ 'no-url-metrics-with-non-background-image-style ' => array (
90
+ 'set_up ' => static function (): void {},
91
+ 'buffer ' => '
92
+ <html lang="en">
93
+ <head>
94
+ <meta charset="utf-8">
95
+ <title>...</title>
96
+ </head>
97
+ <body>
98
+ <div style="background-color: black; color: white; width:100%; height: 200px;">This is so background!</div>
99
+ </body>
100
+ </html>
101
+ ' ,
102
+ // There should be no data-od-xpath added to the DIV because it is using a data: URL for the background-image.
103
+ 'expected ' => '
104
+ <html lang="en">
105
+ <head>
106
+ <meta charset="utf-8">
107
+ <title>...</title>
108
+ </head>
109
+ <body>
110
+ <div style="background-color: black; color: white; width:100%; height: 200px;">This is so background!</div>
111
+ <script type="module">/* import detect ... */</script>
112
+ </body>
113
+ </html>
114
+ ' ,
115
+ ),
116
+
89
117
'no-url-metrics-with-data-url-image ' => array (
90
118
'set_up ' => static function (): void {},
91
119
// Smallest PNG courtesy of <https://evanhahn.com/worlds-smallest-png/>.
You can’t perform that action at this time.
0 commit comments