accessible/tests/mochitest/treeupdate/test_canvas.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3
michael@0 4 <head>
michael@0 5 <title>Canvas subdom mutation</title>
michael@0 6
michael@0 7 <link rel="stylesheet" type="text/css"
michael@0 8 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 9
michael@0 10 <script type="application/javascript"
michael@0 11 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 12
michael@0 13 <script type="application/javascript"
michael@0 14 src="../common.js"></script>
michael@0 15 <script type="application/javascript"
michael@0 16 src="../role.js"></script>
michael@0 17 <script type="application/javascript"
michael@0 18 src="../events.js"></script>
michael@0 19
michael@0 20 <script type="application/javascript">
michael@0 21
michael@0 22 ////////////////////////////////////////////////////////////////////////////
michael@0 23 // Invokers
michael@0 24
michael@0 25 function addSubtree(aID)
michael@0 26 {
michael@0 27 this.node = getNode(aID);
michael@0 28
michael@0 29 this.eventSeq = [
michael@0 30 new invokerChecker(EVENT_SHOW, this.node)
michael@0 31 ];
michael@0 32
michael@0 33 this.invoke = function addSubtree_invoke()
michael@0 34 {
michael@0 35 // ensure we start with no subtree
michael@0 36 testAccessibleTree("canvas", { CANVAS: [] });
michael@0 37 getNode("dialog").style.display = "block";
michael@0 38 }
michael@0 39
michael@0 40 this.finalCheck = function addSubtree_finalCheck() {
michael@0 41 testAccessibleTree("dialog", { DIALOG: [] });
michael@0 42 }
michael@0 43
michael@0 44 this.getID = function addSubtree_getID()
michael@0 45 {
michael@0 46 return "show canvas subdom";
michael@0 47 }
michael@0 48 }
michael@0 49
michael@0 50 ////////////////////////////////////////////////////////////////////////////
michael@0 51 // Test
michael@0 52
michael@0 53 //gA11yEventDumpID = "eventdump"; // debug stuff
michael@0 54 //gA11yEventDumpToConsole = true;
michael@0 55
michael@0 56 var gQueue = null;
michael@0 57
michael@0 58 function doTest()
michael@0 59 {
michael@0 60 gQueue = new eventQueue();
michael@0 61
michael@0 62 // make the subdom come alive!
michael@0 63 gQueue.push(new addSubtree("dialog"));
michael@0 64
michael@0 65 gQueue.invoke(); // SimpleTest.finish() will be called in the end
michael@0 66 }
michael@0 67
michael@0 68 SimpleTest.waitForExplicitFinish();
michael@0 69 addA11yLoadEvent(doTest);
michael@0 70 </script>
michael@0 71 </head>
michael@0 72 <body>
michael@0 73
michael@0 74 <a target="_blank"
michael@0 75 title="Expose content in Canvas element"
michael@0 76 href="https://bugzilla.mozilla.org/show_bug.cgi?id=495912">
michael@0 77 Mozilla Bug 495912
michael@0 78 </a>
michael@0 79
michael@0 80 <p id="display"></p>
michael@0 81 <div id="content" style="display: none"></div>
michael@0 82 <pre id="test">
michael@0 83 </pre>
michael@0 84
michael@0 85 <canvas id="canvas">
michael@0 86 <div id="dialog" role="dialog" style="display: none;">
michael@0 87 </div>
michael@0 88 </canvas>
michael@0 89
michael@0 90 <div id="eventdump"></div>
michael@0 91 </body>
michael@0 92 </html>

mercurial