$OpenBSD$ index d6554d5..a21b079 100644 --- caps/tests/mochitest/test_bug995943.xul.orig Fri Feb 20 15:40:36 2015 +++ caps/tests/mochitest/test_bug995943.xul Fri Feb 20 15:40:36 2015 @@ -25,10 +25,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=995943 /** Test for CAPS file:// URI prefs. **/ SimpleTest.waitForExplicitFinish(); + SimpleTest.requestCompleteLog(); + if (Services.appinfo.OS == "Darwin") // See bug 1067022 + SimpleTest.expectAssertions(0, 1); - var profileDir = "file://" + Cc["@mozilla.org/file/directory_service;1"] - .getService(Ci.nsIProperties) - .get("ProfD", Ci.nsILocalFile).path; + var rootdir = Services.appinfo.OS == "WINNT" ? "file:///C:" : "file:///"; function checkLoadFileURI(domain, shouldLoad) { debug("Invoking checkLoadFileURI with domain: " + domain + ", shouldLoad: " + shouldLoad); @@ -44,7 +45,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=995943 } $('ifr').addEventListener('load', l2); try { - window[0].wrappedJSObject.location = profileDir; + window[0].wrappedJSObject.location = rootdir; debug("Successfully navigated for " + domain); } catch (e) { ok(!shouldLoad && /denied|insecure/.test(e), @@ -82,11 +83,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=995943 pushPrefs.bind(null, [['capability.policy.policynames', ',somepolicy, someotherpolicy, '], ['capability.policy.somepolicy.checkloaduri.enabled', 'allaccess'], ['capability.policy.someotherpolicy.checkloaduri.enabled', 'nope'], - ['capability.policy.somepolicy.sites', ' http://example.org https://example.com'], + ['capability.policy.somepolicy.sites', ' http://example.org test1.example.com https://test2.example.com '], ['capability.policy.someotherpolicy.sites', 'http://example.net ']])) .then(checkLoadFileURI.bind(null, 'http://example.org', true)) - .then(checkLoadFileURI.bind(null, 'http://example.com', false)) + .then(checkLoadFileURI.bind(null, 'http://test2.example.com', false)) + .then(checkLoadFileURI.bind(null, 'https://test2.example.com', true)) + .then(checkLoadFileURI.bind(null, 'http://sub1.test2.example.com', false)) + .then(checkLoadFileURI.bind(null, 'https://sub1.test2.example.com', true)) .then(checkLoadFileURI.bind(null, 'http://example.net', false)) + .then(checkLoadFileURI.bind(null, 'http://test1.example.com', true)) + .then(checkLoadFileURI.bind(null, 'https://test1.example.com', true)) + .then(checkLoadFileURI.bind(null, 'http://sub1.test1.example.com', true)) + .then(checkLoadFileURI.bind(null, 'https://sub1.test1.example.com', true)) .then(pushPrefs.bind(null, [['capability.policy.someotherpolicy.checkloaduri.enabled', 'allAccess']])) .then(checkLoadFileURI.bind(null, 'http://example.net', true)) .then(popPrefs)