Skip to content

Commit 8f476e4

Browse files
committed
Adding condition to ajax test that normally fails on localhost or file:// urls
1 parent fd22a07 commit 8f476e4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/TestStacktrace.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,14 @@
606606
equals(lines[1], 'line1');
607607
});
608608

609-
test("sync ajax", function() {
610-
expect(1);
611-
var p = new printStackTrace.implementation();
612-
var data = p.ajax(document.location.href);
613-
ok(data.indexOf('stacktrace') >= 0, 'synchronous get');
614-
});
609+
if (window && window.location && window.location.hostname && window.location.hostname !== 'localhost') {
610+
test("sync ajax", function() {
611+
expect(1);
612+
var p = new printStackTrace.implementation();
613+
var data = p.ajax(document.location.href);
614+
ok(data.indexOf('stacktrace') >= 0, 'synchronous get');
615+
});
616+
}
615617

616618
test("guessAnonymousFunction", function() {
617619
expect(1);

0 commit comments

Comments
 (0)