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

✅ Allow amp-video-iframe[dock] #19521

Merged
merged 3 commits into from
Dec 6, 2018
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
Copyright 2018 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:
Tests for amp-video-docking tag with amp-video-iframe player.
-->
<!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-video-iframe" src="https://cdn.ampproject.org/v0/amp-video-iframe-latest.js"></script>
<script async custom-element="amp-video-docking" src="https://cdn.ampproject.org/v0/amp-video-docking-latest.js"></script>
</head>
<body>
<!-- Valid: dock with `amp-video-iframe` and `amp-video-docking` extensions-->
<amp-video-iframe
dock
layout=fill
width=300
height=500
poster="https://foo.com/image.png"
src="https://foo.com/video">
</amp-video-iframe>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
PASS
| <!--
| Copyright 2018 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:
| Tests for amp-video-docking tag with amp-video-iframe player.
| -->
| <!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-video-iframe" src="https://cdn.ampproject.org/v0/amp-video-iframe-latest.js"></script>
| <script async custom-element="amp-video-docking" src="https://cdn.ampproject.org/v0/amp-video-docking-latest.js"></script>
| </head>
| <body>
| <!-- Valid: dock with `amp-video-iframe` and `amp-video-docking` extensions-->
| <amp-video-iframe
| dock
| layout=fill
| width=300
| height=500
| poster="https://foo.com/image.png"
| src="https://foo.com/video">
| </amp-video-iframe>
| </body>
| </html>
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ FAIL
| <script async src="https://cdn.ampproject.org/v0.js"></script>
| <!-- Invalid: extension without player extension -->
| <script async custom-element="amp-video-docking" src="https://cdn.ampproject.org/v0/amp-video-docking-latest.js"></script>
>> ^~~~~~~~~
amp-video-docking/0.1/test/validator-amp-video-docking-no-player.html:29:2 The tag 'amp-video-docking for amp-video' requires including the 'amp-video' extension JavaScript. (see https://www.ampproject.org/docs/reference/components/amp-video-docking) [MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
| </head>
| <body>
| </body>
| </html>
>> ^~~~~~~~~
amp-video-docking/0.1/test/validator-amp-video-docking-no-player.html:33:6 The extension 'amp-video-docking' was found on this page, but is unused. Please remove this extension. [AMP_TAG_PROBLEM]
amp-video-docking/0.1/test/validator-amp-video-docking-no-player.html:33:6 The extension 'amp-video-docking' was found on this page, but is unused. Please remove this extension. [AMP_TAG_PROBLEM]
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
tags: { # amp-video-docking
html_format: AMP
tag_name: "SCRIPT"
spec_name: "amp-video-docking for amp-video"
spec_name: "amp-video-docking"
extension_spec: {
name: "amp-video-docking"
version: "0.1"
version: "latest"
}
requires_extension: "amp-video"
attr_lists: "common-extension-attrs"
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ attr_lists: {
name: "autoplay"
value: ""
}
attrs: {
name: "dock"
requires_extension: "amp-video-docking"
}
attrs: {
name: "implements-media-session"
value: ""
Expand Down