Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
michael@0 | 3 | <?xml-stylesheet |
michael@0 | 4 | href="chrome://mochikit/content/tests/SimpleTest/test.css" |
michael@0 | 5 | type="text/css"?> |
michael@0 | 6 | <!-- |
michael@0 | 7 | https://bugzilla.mozilla.org/show_bug.cgi?id=476634 |
michael@0 | 8 | --> |
michael@0 | 9 | <window title="Mozilla Bug 476634" onload="startup()" |
michael@0 | 10 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 11 | |
michael@0 | 12 | <script type="application/javascript" |
michael@0 | 13 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 14 | |
michael@0 | 15 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 16 | <a target="_blank" |
michael@0 | 17 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=304188">Mozilla Bug 476634</a> |
michael@0 | 18 | <p id="display"></p> |
michael@0 | 19 | <div id="content" style="display: none"> |
michael@0 | 20 | </div> |
michael@0 | 21 | <pre id="test"> |
michael@0 | 22 | </pre> |
michael@0 | 23 | </body> |
michael@0 | 24 | <template id="test-template"> |
michael@0 | 25 | <query>SELECT id,value FROM test</query> |
michael@0 | 26 | <action> |
michael@0 | 27 | <label uri="?" id="?id" value="?value"/> |
michael@0 | 28 | </action> |
michael@0 | 29 | </template> |
michael@0 | 30 | <vbox id="results-list" datasources="rdf:null" querytype="storage" ref="*" |
michael@0 | 31 | template="test-template"/> |
michael@0 | 32 | |
michael@0 | 33 | <script class="testbody" type="application/javascript"> |
michael@0 | 34 | <![CDATA[ |
michael@0 | 35 | function startup() { |
michael@0 | 36 | var ss = Components.classes["@mozilla.org/storage/service;1"] |
michael@0 | 37 | .getService(Components.interfaces.mozIStorageService); |
michael@0 | 38 | var db = ss.openSpecialDatabase("memory"); |
michael@0 | 39 | |
michael@0 | 40 | db.createTable("test", "id TEXT, value INTEGER"); |
michael@0 | 41 | var stmt = db.createStatement("INSERT INTO test (id, value) VALUES (?,?)"); |
michael@0 | 42 | stmt.bindStringParameter(0, "test1"); |
michael@0 | 43 | stmt.bindInt32Parameter(1, 0); |
michael@0 | 44 | stmt.execute(); |
michael@0 | 45 | stmt.bindStringParameter(0, "test2"); |
michael@0 | 46 | stmt.bindInt32Parameter(1, 2147483647); |
michael@0 | 47 | stmt.execute(); |
michael@0 | 48 | stmt.bindStringParameter(0, "test3"); |
michael@0 | 49 | stmt.bindInt32Parameter(1, -2147483648); |
michael@0 | 50 | stmt.execute(); |
michael@0 | 51 | stmt.bindStringParameter(0, "test4"); |
michael@0 | 52 | stmt.bindInt64Parameter(1, 0); |
michael@0 | 53 | stmt.execute(); |
michael@0 | 54 | stmt.bindStringParameter(0, "test5"); |
michael@0 | 55 | stmt.bindInt64Parameter(1, 3147483647); |
michael@0 | 56 | stmt.execute(); |
michael@0 | 57 | stmt.bindStringParameter(0, "test6"); |
michael@0 | 58 | stmt.bindInt64Parameter(1, -3147483648); |
michael@0 | 59 | stmt.execute(); |
michael@0 | 60 | stmt.finalize(); |
michael@0 | 61 | |
michael@0 | 62 | var list = document.getElementById("results-list"); |
michael@0 | 63 | list.builder.datasource = db; |
michael@0 | 64 | |
michael@0 | 65 | is(list.childNodes.length, 6, "Should be 6 generated elements"); |
michael@0 | 66 | is(list.childNodes[0].value, "0", "Should have seen the correct value"); |
michael@0 | 67 | is(list.childNodes[1].value, "2147483647", "Should have seen the correct value"); |
michael@0 | 68 | is(list.childNodes[2].value, "-2147483648", "Should have seen the correct value"); |
michael@0 | 69 | is(list.childNodes[3].value, "0", "Should have seen the correct value"); |
michael@0 | 70 | is(list.childNodes[4].value, "3147483647", "Should have seen the correct value"); |
michael@0 | 71 | is(list.childNodes[5].value, "-3147483648", "Should have seen the correct value"); |
michael@0 | 72 | } |
michael@0 | 73 | ]]> |
michael@0 | 74 | </script> |
michael@0 | 75 | |
michael@0 | 76 | </window> |