summaryrefslogtreecommitdiffstats
path: root/dom/xul/templates/tests/chrome/test_bug476634.xul
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/xul/templates/tests/chrome/test_bug476634.xul
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/xul/templates/tests/chrome/test_bug476634.xul')
-rw-r--r--dom/xul/templates/tests/chrome/test_bug476634.xul76
1 files changed, 76 insertions, 0 deletions
diff --git a/dom/xul/templates/tests/chrome/test_bug476634.xul b/dom/xul/templates/tests/chrome/test_bug476634.xul
new file mode 100644
index 000000000..cee01d41a
--- /dev/null
+++ b/dom/xul/templates/tests/chrome/test_bug476634.xul
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<?xml-stylesheet
+ href="chrome://mochikit/content/tests/SimpleTest/test.css"
+ type="text/css"?>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=476634
+-->
+<window title="Mozilla Bug 476634" onload="startup()"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/javascript"
+ src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+
+<body xmlns="http://www.w3.org/1999/xhtml">
+<a target="_blank"
+ href="https://bugzilla.mozilla.org/show_bug.cgi?id=304188">Mozilla Bug 476634</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+</div>
+<pre id="test">
+</pre>
+</body>
+<template id="test-template">
+ <query>SELECT id,value FROM test</query>
+ <action>
+ <label uri="?" id="?id" value="?value"/>
+ </action>
+</template>
+<vbox id="results-list" datasources="rdf:null" querytype="storage" ref="*"
+ template="test-template"/>
+
+<script class="testbody" type="application/javascript">
+<![CDATA[
+function startup() {
+ var ss = Components.classes["@mozilla.org/storage/service;1"]
+ .getService(Components.interfaces.mozIStorageService);
+ var db = ss.openSpecialDatabase("memory");
+
+ db.createTable("test", "id TEXT, value INTEGER");
+ var stmt = db.createStatement("INSERT INTO test (id, value) VALUES (?,?)");
+ stmt.bindByIndex(0, "test1");
+ stmt.bindByIndex(1, 0);
+ stmt.execute();
+ stmt.bindByIndex(0, "test2");
+ stmt.bindByIndex(1, 2147483647);
+ stmt.execute();
+ stmt.bindByIndex(0, "test3");
+ stmt.bindByIndex(1, -2147483648);
+ stmt.execute();
+ stmt.bindByIndex(0, "test4");
+ stmt.bindByIndex(1, 0);
+ stmt.execute();
+ stmt.bindByIndex(0, "test5");
+ stmt.bindByIndex(1, 3147483647);
+ stmt.execute();
+ stmt.bindByIndex(0, "test6");
+ stmt.bindByIndex(1, -3147483648);
+ stmt.execute();
+ stmt.finalize();
+
+ var list = document.getElementById("results-list");
+ list.builder.datasource = db;
+
+ is(list.childNodes.length, 6, "Should be 6 generated elements");
+ is(list.childNodes[0].value, "0", "Should have seen the correct value");
+ is(list.childNodes[1].value, "2147483647", "Should have seen the correct value");
+ is(list.childNodes[2].value, "-2147483648", "Should have seen the correct value");
+ is(list.childNodes[3].value, "0", "Should have seen the correct value");
+ is(list.childNodes[4].value, "3147483647", "Should have seen the correct value");
+ is(list.childNodes[5].value, "-3147483648", "Should have seen the correct value");
+}
+]]>
+</script>
+
+</window>