Skip to content

Commit d280189

Browse files
committed
Add tests for tweetid binding, Google Fonts v2, and enterkeyhint
1 parent fad7c8f commit d280189

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

tests/php/test-amp-style-sanitizer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,10 @@ public function get_font_urls() {
21472147
'http://fonts.googleapis.com/css?family=Tangerine',
21482148
[],
21492149
],
2150+
'tangerine4' => [
2151+
'https://fonts.googleapis.com/css2?family=Tangerine',
2152+
[],
2153+
],
21502154
'typekit' => [
21512155
'https://use.typekit.net/abc.css',
21522156
[],

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,9 @@ static function () {
585585
],
586586

587587
'amp-twitter' => [
588-
'<amp-twitter width="321" height="543" layout="responsive" data-tweetid="98765"></amp-twitter>',
589-
null, // No change.
590-
[ 'amp-twitter' ],
588+
'<amp-twitter width="321" height="543" layout="responsive" data-tweetid="98765" [data-tweetid]="somestate"></amp-twitter>',
589+
'<amp-twitter width="321" height="543" layout="responsive" data-tweetid="98765" data-amp-bind-data-tweetid="somestate"></amp-twitter>',
590+
[ 'amp-twitter', 'amp-bind' ],
591591
],
592592

593593
'amp-user-notification' => [
@@ -730,7 +730,7 @@ static function () {
730730
],
731731

732732
'form' => [
733-
'<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>',
733+
'<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" enterkeyhint="search"><input type="button" value="Open Lightbox" on="tap:lb1.open"></fieldset></form>',
734734
null,
735735
[ 'amp-form' ],
736736
],

0 commit comments

Comments
 (0)