Skip to content

Commit

Permalink
revert some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dvoytenko committed Aug 15, 2019
1 parent 1d0b125 commit 05aa983
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 39 deletions.
4 changes: 0 additions & 4 deletions extensions/amp-access/0.1/test/test-login-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ describes.sandboxed('ViewerLoginDialog', {}, () => {
document: {
nodeType: /* DOCUMENT */ 9,
body: {},
addEventListener: function() {},
removeEventListener: function() {},
},
open: () => {
throw new Error('Not allowed');
Expand Down Expand Up @@ -183,8 +181,6 @@ describes.sandboxed('WebLoginDialog', {}, () => {
document: {
nodeType: /* DOCUMENT */ 9,
body: {},
addEventListener: function() {},
removeEventListener: function() {},
},
location: {
protocol: 'http:',
Expand Down
6 changes: 1 addition & 5 deletions test/unit/test-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ import {whenCalled} from '../../testing/test-helper.js';
*/
function actionService() {
const win = {
document: {
body: {},
addEventListener: function() {},
removeEventListener: function() {},
},
document: {body: {}},
services: {
vsync: {obj: {}},
},
Expand Down
2 changes: 0 additions & 2 deletions test/unit/test-cid.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ describes.sandboxed('cid', {}, () => {
nodeType: /* DOCUMENT */ 9,
body: {},
querySelector: () => {},
addEventListener: function() {},
removeEventListener: function() {},
},
navigator: window.navigator,
setTimeout: window.setTimeout,
Expand Down
2 changes: 0 additions & 2 deletions test/unit/test-custom-element-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ describes.realWin('CustomElement register', {amp: true}, env => {
},
},
body: {},
addEventListener: function() {},
removeEventListener: function() {},
};

elem1 = {
Expand Down
10 changes: 0 additions & 10 deletions test/unit/test-document-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ describe
getRootNode() {
return win.document;
},
addEventListener: function() {},
removeEventListener: function() {},
},
Math: {
random() {
Expand Down Expand Up @@ -116,8 +114,6 @@ describe
getRootNode() {
return win.document;
},
addEventListener: function() {},
removeEventListener: function() {},
},
Math: {
random() {
Expand Down Expand Up @@ -314,8 +310,6 @@ describe
getRootNode() {
return win.document;
},
addEventListener: function() {},
removeEventListener: function() {},
},
Math: {
random() {
Expand Down Expand Up @@ -345,8 +339,6 @@ describe
getRootNode() {
return win.document;
},
addEventListener: function() {},
removeEventListener: function() {},
},
Math: {
random() {
Expand Down Expand Up @@ -375,8 +367,6 @@ describe
getRootNode() {
return win.document;
},
addEventListener: function() {},
removeEventListener: function() {},
},
Math: {
random() {
Expand Down
5 changes: 1 addition & 4 deletions test/unit/test-fixed-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ describes.sandboxed('FixedLayer', {}, () => {
let timer;

beforeEach(() => {
documentApi = {
addEventListener: function() {},
removeEventListener: function() {},
};
documentApi = {};
allRules = {};

docBody = createElement('docBody');
Expand Down
2 changes: 0 additions & 2 deletions test/unit/test-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ describes.sandboxed('History install', {}, () => {
document: {
body: {},
querySelector: () => null,
addEventListener: function() {},
removeEventListener: function() {},
},
location: parseUrlDeprecated(
'https://cdn.ampproject.org/c/s/www.example.com/path'
Expand Down
5 changes: 1 addition & 4 deletions test/unit/test-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ describes.sandboxed('Storage', {}, () => {
viewerMock = sandbox.mock(viewer);

windowApi = {
document: {
addEventListener: function() {},
removeEventListener: function() {},
},
document: {},
location: 'https://acme.com/document1',
};
ampdoc = new AmpDocSingle(windowApi);
Expand Down
2 changes: 0 additions & 2 deletions test/unit/test-url-replacements.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ describes.sandboxed('UrlReplacements', {}, () => {
return win.document;
},
},
addEventListener: function() {},
removeEventListener: function() {},
},
Math: {
random: () => 0.1234,
Expand Down
2 changes: 0 additions & 2 deletions test/unit/test-viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -1430,8 +1430,6 @@ describe('Viewport META', () => {
}
return undefined;
},
addEventListener: function() {},
removeEventListener: function() {},
},
navigator: window.navigator,
setTimeout: window.setTimeout,
Expand Down
2 changes: 0 additions & 2 deletions test/unit/test-vsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ describes.sandboxed('vsync', {}, () => {
document: {
nodeType: /* DOCUMENT */ 9,
body: {},
addEventListener: function() {},
removeEventListener: function() {},
},
navigator: {},
services: {},
Expand Down

0 comments on commit 05aa983

Please sign in to comment.