Skip to content

Commit

Permalink
✅ Unskip 9 passing unit tests (#31033)
Browse files Browse the repository at this point in the history
* Unskip passing unit tests in test-vsync.js

* Unskip passing unit test in test-iframe-helper.js

* Unskip passing unit test in test-xhr.js

* Unskip passing unit test in test-sanitizer.js

* Revert test-inabox-viewport.js
  • Loading branch information
rcebulko committed Nov 6, 2020
1 parent 7f51eb9 commit 3e391e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
3 changes: 1 addition & 2 deletions test/unit/test-iframe-helper.js
Expand Up @@ -206,8 +206,7 @@ describe
});
});

// TODO(wg-performance, #25587): Results in a cross-origin frame error.
it.skip('should set sentinel on postMessage data', () => {
it('should set sentinel on postMessage data', () => {
insert(testIframe);
const postMessageSpy = window.sandbox /*OK*/
.spy(testIframe.contentWindow, 'postMessage');
Expand Down
5 changes: 1 addition & 4 deletions test/unit/test-sanitizer.js
Expand Up @@ -331,10 +331,7 @@ function runSanitizerTests() {
);
});

// TODO(choumx): HTTPS-only URI attributes are not enforced consistently
// in the sanitizer yet. E.g. amp-video requires HTTPS, amp-img does not.
// Unskip when this is fixed.
it.skip('should not allow source::src with invalid protocol', () => {
it('should not allow source::src with invalid protocol', () => {
expect(sanitize('<source src="http://www.foo.com">')).to.equal(
'<source src="">'
);
Expand Down
15 changes: 5 additions & 10 deletions test/unit/test-vsync.js
Expand Up @@ -72,8 +72,7 @@ describes.fakeWin('vsync', {}, (env) => {
});
});

// TODO(choumx, #12476): Make this test work with sinon 4.0.
it.skip('should generate a frame and run callbacks', () => {
it('should generate a frame and run callbacks', () => {
let result = '';
return new Promise((resolve) => {
vsync.run({
Expand Down Expand Up @@ -171,8 +170,7 @@ describes.fakeWin('vsync', {}, (env) => {
});
});

// TODO(choumx, #12476): Make this test work with sinon 4.0.
it.skip('should schedule nested vsyncs', () => {
it('should schedule nested vsyncs', () => {
let result = '';
return new Promise((resolve) => {
vsync.run({
Expand Down Expand Up @@ -207,8 +205,7 @@ describes.fakeWin('vsync', {}, (env) => {
});
});

// TODO(choumx, #12476): Make this test work with sinon 4.0.
it.skip('should return a promise from runPromise that executes "run"', () => {
it('should return a promise from runPromise that executes "run"', () => {
const measureSpy = env.sandbox.spy();
const mutateSpy = env.sandbox.spy();
return vsync
Expand All @@ -219,8 +216,7 @@ describes.fakeWin('vsync', {}, (env) => {
});
});

// TODO(choumx, #12476): Make this test work with sinon 4.0.
it.skip('should return a promise from measurePromise that runs measurer', () => {
it('should return a promise from measurePromise that runs measurer', () => {
let measured = false;
return vsync
.measurePromise(() => {
Expand All @@ -231,8 +227,7 @@ describes.fakeWin('vsync', {}, (env) => {
});
});

// TODO(choumx, #12476): Make this test work with sinon 4.0.
it.skip('should return a promise from mutatePromisethat runs mutator', () => {
it('should return a promise from mutatePromisethat runs mutator', () => {
const mutator = env.sandbox.spy();
return vsync.mutatePromise(mutator).then(() => {
expect(mutator).to.be.calledOnce;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test-xhr.js
Expand Up @@ -370,7 +370,7 @@ describe
});
});

it.skip('should do simple JSON fetch', () => {
it('should do simple JSON fetch', () => {
window.sandbox.stub(user(), 'assert');
return xhr
.fetchJson(`${baseUrl}/get?k=v1`)
Expand Down

0 comments on commit 3e391e6

Please sign in to comment.