Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <?xml-stylesheet type="text/css" href="chrome://global/skin"?> |
michael@0 | 3 | <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?> |
michael@0 | 4 | <!-- |
michael@0 | 5 | https://bugzilla.mozilla.org/show_bug.cgi?id=495648 |
michael@0 | 6 | --> |
michael@0 | 7 | <window title="Mozilla Bug 495648" |
michael@0 | 8 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 9 | <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> |
michael@0 | 10 | |
michael@0 | 11 | <!-- test results are displayed in the html:body --> |
michael@0 | 12 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 13 | <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=495648" |
michael@0 | 14 | target="_blank">Mozilla Bug 495648</a> |
michael@0 | 15 | </body> |
michael@0 | 16 | |
michael@0 | 17 | <!-- test code goes here --> |
michael@0 | 18 | <script type="application/javascript"> |
michael@0 | 19 | <![CDATA[ |
michael@0 | 20 | SimpleTest.expectAssertions(18, 24); |
michael@0 | 21 | |
michael@0 | 22 | /** Test for Bug 495648 **/ |
michael@0 | 23 | var uri = window.location.href.replace(/test_bug495648.xul/, "bug495648.rdf"); |
michael@0 | 24 | |
michael@0 | 25 | function doTest() { |
michael@0 | 26 | var list = document.getElementById('l'); |
michael@0 | 27 | var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); |
michael@0 | 28 | var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); |
michael@0 | 29 | var rdf = rdfService.GetDataSourceBlocking(uri); |
michael@0 | 30 | list.database.AddDataSource(rdf); |
michael@0 | 31 | list.builder.rebuild(); |
michael@0 | 32 | is(list.itemCount, 40, "Unexpected item count"); |
michael@0 | 33 | SimpleTest.finish(); |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 37 | addLoadEvent(doTest); |
michael@0 | 38 | |
michael@0 | 39 | ]]> |
michael@0 | 40 | </script> |
michael@0 | 41 | <listbox flex="1" id="l" seltype="multiple" datasources="rdf:null" ref="urn:root" sortResource="http://home.netscape.com/NC-rdf#name" sortDirection="ascending"> |
michael@0 | 42 | <template> |
michael@0 | 43 | <rule><conditions><content uri="?uri" /><triple subject="?uri" predicate="http://home.netscape.com/NC-rdf#links" object="?links" /><member container="?links" child="?child" /><triple subject="?child" predicate="http://home.netscape.com/NC-rdf#name" object="?name" /></conditions><bindings><binding subject="?child" predicate="http://sitedelta.schierla.de/SD-rdf#status" object="?status" /></bindings><action><listitem label="?name" class="listitem-iconic" status="?status" uri="?child" /></action></rule> |
michael@0 | 44 | </template> |
michael@0 | 45 | </listbox> |
michael@0 | 46 | </window> |