Skip to content

Commit e3a9b34

Browse files
committed
improve ff tests
1 parent 858aef3 commit e3a9b34

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

demo/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
}
2424
}
2525
} else {
26+
location.search.includes('disable_csp') ||
2627
document.write(`<meta http-equiv="Content-Security-Policy" content="script-src 'self' blob:; object-src 'none';">`);
2728
}
2829
</script>

demo/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function run(js) {
1111
}
1212

1313
(function(){
14-
location.search.includes('disable') || SNOW((win) => {
14+
location.search.includes('disable_snow') || SNOW((win) => {
1515
win.alert = (msg) => {
1616
console.log('Snow: ', 'alert API is disabled, message is printed to console instead: ', msg);
1717
}

test/edge.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ describe('special cases', () => {
5151
});
5252

5353
it('should fail to use atob of an embed that was cross origin and then same origin', async function () {
54+
if (global.CONFIG.SKIP_CSP_OBJECT_SRC_CHECKS) {
55+
this.skip();
56+
}
5457
if (global.BROWSER === 'SAFARI') {
5558
this.skip(); // redirecting EMBED by updating src does not work in safari
5659
}
@@ -88,6 +91,9 @@ describe('special cases', () => {
8891
});
8992

9093
it('should fail to use atob of an object that was cross origin and then same origin', async function () {
94+
if (global.CONFIG.SKIP_CSP_OBJECT_SRC_CHECKS) {
95+
this.skip();
96+
}
9197
if (global.BROWSER === 'SAFARI') {
9298
this.skip(); // redirecting EMBED by updating src does not work in safari
9399
}
@@ -125,6 +131,9 @@ describe('special cases', () => {
125131
});
126132

127133
it('should fail to use atob of an embed that was cross origin and then same origin (html)', async function () {
134+
if (global.CONFIG.SKIP_CSP_OBJECT_SRC_CHECKS) {
135+
this.skip();
136+
}
128137
if (global.BROWSER === 'SAFARI') {
129138
this.skip(); // redirecting EMBED by updating src does not work in safari
130139
}
@@ -155,6 +164,9 @@ describe('special cases', () => {
155164
});
156165

157166
it('should fail to use atob of an object that was cross origin and then same origin (html)', async function () {
167+
if (global.CONFIG.SKIP_CSP_OBJECT_SRC_CHECKS) {
168+
this.skip();
169+
}
158170
if (global.BROWSER === 'SAFARI') {
159171
this.skip(); // redirecting EMBED by updating src does not work in safari
160172
}

0 commit comments

Comments
 (0)