Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator Rollup #6761

Merged
merged 14 commits into from Dec 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions extensions/amp-access/0.1/test/validator-amp-access.out
@@ -1 +1,2 @@
PASS
amp-access/0.1/test/validator-amp-access.html:69:7 The tag 'amp-analytics' is missing or incorrect, but required by 'amp-analytics extension .js script'. This will soon be an error. (see https://www.ampproject.org/docs/reference/extended/amp-analytics.html) [DEPRECATION]
1 change: 1 addition & 0 deletions extensions/amp-access/0.1/validator-amp-access.protoascii
Expand Up @@ -19,6 +19,7 @@ tags: { # amp-access
spec_name: "amp-access extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-access extension .json script"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -20,6 +20,7 @@ tags: { # amp-accordion
spec_name: "amp-accordion extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-accordion"
attrs: {
name: "async"
mandatory: true
Expand Down
4 changes: 4 additions & 0 deletions extensions/amp-ad/0.1/validator-amp-ad.protoascii
Expand Up @@ -22,6 +22,10 @@ tags: { # amp-ad
spec_name: "amp-ad extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
# This should also require either amp-ad or amp-embed, but we don't have
# a mechanism for requiring A or B currently, so this is not checked.
# also_requires_tag_warning: "amp-ad"
# also_requires_tag_warning: "amp-embed"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -22,6 +22,7 @@ tags: { # amp-analytics
spec_name: "amp-analytics extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-analytics"
attrs: {
name: "async"
mandatory: true
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-anim/0.1/validator-amp-anim.protoascii
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-anim
spec_name: "amp-anim extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-anim"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -20,6 +20,7 @@ tags: { # amp-apester-media
spec_name: "amp-apester-media extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-apester-media"
attrs: {
name: "async"
mandatory: true
Expand Down
32 changes: 32 additions & 0 deletions extensions/amp-auto-ads/0.1/test/validator-amp-auto-ads.html
@@ -0,0 +1,32 @@
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the license.
-->
<!--
Test Description: Basic test for amp-auto-ad.
-->
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<link rel="canonical" href="./regular-html-version.html" />
<meta name="viewport" content="width=device-width,minimum-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-auto-ads" src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"></script>
</head>
<body>
<amp-auto-ads type="adsense" data-ad-client="ca-pub-2005682797531342"></amp-auto-ads>
</body>
</html>
@@ -0,0 +1 @@
PASS
8 changes: 8 additions & 0 deletions extensions/amp-auto-ads/0.1/validator-amp-auto-ads.protoascii
Expand Up @@ -18,6 +18,8 @@ tags: { # amp-auto-ads
tag_name: "SCRIPT"
spec_name: "amp-auto-ads extension .js script"
mandatory_parent: "HEAD"
unique: true
also_requires_tag: "amp-auto-ads"
attrs: {
name: "async"
mandatory: true
Expand All @@ -44,10 +46,16 @@ tags: { # amp-auto-ads
error_message: "contents"
}
}
spec_url: "https://github.com/ampproject/amphtml/issues/6196"
}
tags: { # <amp-auto-ads>
html_format: AMP
tag_name: "AMP-AUTO-ADS"
disallowed_ancestor: "AMP-AUTO-ADS"
disallowed_ancestor: "AMP-SIDEBAR"
also_requires_tag: "amp-auto-ads extension .js script"
attrs: { name: "type" mandatory: true }
attr_lists: "extended-amp-global"

spec_url: "https://github.com/ampproject/amphtml/issues/6196"
}
59 changes: 59 additions & 0 deletions extensions/amp-bind/0.1/test/validator-amp-bind.html
@@ -0,0 +1,59 @@
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the license.
-->
<!--
Test Description: Basic test for amp-bind.
-->
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<title>amp-bind</title>
<link rel="canonical" href="amps.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Questrial" rel="stylesheet" type="text/css">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>

<style amp-custom>
.redBackground {
background-color: red;
}
</style>
</head>

<body>
<amp-state id="myState">
<script type="application/json">
{
"myStateKey1": "myStateValue1"
}
</script>
</amp-state>

<button onclick="AMP.toggleExperiment('amp-bind');window.location.href=window.location.href;">Toggle Experiment</button>

<p [text]="foo">After clicking the button below, this will read 'foo'<p>
<p id="foo" [text]="foo + 'bar'">And this will read 'foobar'<p>
<p [text]="myState.myStateKey1">This will read 'myStateValue1'<p>
<button [disabled]="isButtonDisabled">This button will be disabled</button>
<p [class]="textClass">This text will have have a red background color</p>
<amp-img src="https://ampbyexample.com/img/Border_Collie.jpg" [src]="imgSrc" width=100 [width]="imgSize" height=100 [height]="imgSize" alt="asdf" [alt]="imgAlt"></amp-img>
<p>The image above will increase in size and change its src</p>
<hr>
<button on="tap:AMP.setState(foo='foo', isButtonDisabled=true, textClass='redBackground', imgSrc='https://ampbyexample.com/img/Shetland_Sheepdog.jpg', imgSize=200, imgAlt='Sheepdog', videoSrc='https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4')">Click me</button>
</body>
</html>
10 changes: 10 additions & 0 deletions extensions/amp-bind/0.1/test/validator-amp-bind.out
@@ -0,0 +1,10 @@
FAIL
amp-bind/0.1/test/validator-amp-bind.html:39:2 The parent tag of tag 'amp-state' is 'body', but it can only be 'head'. (see https://www.ampproject.org/docs/reference/extended/amp-bind.html) [AMP_TAG_PROBLEM]
amp-bind/0.1/test/validator-amp-bind.html:47:2 The attribute 'onclick' may not appear in tag 'button'. [DISALLOWED_HTML]
amp-bind/0.1/test/validator-amp-bind.html:49:2 The attribute '[text]' may not appear in tag 'p'. [DISALLOWED_HTML]
amp-bind/0.1/test/validator-amp-bind.html:50:2 The attribute '[text]' may not appear in tag 'p'. [DISALLOWED_HTML]
amp-bind/0.1/test/validator-amp-bind.html:51:2 The attribute '[text]' may not appear in tag 'p'. [DISALLOWED_HTML]
amp-bind/0.1/test/validator-amp-bind.html:52:2 The attribute '[disabled]' may not appear in tag 'button'. [DISALLOWED_HTML]
amp-bind/0.1/test/validator-amp-bind.html:53:2 The attribute '[class]' may not appear in tag 'p'. [DISALLOWED_HTML]
amp-bind/0.1/test/validator-amp-bind.html:54:2 The attribute '[src]' may not appear in tag 'amp-img'. (see https://www.ampproject.org/docs/reference/amp-img.html) [AMP_TAG_PROBLEM]
amp-bind/0.1/test/validator-amp-bind.html:59:7 The tag 'amp-state' is missing or incorrect, but required by 'amp-bind extension .js script'. (see https://www.ampproject.org/docs/reference/extended/amp-bind.html) [AMP_TAG_PROBLEM]
4 changes: 3 additions & 1 deletion extensions/amp-bind/0.1/validator-amp-bind.protoascii
Expand Up @@ -18,7 +18,8 @@ tags: { # amp-bind
tag_name: "SCRIPT"
spec_name: "amp-bind extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
unique: true
also_requires_tag: "amp-state"
attrs: {
name: "async"
mandatory: true
Expand Down Expand Up @@ -49,6 +50,7 @@ tags: { # amp-bind
}
tags: { # <amp-state>
html_format: AMP
disallowed_ancestor: "AMP-SIDEBAR"
tag_name: "AMP-STATE"
mandatory_parent: "HEAD"
also_requires_tag: "amp-bind extension .js script"
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-brid-player
spec_name: "amp-brid-player extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-brid-player"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-brightcove
spec_name: "amp-brightcove extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-brightcove"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-carousel
spec_name: "amp-carousel extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-carousel"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -20,6 +20,7 @@ tags: { # amp-dailymotion
spec_name: "amp-dailymotion extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-dailymotion"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-experiment
spec_name: "amp-experiment extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-experiment"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-facebook
spec_name: "amp-facebook extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-facebook"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-fit-text
spec_name: "amp-fit-text extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-fit-text"
attrs: {
name: "async"
mandatory: true
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-font/0.1/validator-amp-font.protoascii
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-font
spec_name: "amp-font extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-font"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -20,6 +20,7 @@ tags: { # <script custom-element="amp-fx-flying-carpet">
spec_name: "amp-fx-flying-carpet extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-fx-flying-carpet"
attrs: {
name: "async"
mandatory: true
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-gfycat/0.1/validator-amp-gfycat.protoascii
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-gfycat
spec_name: "amp-gfycat extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-gfycat"
attrs: {
name: "async"
mandatory: true
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-hulu/0.1/validator-amp-hulu.protoascii
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-hulu
spec_name: "amp-hulu extension .js script"
mandatory_parent: "HEAD"
unique: true
also_requires_tag: "amp-hulu"
attrs: {
name: "async"
mandatory: true
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-iframe/0.1/validator-amp-iframe.protoascii
Expand Up @@ -20,6 +20,7 @@ tags: { # amp-iframe
spec_name: "amp-iframe extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-iframe"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -20,6 +20,7 @@ tags: { # amp-image-lightbox
spec_name: "amp-image-lightbox extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-image-lightbox"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-instagram
spec_name: "amp-instagram extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-instagram"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -20,6 +20,7 @@ tags: { # amp-install-serviceworker
spec_name: "amp-install-serviceworker extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-install-serviceworker"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-jwplayer
spec_name: "amp-jwplayer extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-jwplayer"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-kaltura-player
spec_name: "amp-kaltura-player extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-kaltura-player"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-lightbox
spec_name: "amp-lightbox extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-lightbox"
attrs: {
name: "async"
mandatory: true
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-list/0.1/validator-amp-list.protoascii
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-list
spec_name: "amp-list extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-list"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -20,6 +20,7 @@ tags: { # amp-live-list
spec_name: "amp-live-list extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-live-list"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -24,6 +24,7 @@ tags: { # amp-mustache
spec_name: "amp-mustache extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-mustache extension .js script"
attrs: {
name: "async"
mandatory: true
Expand Down
Expand Up @@ -21,6 +21,7 @@ tags: { # amp-o2-player
spec_name: "amp-o2-player extension .js script"
mandatory_parent: "HEAD"
unique_warning: true
also_requires_tag_warning: "amp-o2-player"
attrs: {
name: "async"
mandatory: true
Expand Down
@@ -1,4 +1,4 @@
FAIL
amp-ooyala-player/0.1/test/validator-amp-ooyala.html:51:4 The mandatory attribute 'data-pcode' is missing in tag 'amp-ooyala-player'. (see https://www.ampproject.org/docs/reference/extended/amp-ooyala-player.html) [AMP_TAG_PROBLEM]
amp-ooyala-player/0.1/test/validator-amp-ooyala.html:59:4 The mandatory attribute 'data-embedcode' is missing in tag 'amp-ooyala-player'. (see https://www.ampproject.org/docs/reference/extended/amp-ooyala-player.html) [AMP_TAG_PROBLEM]
amp-ooyala-player/0.1/test/validator-amp-ooyala.html:67:4 The mandatory attribute 'data-playerid' is missing in tag 'amp-ooyala-player'. (see https://www.ampproject.org/docs/reference/extended/amp-ooyala-player.html) [AMP_TAG_PROBLEM]
amp-ooyala-player/0.1/test/validator-amp-ooyala.html:67:4 The mandatory attribute 'data-playerid' is missing in tag 'amp-ooyala-player'. (see https://www.ampproject.org/docs/reference/extended/amp-ooyala-player.html) [AMP_TAG_PROBLEM]
Expand Up @@ -19,6 +19,7 @@ tags: { # amp-ooyala-player
spec_name: "amp-ooyala-player extension .js script"
mandatory_parent: "HEAD"
also_requires_tag: "amp-ooyala-player"
unique: true
attrs: {
name: "async"
mandatory: true
Expand Down