Skip to content

Commit bc1e70b

Browse files
committed
Add test for amp-story-page[next-page-no-ad], input[type=button], and LTS AMP runtime
1 parent 398f3f1 commit bc1e70b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

tests/php/test-tag-and-attribute-sanitizer.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static function () {
499499
'',
500500
'
501501
<amp-story standalone live-story-disabled supports-landscape title="My Story" publisher="The AMP Team" publisher-logo-src="https://example.com/logo/1x1.png" poster-portrait-src="https://example.com/my-story/poster/3x4.jpg" poster-square-src="https://example.com/my-story/poster/1x1.jpg" poster-landscape-src="https://example.com/my-story/poster/4x3.jpg" background-audio="my.mp3">
502-
<amp-story-page id="my-first-page">
502+
<amp-story-page id="my-first-page" next-page-no-ad>
503503
<amp-story-grid-layer template="fill">
504504
<amp-img id="object1" animate-in="rotate-in-left" src="https://example.ampproject.org/helloworld/bg1.jpg" width="900" height="1600">
505505
</amp-img>
@@ -716,8 +716,8 @@ static function () {
716716
],
717717

718718
'form' => [
719-
'<form method="get" action="/form/search-html/get" target="_blank"><fieldset><label><span>Search for</span><input type="search" placeholder="test" name="term" required></label><input type="submit" value="Search"></fieldset></form>',
720-
'<form method="get" action="/form/search-html/get" target="_blank"><fieldset><label><span>Search for</span><input type="search" placeholder="test" name="term" required></label><input type="submit" value="Search"></fieldset></form>',
719+
'<form method="get" action="/form/search-html/get" target="_blank"><fieldset><label><span>Search for</span><input type="search" placeholder="test" name="term" required></label><input type="submit" value="Search"><input type="button" value="Open Lightbox" on="tap:lb1.open"></fieldset></form>',
720+
null,
721721
[ 'amp-form' ],
722722
],
723723

@@ -2688,6 +2688,16 @@ public function get_html_data() {
26882688
[],
26892689
[ AMP_Tag_And_Attribute_Sanitizer::MANDATORY_CDATA_MISSING_OR_INCORRECT ],
26902690
],
2691+
'amp_runtime' => [
2692+
'<html><head><meta charset="utf-8"><script async src="https://cdn.ampproject.org/v0.js" crossorigin="anonymous"></script></head><body></body></html>',
2693+
null,
2694+
[],
2695+
],
2696+
'amp_runtime_lts' => [
2697+
'<html><head><meta charset="utf-8"><script async src="https://cdn.ampproject.org/lts/v0.js" crossorigin="anonymous"></script></head><body></body></html>',
2698+
null,
2699+
[],
2700+
],
26912701
];
26922702

26932703
$bad_dev_mode_document = sprintf(

0 commit comments

Comments
 (0)