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 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Plugin tests</title>
5 <link rel="stylesheet" type="text/css"
6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
8 <script type="application/javascript"
9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
11 <script type="application/javascript"
12 src="../common.js"></script>
13 <script type="application/javascript"
14 src="../role.js"></script>
15 <script type="application/javascript"
16 src="../states.js"></script>
18 <script type="application/javascript">
20 function doTest()
21 {
22 if (!WIN) {
23 ok(true,
24 "It's Windows specific test. Feel free to extend the test.");
26 SimpleTest.finish();
27 return;
28 }
30 testStates("plugin-windowless", STATE_UNAVAILABLE);
31 testAccessibleTree("plugin-windowless", { EMBEDDED_OBJECT: [ ] });
33 testStates("plugin-windowless-fallback", STATE_UNAVAILABLE);
34 testAccessibleTree("plugin-windowless-fallback", { EMBEDDED_OBJECT: [ ] });
36 testStates("plugin-windowed", 0, 0, STATE_UNAVAILABLE);
37 testAccessibleTree("plugin-windowed", { EMBEDDED_OBJECT: [ { NOTHING: [] } ] });
39 testStates("plugin-windowed-fallback", 0, 0, STATE_UNAVAILABLE);
40 testAccessibleTree("plugin-windowed-fallback",
41 { EMBEDDED_OBJECT: [ { NOTHING: [] } ] });
43 // make sure we handle content changes under the plugin.
44 getNode("fallback1").setAttribute("href", "5");
45 getNode("fallback2").setAttribute("href", "5");
46 SimpleTest.executeSoon(function () { SimpleTest.finish(); });
47 }
49 SimpleTest.waitForExplicitFinish();
50 addA11yLoadEvent(doTest);
51 setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
52 </script>
53 </head>
54 <body>
56 <a target="_blank"
57 title="Embed and object HTML tags should be given an accessible role of embedded object"
58 href="https://bugzilla.mozilla.org/show_bug.cgi?id=485270">Bug 485270</a>
59 <a target="_blank"
60 title="Embedded object accessibles for inaccessible/windowless plugins should not expose a NULL child"
61 href="https://bugzilla.mozilla.org/show_bug.cgi?id=816856">Bug 816856</a>
62 <a target="_blank"
63 title="Updating accessible tree for plugin with fallback shouldn't crash"
64 href="https://bugzilla.mozilla.org/show_bug.cgi?id=881636">Bug 881636</a>
65 <p id="display"></p>
66 <div id="content" style="display: none"></div>
67 <pre id="test">
68 </pre>
70 <embed id="plugin-windowless" type="application/x-test"
71 width="300" height="300"></embed>
72 <embed id="plugin-windowed" type="application/x-test" wmode="window"
73 width="300" height="300"></embed>
74 <embed id="plugin-windowless-fallback" type="application/x-test"
75 width="300" height="300"><a id="fallback1">foo</a></embed>
76 <embed id="plugin-windowed-fallback" type="application/x-test" wmode="window"
77 width="300" height="300"><a id="fallback2">foo</a></embed>
78 </body>
79 </html>