Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 <html>
3 <head>
4 <title>application accessible name</title>
5 <link rel="stylesheet" type="text/css"
6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
7 <script type="application/javascript"
8 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="application/javascript"
11 src="../common.js"></script>
12 <script type="application/javascript"
13 src="../role.js"></script>
15 <script type="application/javascript">
16 function doTest()
17 {
18 var accessible = getApplicationAccessible();
19 if (!accessible) {
20 SimpleTest.finish();
21 return;
22 }
24 var bundleServ =
25 Components.classes["@mozilla.org/intl/stringbundle;1"].
26 getService(Components.interfaces.nsIStringBundleService);
27 var brandBundle =
28 bundleServ.createBundle("chrome://branding/locale/brand.properties");
30 var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].
31 getService(Components.interfaces.nsIXULAppInfo);
33 // nsIAccessible::name
34 var applicationName = "";
35 if (LINUX || SOLARIS) {
36 applicationName = appInfo.name;
37 } else {
38 try {
39 applicationName = brandBundle.GetStringFromName("brandShortName");
40 } catch(e) {
41 }
43 if (applicationName == "")
44 applicationName = "Gecko based application";
45 }
46 is (accessible.name, applicationName, "wrong application accessible name");
48 // nsIAccessibleApplication
49 is(accessible.appName, appInfo.name, "Wrong application name");
50 is(accessible.appVersion, appInfo.version, "Wrong application version");
51 is(accessible.platformName, "Gecko", "Wrong platform name");
52 is(accessible.platformVersion, appInfo.platformVersion,
53 "Wrong platform version");
55 SimpleTest.finish();
56 }
58 SimpleTest.waitForExplicitFinish();
59 addA11yLoadEvent(doTest);
60 </script>
61 </head>
62 <body>
63 <a target="_blank"
64 href="https://bugzilla.mozilla.org/show_bug.cgi?id=456121"
65 title="nsApplicationAccessible::GetName does not return a default value when brand.properties does not exist">
66 Mozilla Bug 454211
67 </a>
69 <p id="display"></p>
70 <div id="content" style="display: none"></div>
71 <pre id="test">
72 </pre>
74 </body>
75 </html>