Permalink
Browse files

Enabling tests to be run on hosts other than localhost.

  • Loading branch information...
1 parent 2899317 commit a04e7e10f0d689a8e7907b8d43d3744c8bab64dc @shane-tomlinson shane-tomlinson committed Jan 5, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 test/cases/origin/run.js
View
6 test/cases/origin/run.js
@@ -15,10 +15,12 @@ $(document).ready(function(){
asyncTest("different origin correctly reported", function() {
var argString = "This is a string we'll send into and back from the dialog: " +
(new Date()).toString();
- var other_url = 'http://127.0.0.1:8200/test/cases/origin/child.html';
+ var other_host = document.location.protocol + "//" + document.location.hostname + ":8200";
+
+ var other_url = other_host + '/test/cases/origin/child.html';
WinChan.open({
url: other_url,
- relay_url: "http://127.0.0.1:8200/relay.html",
+ relay_url: other_host + "/relay.html",
window_features: "width=700,height=375"
}, function(err, resp) {
equal(resp, /^(https?:\/\/[-_a-zA-Z\.0-9:]+)/.exec(window.location.href)[1]);

0 comments on commit a04e7e1

Please sign in to comment.