(win)
| 190 | }); |
| 191 | |
| 192 | function testWindow(win) { |
| 193 | expect(win.ampSeen).to.be.true; |
| 194 | expect(win.setTimeout).to.not.match(/native/); |
| 195 | expect(win.setInterval).to.not.match(/native/); |
| 196 | expect(win.alert.toString()).to.not.match(/native/); |
| 197 | expect(win.prompt.toString()).to.not.match(/native/); |
| 198 | expect(win.confirm.toString()).to.not.match(/native/); |
| 199 | expect(win.alert()).to.be.undefined; |
| 200 | expect(win.prompt()).to.equal(''); |
| 201 | expect(win.confirm()).to.be.false; |
| 202 | // We only allow 3 calls to these functions. |
| 203 | expect(() => win.alert()).to.throw(/security error/); |
| 204 | expect(() => win.prompt()).to.throw(/security error/); |
| 205 | expect(() => win.confirm()).to.throw(/security error/); |
| 206 | } |
| 207 | |
| 208 | function waitForMutationObserver(iframe) { |
| 209 | if ( |
no test coverage detected