Skip to content

Commit

Permalink
More fixes to webmessaging origin comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Nov 26, 2014
1 parent 17b9847 commit f8bc276
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions webmessaging/event.source.xorigin.sub.htm
Expand Up @@ -14,13 +14,14 @@

<script>

var description = "Test Description: Corss-origin: event.source returns the WindowProxy of the source window.";
var description = "Test Description: Cross-origin: event.source returns the WindowProxy of the source window.";

var t = async_test(description);

var PORT = "{{ports[http][0]}}" !== "80" ? ":{{ports[http][0]}}" : "";
var DATA = "foo";
var TARGET = document.querySelector("iframe");
var XORIGIN = "http://{{domains[www1]}}:{{ports[http][0]}}";
var XORIGIN = "http://{{domains[www1]}}" + PORT;
var ExpectedResult = [XORIGIN, "AccessCookieDenied"];
var ActualResult = [];

Expand Down
5 changes: 3 additions & 2 deletions webmessaging/postMessage_asterisk_xorigin.sub.htm
Expand Up @@ -20,10 +20,11 @@

var t = async_test(description);

var PORT = "{{ports[http][0]}}" !== "80" ? ":{{ports[http][0]}}" : "";
var TARGET1 = document.querySelectorAll("iframe")[0];
var TARGET2 = document.querySelectorAll("iframe")[1];
var XORIGIN = "http://{{domains[www]}}:{{ports[http][0]}}";
var SORIGIN = "http://" + location.host;
var XORIGIN = "http://{{domains[www]}}" + PORT;
var SORIGIN = "http://{{host}}" + PORT;
var ExpectedResult = ["#1", XORIGIN, "#2", SORIGIN];
var ActualResult = [];
var loaded = 0;
Expand Down
5 changes: 3 additions & 2 deletions webmessaging/postMessage_origin_mismatch_xorigin.sub.htm
Expand Up @@ -21,9 +21,10 @@

var t = async_test(description);

var PORT = "{{ports[http][0]}}" !== "80" ? ":{{ports[http][0]}}" : "";
var TARGET = document.querySelector("iframe");
var XORIGIN = "http://{{domains[www1]}}:{{ports[http][0]}}/";
var SORIGIN = "http://" + location.hostname;
var XORIGIN = "http://{{domains[www]}}" + PORT;
var SORIGIN = "http://{{host}}" + PORT;
var ExpectedResult = ["#0", XORIGIN, "#3", XORIGIN];
var ActualResult = [];

Expand Down

0 comments on commit f8bc276

Please sign in to comment.