Permalink
Browse files

Adding condition to ajax test that normally fails on localhost or fil…

…e:// urls
  • Loading branch information...
1 parent fd22a07 commit 8f476e4642e37a8486dfb3a8a89ecda0a4c17f98 @eriwen eriwen committed Oct 3, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 test/TestStacktrace.js
View
14 test/TestStacktrace.js
@@ -606,12 +606,14 @@
equals(lines[1], 'line1');
});
- test("sync ajax", function() {
- expect(1);
- var p = new printStackTrace.implementation();
- var data = p.ajax(document.location.href);
- ok(data.indexOf('stacktrace') >= 0, 'synchronous get');
- });
+ if (window && window.location && window.location.hostname && window.location.hostname !== 'localhost') {
+ test("sync ajax", function() {
+ expect(1);
+ var p = new printStackTrace.implementation();
+ var data = p.ajax(document.location.href);
+ ok(data.indexOf('stacktrace') >= 0, 'synchronous get');
+ });
+ }
test("guessAnonymousFunction", function() {
expect(1);

0 comments on commit 8f476e4

Please sign in to comment.