Skip to content

Commit

Permalink
Skip test on old chrome (#8968)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouyx committed Apr 27, 2017
1 parent f5a864a commit c0be98e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion extensions/amp-ad/0.1/test/test-amp-ad-3p-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ describe('amp-ad-3p-impl', () => {
});
});

// TODO(#8965) unskip test
describe('preconnectCallback', () => {
it('should add preconnect and prefech to DOM header', () => {
it.configure().skipOldChrome()
.run('should add preconnect and prefech to DOM header', () => {
ad3p.buildCallback();
ad3p.preconnectCallback();
return whenFirstVisible.then(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ describe('amp-ad-xorigin-iframe-handler', () => {
iframeHandler.init(iframe);
});

it('should be able to use embed-state API', () => {
// TODO(#8965) unskip test
it.configure().skipOldChrome()
.run('should be able to use embed-state API', () => {
iframe.postMessageToParent({
type: 'send-embed-state',
sentinel: 'amp3ptest' + testIndex,
Expand Down
6 changes: 6 additions & 0 deletions test/_init_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ class TestConfig {
return this.skip(this.platform.isChrome.bind(this.platform));
}

skipOldChrome() {
return this.skip(() => {
return this.platform.isChrome() && this.platform.getMajorVersion() < 48;
});
}

skipEdge() {
return this.skip(this.platform.isEdge.bind(this.platform));
}
Expand Down

0 comments on commit c0be98e

Please sign in to comment.