~ubuntu-branches/ubuntu/precise/xulrunner-1.9/precise

« back to all changes in this revision

Viewing changes to mozilla/layout/base/tests/test_bug495648.xul

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-06-03 10:04:36 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20090603100436-e8am3r2lyj5z5931
Tags: 1.9.0.11+build2+nobinonly-0ubuntu1
* New upstream release v1.9.0.11 build2 (FIREFOX_3_0_11_BUILD2)
  - see USN-779-1
- adjust patches to changed upstream code base
  - update debian/patches/bz372826_att337031_about_style.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
 
3
<?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?>
 
4
<!--
 
5
https://bugzilla.mozilla.org/show_bug.cgi?id=495648
 
6
-->
 
7
<window title="Mozilla Bug 495648"
 
8
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
9
  <script type="application/javascript" src="/MochiKit/packed.js"/>
 
10
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
 
11
 
 
12
  <!-- test results are displayed in the html:body -->
 
13
  <body xmlns="http://www.w3.org/1999/xhtml">
 
14
  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=495648"
 
15
     target="_blank">Mozilla Bug 495648</a>
 
16
  </body>
 
17
 
 
18
  <!-- test code goes here -->
 
19
  <script type="application/javascript">
 
20
  <![CDATA[
 
21
  /** Test for Bug 495648 **/
 
22
  var uri = window.location.href.replace(/test_bug495648.xul/, "bug495648.rdf");
 
23
 
 
24
  function doTest() {
 
25
    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
 
26
    var list = document.getElementById('l');
 
27
    var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
 
28
    var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
 
29
    var rdf = rdfService.GetDataSourceBlocking(uri);
 
30
    list.database.AddDataSource(rdf);
 
31
    list.builder.rebuild();
 
32
    is(list.itemCount, 40, "Unexpected item count");
 
33
    SimpleTest.finish();
 
34
  }
 
35
 
 
36
  SimpleTest.waitForExplicitFinish();
 
37
  addLoadEvent(doTest);
 
38
 
 
39
  ]]>
 
40
  </script>
 
41
<listbox flex="1" id="l" seltype="multiple" datasources="rdf:null" ref="urn:root" sortResource="http://home.netscape.com/NC-rdf#name" sortDirection="ascending">
 
42
<template>
 
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>
 
44
</template>
 
45
</listbox>
 
46
</window>