Skip to content

Commit 26f7d62

Browse files
committed
Update test cases for post preview script xpath
1 parent da9d8b5 commit 26f7d62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: tests/php/test-amp-helper-functions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,7 @@ static function () {
19381938
'//*[ @id = "wpadminbar" ]',
19391939
'//*[ @id = "wpadminbar" ]//*',
19401940
'//style[ @id = "admin-bar-inline-css" ]',
1941-
'//script[ not( @src ) and contains( text(), "document.location.search" ) and contains( text(), "preview=true" ) and contains( text(), "unload" ) and contains( text(), "window.name" ) and contains( text(), "wp-preview-' . $post . '" ) ]',
1941+
'//script[ not( @src ) and contains( text(), "document.location.search" ) and contains( text(), "preview=true" ) and ( contains( text(), "pagehide" ) or contains( text(), "unload" ) ) and contains( text(), "window.name" ) and contains( text(), "wp-preview-' . $post . '" ) ]',
19421942
'//link[@rel="manifest" and contains(@href, "web-app-manifest")]',
19431943
],
19441944
$sanitizers[ AMP_Dev_Mode_Sanitizer::class ]['element_xpaths']

0 commit comments

Comments
 (0)