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

Use manifest and origin-manifest to look for banner source #6388

Merged
merged 2 commits into from Nov 29, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion examples/amp-fresh.amp.html
Expand Up @@ -11,7 +11,7 @@
<script async custom-element="amp-fresh" src="https://cdn.ampproject.org/v0/amp-fresh-0.1.js"></script>
<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>
<link rel="amp-manifest" href="medium-manifest.json">
<link rel="manifest" href="medium-manifest.json">
<script async src="./viewer-integr.js" data-amp-report-test="viewer-integr.js"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/article-fixed-header.amp.html
Expand Up @@ -238,7 +238,7 @@
<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>
<meta name="apple-itunes-app" content="app-id=828256236, app-argument=medium://p/cb7f223fad86">
<link rel="amp-manifest" href="medium-manifest.json">
<link rel="manifest" href="medium-manifest.json">
<script async src="https://cdn.ampproject.org/viewer/google/v5.js"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/article.amp.html
Expand Up @@ -219,7 +219,7 @@
<script async custom-element="amp-app-banner" src="https://cdn.ampproject.org/v0/amp-app-banner-0.1.js" data-amp-report-test="amp-app-banner.js"></script>
<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>
<meta name="apple-itunes-app" content="app-id=828256236, app-argument=medium://p/cb7f223fad86">
<link rel="amp-manifest" href="medium-manifest.json">
<link rel="manifest" href="medium-manifest.json">
<script async src="./viewer-integr.js" data-amp-report-test="viewer-integr.js"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-app-banner/0.1/amp-app-banner.js
Expand Up @@ -339,7 +339,7 @@ export class AmpAndroidAppBanner extends AbstractAppBanner {

const viewer = viewerForDoc(this.getAmpDoc());
this.manifestLink_ = this.win.document.head.querySelector(
'link[rel=manifest],link[rel=amp-manifest]');
'link[rel=manifest],link[rel=origin-manifest]');

const platform = platformFor(this.win);
// We want to fallback to browser builtin mechanism when possible.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-app-banner/0.1/test/test-amp-app-banner.js
Expand Up @@ -99,7 +99,7 @@ describe('amp-app-banner', () => {

if (config.manifest) {
const manifest = iframe.doc.createElement('link');
manifest.setAttribute('rel', 'amp-manifest');
manifest.setAttribute('rel', 'manifest');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a second test for origin-manifest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

manifest.setAttribute('href', config.manifest.href);
iframe.doc.head.appendChild(manifest);
sandbox.mock(xhrFor(iframe.win)).expects('fetchJson')
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-app-banner/amp-app-banner.md
Expand Up @@ -171,7 +171,7 @@ Not permitted: **disabled**
<head>
<meta name="apple-itunes-app"
content="app-id=123456789, app-argument=app-name://link/to/app-content">
<link rel="amp-manifest" href="https://link/to/manifest.json">
<link rel="manifest" href="https://link/to/manifest.json">
</head>

. . .
Expand Down