Skip to content

Commit

Permalink
pass fixture files through the postHTML transformer code (#30681)
Browse files Browse the repository at this point in the history
* make it so that src transformation only happens strictly in scripts/script-transform.ts

each module should do 1 thing and 1 thing only. currently the module
transformer also did a src/url transformation. this caused weird
mismatches when they are ran together.

- added looseScriptSrcCheck to allow for non cdn domains. This will
  allow us to transition from the bad fixture files to having all html
  files be valid AMP HTML by default.

* temp

* temp

* add transform back to integration

* fix html

* fix integration

* temp

* temp

* make transformers have a loose mode to be more forgiving on script src

* add more tests and fix bug for extention retention

* allow for mjs files to be served by the test server

* add glob to load mjs files in karma server

* lint fixes

* lint html

* break up this PR

* fix bad error formatting

* apply recs

* Update build-system/server/new-server/transforms/transform.ts

Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com>

* Update build-system/server/new-server/transforms/utilities/option-set.ts

Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com>

* fix other locations of "FORTESTING"

* fix esm and non esm tests to be green

* use writeFileSync instead of async method. seems to be a race

* guarantee directory exists first

* skip failing IE test temporarily

* applied recs

* temp "only"

* dont reroute to max json files

* change error to warning

* fix max builds and integration tests against max files

* revert bad rebase

* fix all urls to be valid for js resources

* removing debugger

* re-run broken IE test

Co-authored-by: Caroline Liu <10456171+caroqliu@users.noreply.github.com>
  • Loading branch information
erwinmombay and caroqliu committed Oct 20, 2020
1 parent b146267 commit a9834d6
Show file tree
Hide file tree
Showing 24 changed files with 1,107 additions and 100 deletions.
51 changes: 38 additions & 13 deletions build-system/tasks/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,25 @@ const argv = require('minimist')(process.argv.slice(2));
const fs = require('fs-extra');
const globby = require('globby');
const log = require('fancy-log');
const pathModule = require('path');
const {
RuntimeTestRunner,
RuntimeTestConfig,
} = require('./runtime-test/runtime-test-base');
const {buildNewServer} = require('../server/typescript-compile');
const {buildRuntime} = require('../common/utils');
const {cyan, green} = require('ansi-colors');
const {cyan, yellow} = require('ansi-colors');
const {maybePrintArgvMessages} = require('./runtime-test/helpers');

const INTEGRATION_FIXTURES = [
'./test/fixtures/**/*.html',
'!./test/fixtures/e2e',
'!./test/fixtures/served',
'!./test/fixtures/performance',
];

let htmlTransform;

class Runner extends RuntimeTestRunner {
constructor(config) {
super(config);
Expand All @@ -42,25 +53,38 @@ class Runner extends RuntimeTestRunner {
}

async function buildTransformedHtml() {
const filePaths = await globby('./test/fixtures/**/*.html');
let normalizedFilePath;
const filePaths = await globby(INTEGRATION_FIXTURES);
fs.ensureDirSync('./test-bin/');
for (const filePath of filePaths) {
const normalizedFilePath = pathModule.normalize(filePath);
await transformAndWriteToTestFolder(normalizedFilePath);
}
}

async function transformAndWriteToTestFolder(filePath) {
try {
log(
green('Copying integration test files to'),
cyan('test-bin/') + green('...')
);
for (const filePath of filePaths) {
await fs.copySync(filePath, `./test-bin/${filePath}`);
}
const html = await htmlTransform(filePath);
const fullFilePath = `./test-bin/${filePath}`;
const targetDir = pathModule.dirname(fullFilePath);
fs.ensureDirSync(targetDir);
fs.writeFileSync(fullFilePath, html);
} catch (e) {
console./*OK*/ log(
`${normalizedFilePath} could not be transformed by the postHTML ` +
`pipeline.\n${e.message}`
log(
yellow('WARNING:'),
cyan(
`${filePath} could not be transformed by the postHTML ` +
'pipeline. Falling back to copying.'
),
yellow(`Reason: ${e.message}`)
);
fs.copySync(filePath, `./test-bin/${filePath}`);
}
}

async function integration() {
buildNewServer();
htmlTransform = require('../server/new-server/transforms/dist/transform')
.transform;
await buildTransformedHtml();

maybePrintArgvMessages();
Expand Down Expand Up @@ -89,6 +113,7 @@ integration.flags = {
' Allow debug statements by auto opening devtools. NOTE: This only ' +
'works in non headless mode.',
'edge': ' Runs tests on Edge',
'esm': ' Runs against module/nomodule build',
'firefox': ' Runs tests on Firefox',
'files': ' Runs tests for specific files',
'grep': ' Runs tests that match the pattern',
Expand Down
4 changes: 2 additions & 2 deletions build-system/tasks/vendor-configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ async function vendorConfigs(opt_options) {
const srcPath = ['extensions/amp-analytics/0.1/vendors/*.json'];
const destPath = 'dist/v0/analytics-vendors/';

// ignore test json if not fortesting
if (!(argv.fortesting || options.fortesting)) {
// ignore test json if not fortesting or build.
if (!(argv.fortesting || options.fortesting || argv._.includes('build'))) {
srcPath.push('!extensions/amp-analytics/0.1/vendors/_fake_.json');
}

Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/3p-ad.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</style>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-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="/dist/amp.js"></script>
<script async custom-element="amp-ad" src="/dist/v0/amp-ad-0.1.max.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<!-- use custom url to force same origin -->
<meta name="amp-3p-iframe-src" content="http://localhost:9876/dist.3p/current/frame.max.html">
</head>
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-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="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<span id="spanToHide">This text will be hidden by #hideBtn</span>
Expand Down
1,044 changes: 1,010 additions & 34 deletions test/fixtures/amp-cupcake-ad.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test/fixtures/amp-pan-zoom.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<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'>
<script async custom-element="amp-pan-zoom" src="/dist/v0/amp-pan-zoom-0.1.max.js"></script>
<script async src="/dist/amp.js"></script>
<script async custom-element="amp-pan-zoom" src="https://cdn.ampproject.org/v0/amp-pan-zoom-0.1.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<amp-pan-zoom id="amp-pan-zoom-1" layout="fixed" width="300" height="241">
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/boilerplate-new-visibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-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="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<h1>AMP boilerplate</h1>
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/boilerplate-old-opacity.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">

<style>body {opacity: 0}</style><noscript><style>body {opacity: 1}</style></noscript></noscript>
<script async src="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<h1>AMP boilerplate</h1>
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-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="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<p>
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/doubleclick.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="canonical" href="https://www.example.com/doubleclick.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-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="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<!-- use custom url to force same origin -->
<meta name="amp-3p-iframe-src" content="http://localhost:9876/dist.3p/current/frame.max.html">
</head>
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<title>AMP #0</title>
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script async custom-element="amp-iframe" src="/dist/v0/amp-iframe-0.1.max.js"></script>
<script async custom-element="amp-youtube" src="/dist/v0/amp-youtube-0.1.max.js"></script>
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-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="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/images-ie.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
</style>
<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="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<h1>AMP #0</h1>
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/images.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
</style>
<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="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<h1>AMP #0</h1>
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/overflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>amp-iframe</title>
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script async src="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-iframe" src="intentionally_wrong"></script>
<style amp-custom>
div[overflow] {
Expand Down
18 changes: 9 additions & 9 deletions test/fixtures/released.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
<title>Released AMP components</title>
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script async custom-element="amp-ad" src="/dist/v0/amp-ad-0.1.max.js"></script>
<script async custom-element="amp-video" src="/dist/v0/amp-video-0.1.max.js"></script>
<script async custom-element="amp-audio" src="/dist/v0/amp-audio-0.1.max.js"></script>
<script async custom-element="amp-anim" src="/dist/v0/amp-anim-0.1.max.js"></script>
<script async custom-element="amp-iframe" src="/dist/v0/amp-iframe-0.1.max.js"></script>
<script async custom-element="amp-instagram" src="/dist/v0/amp-instagram-0.1.max.js"></script>
<script async custom-element="amp-twitter" src="/dist/v0/amp-twitter-0.1.max.js"></script>
<script async custom-element="amp-youtube" src="/dist/v0/amp-youtube-0.1.max.js"></script>
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<script async custom-element="amp-video" src="https://cdn.ampproject.org/v0/amp-video-0.1.js"></script>
<script async custom-element="amp-audio" src="https://cdn.ampproject.org/v0/amp-audio-0.1.js"></script>
<script async custom-element="amp-anim" src="https://cdn.ampproject.org/v0/amp-anim-0.1.js"></script>
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
<script async custom-element="amp-instagram" src="https://cdn.ampproject.org/v0/amp-instagram-0.1.js"></script>
<script async custom-element="amp-twitter" src="https://cdn.ampproject.org/v0/amp-twitter-0.1.js"></script>
<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
<style amp-custom>
body {
max-width: 527px;
font-family: 'Questrial', Arial;
}
</style>
<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="/dist/amp.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<h1>Released AMP components</h1>
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/script-load-extension-footer-v0-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</amp-fit-text>
</body>
<footer>
<script custom-element="amp-fit-text" src="/dist/v0/amp-fit-text-0.1.max.js"></script>
<script src="/dist/amp.js"></script>
<script custom-element="amp-fit-text" src="https://cdn.ampproject.org/v0/amp-fit-text-0.1.js"></script>
<script src="https://cdn.ampproject.org/v0.js"></script>
</footer>
</html>
4 changes: 2 additions & 2 deletions test/fixtures/script-load-extension-head-v0-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-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 custom-element="amp-fit-text" src="/dist/v0/amp-fit-text-0.1.max.js"></script>
<script src="/dist/amp.js"></script>
<script custom-element="amp-fit-text" src="https://cdn.ampproject.org/v0/amp-fit-text-0.1.js"></script>
<script src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<amp-fit-text id="fortesting" width="300" height="200" layout="responsive" max-font-size="52">
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/script-load-extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-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 custom-element="amp-iframe" src="/dist/v0/amp-iframe-0.1.max.js"></script>
<script src="/dist/amp.js"></script>
<script custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
<script src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<amp-fit-text id="fortesting" width="300" height="200" layout="responsive" max-font-size="52">
Expand All @@ -23,6 +23,6 @@
</amp-iframe>
</body>
<footer>
<script custom-element="amp-fit-text" src="/dist/v0/amp-fit-text-0.1.max.js"></script>
<script custom-element="amp-fit-text" src="https://cdn.ampproject.org/v0/amp-fit-text-0.1.js"></script>
</footer>
</html>
4 changes: 2 additions & 2 deletions test/fixtures/script-load-v0-footer-extension-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</amp-fit-text>
</body>
<footer>
<script src="/dist/amp.js"></script>
<script custom-element="amp-fit-text" src="/dist/v0/amp-fit-text-0.1.max.js"></script>
<script src="https://cdn.ampproject.org/v0.js"></script>
<script custom-element="amp-fit-text" src="https://cdn.ampproject.org/v0/amp-fit-text-0.1.js"></script>
</footer>
</html>

0 comments on commit a9834d6

Please sign in to comment.