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

Enable Saucelabs tests on Safari 11 and fix Inabox tests #24815

Merged
merged 2 commits into from
Sep 30, 2019
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 build-system/tasks/runtime-test/runtime-test-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function updateBrowsers(config) {
'SL_Firefox',
'SL_Edge_17',
'SL_Safari_12',
'SL_Safari_11',
'SL_IE_11',
// TODO(amp-infra): Evaluate and add more platforms here.
//'SL_Chrome_Android_7',
Expand Down
16 changes: 2 additions & 14 deletions test/integration/test-amphtml-ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('AMPHTML ad on AMP Page', () => {
{
amp: true,
extensions: ['amp-ad'],
frameStyle: 'height: 100vh',
body: `
<div style="height: 100vh"></div>
<amp-ad
Expand All @@ -65,13 +66,6 @@ describe('AMPHTML ad on AMP Page', () => {
`,
},
env => {
beforeEach(() => {
// TODO: This happens after the test page is fully rendered, so there's
// a split second where the test iframe is not yet resized; that's
// enough to trigger viewability on Safari. Fix this to unskip
env.iframe.style.height = '100vh';
});

it('should layout amp-img, amp-pixel, amp-analytics', () => {
// Open http://ads.localhost:9876/amp4test/a4a/12345 to see ad content
return testAmpComponentsBTF(env.win);
Expand Down Expand Up @@ -110,6 +104,7 @@ describe('AMPHTML ad on non-AMP page (inabox)', () => {
'BTF',
{
amp: false,
frameStyle: 'height: 100vh',
body: `
<div style="height: 100vh"></div>
<iframe
Expand All @@ -121,13 +116,6 @@ describe('AMPHTML ad on non-AMP page (inabox)', () => {
`,
},
env => {
beforeEach(() => {
// TODO: This happens after the test page is fully rendered, so there's
// a split second where the test iframe is not yet resized; that's
// enough to trigger viewability on Safari. Fix this to unskip
env.iframe.style.height = '100vh';
});

it('should layout amp-img, amp-pixel, amp-analytics', () => {
// See amp4test.js for creative content
return testAmpComponentsBTF(env.win);
Expand Down
6 changes: 5 additions & 1 deletion testing/describes.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ class IntegrationFixture {
? undefined
: this.spec.extensions.join(',');
const ampDocType = this.spec.ampdoc || 'single';
const style = this.spec.frameStyle;

let url =
this.spec.amp === false
Expand All @@ -527,7 +528,10 @@ class IntegrationFixture {
src = addParamsToUrl('/amp4test/compose-shadow', {docUrl});
}

env.iframe = createElementWithAttributes(document, 'iframe', {src});
env.iframe = createElementWithAttributes(document, 'iframe', {
src,
style,
});
env.iframe.onload = function() {
env.win = env.iframe.contentWindow;
resolve();
Expand Down