Bug 801576 - Android bustage fix. r=me
authorBobby Holley <bobbyholley@gmail.com>
Wed, 24 Oct 2012 14:18:39 +0200
changeset 111370 5e3b672c303a3027a03d4072aebce95dddf87eef
parent 111369 ab316048d5e18454545ef3b5974b8c24b33cc5dc
child 111371 6de521e0ae9d0ff459759f8629658365e811c2f7
child 111374 597981ef2ef5022d23d49947b64b95897ae018aa
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersme
bugs801576
milestone19.0a1
Bug 801576 - Android bustage fix. r=me
js/xpconnect/tests/mochitest/test_sameOriginPolicy.html
--- a/js/xpconnect/tests/mochitest/test_sameOriginPolicy.html
+++ b/js/xpconnect/tests/mochitest/test_sameOriginPolicy.html
@@ -57,16 +57,20 @@ function isCrossOriginWritable(obj, prop
   if (obj == "Location")
     return prop == 'hash' || prop == 'href';
 }
 
 // NB: we don't want to succeed with writes, so we only check them when it should be denied.
 function testAll(sameOrigin) {
   var win = document.getElementById('ifr').contentWindow;
   for (var prop in window) {
+    // On android, this appears to be on the window but not on the iframe. It's
+    // not really relevant to this test, so just skip it.
+    if (prop === 'crypto')
+      continue;
     check(win, prop, sameOrigin || isCrossOriginReadable('Window', prop), /* write = */ false);
     if (!sameOrigin && !isCrossOriginWritable('Window', prop))
       check(win, prop, false, /* write = */ true);
   }
   for (var prop in window.location) {
     check(win.location, prop, sameOrigin || isCrossOriginReadable('Location', prop));
     if (!sameOrigin && !isCrossOriginWritable('Location', prop))
       check(win, prop, false, /* write = */ true);