Skip to content

Commit

Permalink
Disallow amp-youtube in amp4ads (#24864)
Browse files Browse the repository at this point in the history
* Disallow amp-youtube in amp4ads

* Update test
  • Loading branch information
powerivq committed Oct 3, 2019
1 parent 40ab7a7 commit 46b05c1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
2 changes: 0 additions & 2 deletions extensions/amp-youtube/validator-amp-youtube.protoascii
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

tags: { # amp-youtube
html_format: AMP
html_format: AMP4ADS
html_format: ACTIONS
tag_name: "SCRIPT"
extension_spec: {
Expand All @@ -30,7 +29,6 @@ tags: { # amp-youtube
}
tags: { # <amp-youtube>
html_format: AMP
html_format: AMP4ADS
html_format: ACTIONS
tag_name: "AMP-YOUTUBE"
requires_extension: "amp-youtube"
Expand Down
1 change: 0 additions & 1 deletion validator/engine/validator_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,6 @@ describe('ValidatorRulesMakeSense', () => {
'amp-position-observer': ['0.1', 'latest'],
'amp-social-share': ['0.1', 'latest'],
'amp-video': ['0.1', 'latest'],
'amp-youtube': ['0.1', 'latest'],
};
// Verify extension is approved.
const extension = tagSpec.extensionSpec.name;
Expand Down
2 changes: 0 additions & 2 deletions validator/testdata/amp4ads_feature_tests/extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@
src="https://cdn.ampproject.org/v0/amp-vimeo-0.1.js"></script>
<script async custom-element="amp-vine"
src="https://cdn.ampproject.org/v0/amp-vine-0.1.js"></script>
<script async custom-element="amp-youtube"
src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>

<script async custom-template="amp-mustache"
src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script>
Expand Down
8 changes: 3 additions & 5 deletions validator/testdata/amp4ads_feature_tests/extensions.out
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,14 @@ amp4ads_feature_tests/extensions.html:113:2 Custom JavaScript is not allowed. (s
>> ^~~~~~~~~
amp4ads_feature_tests/extensions.html:115:2 Custom JavaScript is not allowed. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml#html-tags) [CUSTOM_JAVASCRIPT_DISALLOWED]
| src="https://cdn.ampproject.org/v0/amp-vine-0.1.js"></script>
| <script async custom-element="amp-youtube"
| src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
|
| <script async custom-template="amp-mustache"
| src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script>
| </head>
| <body></body></html>
>> ^~~~~~~~~
amp4ads_feature_tests/extensions.html:123:19 The extension 'amp-animation' was found on this page, but is unused. Please remove this extension. [AMP_TAG_PROBLEM]
amp4ads_feature_tests/extensions.html:121:19 The extension 'amp-animation' was found on this page, but is unused. Please remove this extension. [AMP_TAG_PROBLEM]
>> ^~~~~~~~~
amp4ads_feature_tests/extensions.html:123:19 The extension 'amp-lightbox' was found on this page, but is unused. Please remove this extension. [AMP_TAG_PROBLEM]
amp4ads_feature_tests/extensions.html:121:19 The extension 'amp-lightbox' was found on this page, but is unused. Please remove this extension. [AMP_TAG_PROBLEM]
>> ^~~~~~~~~
amp4ads_feature_tests/extensions.html:123:19 The extension 'amp-mustache' was found on this page, but is unused. Please remove this extension. [AMP_TAG_PROBLEM]
amp4ads_feature_tests/extensions.html:121:19 The extension 'amp-mustache' was found on this page, but is unused. Please remove this extension. [AMP_TAG_PROBLEM]

0 comments on commit 46b05c1

Please sign in to comment.