-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from Lullabot/handle-deprecation
Issue deprecation tag warnings
- Loading branch information
Showing
13 changed files
with
362 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
tests/test-data/full-html/new_and_old_boilerplate_mixed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!-- | ||
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: | ||
This test contains the new boilerplate in the javascript-enabled version | ||
but the old, opacity-based one inside noscript. This is not allowed. | ||
--> | ||
<!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>body {opacity: 1}</style></noscript> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
</head> | ||
<body> | ||
Hello, world. | ||
</body> | ||
</html> |
89 changes: 89 additions & 0 deletions
89
tests/test-data/full-html/new_and_old_boilerplate_mixed.html.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
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: | ||
This test contains the new boilerplate in the javascript-enabled version | ||
but the old, opacity-based one inside noscript. This is not allowed. | ||
--><html amp><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>body {opacity: 1}</style></noscript> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
</head> | ||
<body> | ||
Hello, world. | ||
</body> | ||
|
||
</html> | ||
|
||
|
||
ORIGINAL HTML | ||
--------------- | ||
Line 1: <!-- | ||
Line 2: Copyright 2015 The AMP HTML Authors. All Rights Reserved. | ||
Line 3: | ||
Line 4: Licensed under the Apache License, Version 2.0 (the "License"); | ||
Line 5: you may not use this file except in compliance with the License. | ||
Line 6: You may obtain a copy of the License at | ||
Line 7: | ||
Line 8: http://www.apache.org/licenses/LICENSE-2.0 | ||
Line 9: | ||
Line 10: Unless required by applicable law or agreed to in writing, software | ||
Line 11: distributed under the License is distributed on an "AS-IS" BASIS, | ||
Line 12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
Line 13: See the License for the specific language governing permissions and | ||
Line 14: limitations under the license. | ||
Line 15: --> | ||
Line 16: <!-- | ||
Line 17: Test Description: | ||
Line 18: This test contains the new boilerplate in the javascript-enabled version | ||
Line 19: but the old, opacity-based one inside noscript. This is not allowed. | ||
Line 20: --> | ||
Line 21: <!doctype html> | ||
Line 22: <html ⚡> | ||
Line 23: <head> | ||
Line 24: <meta charset="utf-8"> | ||
Line 25: <link rel="canonical" href="./regular-html-version.html" /> | ||
Line 26: <meta name="viewport" content="width=device-width,minimum-scale=1"> | ||
Line 27: <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> | ||
Line 28: <noscript><style>body {opacity: 1}</style></noscript> | ||
Line 29: <script async src="https://cdn.ampproject.org/v0.js"></script> | ||
Line 30: </head> | ||
Line 31: <body> | ||
Line 32: Hello, world. | ||
Line 33: </body> | ||
Line 34: </html> | ||
Line 35: | ||
|
||
|
||
|
||
AMP-HTML Validation Issues and Fixes | ||
------------------------------------- | ||
FAIL | ||
|
||
<style> on line 28 | ||
- The tag 'noscript > style[amp-boilerplate] - old variant' is deprecated - use 'noscript > style[amp-boilerplate]' instead. | ||
[code: DEPRECATED_TAG category: DEPRECATION see: https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md] | ||
|
||
GLOBAL WARNING | ||
- The tag 'noscript > style[amp-boilerplate]' is missing or incorrect, but required by 'head > style[amp-boilerplate]'. | ||
[code: TAG_REQUIRED_BY_MISSING category: GENERIC see: https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md] | ||
|
||
COMPONENT NAMES WITH JS PATH | ||
------------------------------ | ||
No custom amp script includes required |
35 changes: 35 additions & 0 deletions
35
tests/test-data/full-html/new_and_old_boilerplate_mixed2.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- | ||
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: | ||
This test contains the old, opacity-based boilerplate in the | ||
javascript-enabled version, but the new one inside noscript. This is | ||
not allowed. | ||
--> | ||
<!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>body {opacity: 0}</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> | ||
</head> | ||
<body> | ||
Hello, world. | ||
</body> | ||
</html> |
91 changes: 91 additions & 0 deletions
91
tests/test-data/full-html/new_and_old_boilerplate_mixed2.html.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
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: | ||
This test contains the old, opacity-based boilerplate in the | ||
javascript-enabled version, but the new one inside noscript. This is | ||
not allowed. | ||
--><html amp><head> | ||
<meta charset="utf-8"> | ||
<link rel="canonical" href="./regular-html-version.html"> | ||
<meta name="viewport" content="width=device-width,minimum-scale=1"> | ||
<style>body {opacity: 0}</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> | ||
</head> | ||
<body> | ||
Hello, world. | ||
</body> | ||
|
||
</html> | ||
|
||
|
||
ORIGINAL HTML | ||
--------------- | ||
Line 1: <!-- | ||
Line 2: Copyright 2015 The AMP HTML Authors. All Rights Reserved. | ||
Line 3: | ||
Line 4: Licensed under the Apache License, Version 2.0 (the "License"); | ||
Line 5: you may not use this file except in compliance with the License. | ||
Line 6: You may obtain a copy of the License at | ||
Line 7: | ||
Line 8: http://www.apache.org/licenses/LICENSE-2.0 | ||
Line 9: | ||
Line 10: Unless required by applicable law or agreed to in writing, software | ||
Line 11: distributed under the License is distributed on an "AS-IS" BASIS, | ||
Line 12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
Line 13: See the License for the specific language governing permissions and | ||
Line 14: limitations under the license. | ||
Line 15: --> | ||
Line 16: <!-- | ||
Line 17: Test Description: | ||
Line 18: This test contains the old, opacity-based boilerplate in the | ||
Line 19: javascript-enabled version, but the new one inside noscript. This is | ||
Line 20: not allowed. | ||
Line 21: --> | ||
Line 22: <!doctype html> | ||
Line 23: <html ⚡> | ||
Line 24: <head> | ||
Line 25: <meta charset="utf-8"> | ||
Line 26: <link rel="canonical" href="./regular-html-version.html" /> | ||
Line 27: <meta name="viewport" content="width=device-width,minimum-scale=1"> | ||
Line 28: <style>body {opacity: 0}</style> | ||
Line 29: <noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | ||
Line 30: <script async src="https://cdn.ampproject.org/v0.js"></script> | ||
Line 31: </head> | ||
Line 32: <body> | ||
Line 33: Hello, world. | ||
Line 34: </body> | ||
Line 35: </html> | ||
Line 36: | ||
|
||
|
||
|
||
AMP-HTML Validation Issues and Fixes | ||
------------------------------------- | ||
FAIL | ||
|
||
<style> on line 28 | ||
- The tag 'head > style[amp-boilerplate] - old variant' is deprecated - use 'head > style[amp-boilerplate]' instead. | ||
[code: DEPRECATED_TAG category: DEPRECATION see: https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md] | ||
|
||
GLOBAL WARNING | ||
- The tag 'head > style[amp-boilerplate]' is missing or incorrect, but required by 'noscript > style[amp-boilerplate]'. | ||
[code: TAG_REQUIRED_BY_MISSING category: GENERIC see: https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md] | ||
|
||
COMPONENT NAMES WITH JS PATH | ||
------------------------------ | ||
No custom amp script includes required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!doctype html> | ||
<html ⚡> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Twitter examples</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>body {opacity: 0}</style><noscript><style>body {opacity: 1}</style></noscript> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
</head> | ||
<body> | ||
<h1>AMP boilerplate</h1> | ||
<h2>Testing if the old validator is still accepted.</h2> | ||
<p> | ||
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..." | ||
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..." | ||
</p> | ||
</body> | ||
</html> |
Oops, something went wrong.