~ubuntu-branches/ubuntu/intrepid/xulrunner-1.9/intrepid

« back to all changes in this revision

Viewing changes to mozilla/dom/tests/mochitest/dom-level1-core/test_hc_elementgetelementsbytagnamespecialvalue.html

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack, Alexander Sack, Fabien Tassin
  • Date: 2008-02-13 11:47:21 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080213114721-7om0mgzngvuk9czv
Tags: 1.9~b3+nobinonly-0ubuntu1
* release FIREFOX_3_0b3_RELEASE

[ Alexander Sack ]
* submit patch that ships xpcshell to bugzilla
  - rename debian/patches/ship_xpcshell.patch =>
           debian/patches/bz410617_att295212_ship_xpcshell.patch
  - update debian/patches/series
* fix tooltip in epiphany: previously displayed out of screen bounds
  (LP: #37507)
  - add debian/patches/bz233371_att297343_fix_outofscreen_embed_tooltip.patch
  - update debian/patches/series
* use default upstream gcc tweaks for improved performance - especially of the
  javascript engine
  - update debian/rules
* update global extension/plugin patch to apply cleanly against latest code
  - update debian/patches/bzXXX_gre_extension_plugin_support.patch
* fix pyxpcom build failure introduced by recent commit
  - add debian/patches/bzXXX_fix_pyxpcom_build_failure.patch
  - update debian/patches/series
* add distro independent global install locations for extensions,
  /usr/lib/mozilla/extensions and /usr/share/mozilla/extensions
  - update debian/xulrunner-1.9.dirs
* support embedded tarball layout when either there is a *.tar.bz2 in orig tarball
  or if DEBIAN_MOZCLIENT_EMBEDDED is not unset (you will need this to produce embedded
  tarballs during |get-orig-source|
  - update debian/rules
* bump minimum libnss3-dev build requirements to >= 3.12.0~1.9b3
  - update debian/control
* bump minimum libnspr4-dev build requirements to >= 4.7.0~1.9b3
  - update debian/control

[ Fabien Tassin ]
* Drop patches applied upstream
  - drop debian/patches/bz410617_att295212_ship_xpcshell.patch
  - drop debian/patches/bz404634_att294921.patch
  - drop debian/patches/bz386610_python2.5_ftbfs_amd64.patch
  - drop debian/patches/bz373918_att295042.patch
  - drop debian/patches/bz408062_unstable_pc.patch
  - drop debian/patches/bz384304_fix_recursive_symlinks.patch
  - update debian/patches/series
* Refresh diverged patches:
  - update debian/patches/bzXXX_pc_honour_system_nspr_nss.patch
  - update debian/patches/rename_venkman_addon.patch
  - update debian/patches/bz344818_cairo_xrender.patch
* Install links for all .so libs in the -dev package
  - update debian/patches/dont_install_so_in_dev.patch
* Bump gtk requirement to 2.12 as per Mozilla bug 412432
  - update debian/control
* Add #DEBHELPER# token to postinst/prerm scripts
  - update debian/xulrunner-1.9.{postinst,prerm}
* Install previously missed libdbusservice.so
  - update debian/xulrunner-1.9.install
* Update venkman patch to also rename locales
  - update debian/patches/rename_venkman_addon.patch
* Bump requirement for system cairo to >= 1.5.8 as we now need
  the newly added cairo_path_extents()
  - update debian/rules
* Include mozilla-devscripts file using -include so ifneq could be omitted
  - update debian/rules
* Fix missing .so symlinks regression
  - update debian/patches/dont_install_so_in_dev.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
2
 
<html>
3
 
<head>
4
 
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
 
<title>http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagnamespecialvalue</title>
7
 
<link href="http://www.w3.org/StyleSheets/activity-home.css" rel="stylesheet" type="text/css">
8
 
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
9
 
<script type="text/javascript" src="/MochiKit/packed.js"></script><script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script><script type="text/javascript" src="DOMTestCase.js"></script><script type="text/javascript" src="exclusions.js"></script><script type="text/javascript">
10
 
// expose test function names
11
 
function exposeTestFunctionNames()
12
 
{
13
 
return ['hc_elementgetelementsbytagnamespecialvalue'];
14
 
}
15
 
 
16
 
var docsLoaded = -1000000;
17
 
var builder = null;
18
 
 
19
 
//
20
 
//   This function is called by the testing framework before
21
 
//      running the test suite.
22
 
//
23
 
//   If there are no configuration exceptions, asynchronous
24
 
//        document loading is started.  Otherwise, the status
25
 
//        is set to complete and the exception is immediately
26
 
//        raised when entering the body of the test.
27
 
//
28
 
function setUpPage() {
29
 
   setUpPageStatus = 'running';
30
 
   try {
31
 
     //
32
 
     //   creates test document builder, may throw exception
33
 
     //
34
 
     builder = createConfiguredBuilder();
35
 
 
36
 
      docsLoaded = 0;
37
 
      
38
 
      var docRef = null;
39
 
      if (typeof(this.doc) != 'undefined') {
40
 
        docRef = this.doc;
41
 
      }
42
 
      docsLoaded += preload(docRef, "doc", "hc_staff");
43
 
        
44
 
       if (docsLoaded == 1) {
45
 
          setUpPage = 'complete';
46
 
       }
47
 
    } catch(ex) {
48
 
        catchInitializationError(builder, ex);
49
 
        setUpPage = 'complete';
50
 
    }
51
 
}
52
 
 
53
 
//
54
 
//   This method is called on the completion of 
55
 
//      each asychronous load started in setUpTests.
56
 
//
57
 
//   When every synchronous loaded document has completed,
58
 
//      the page status is changed which allows the
59
 
//      body of the test to be executed.
60
 
function loadComplete() {
61
 
  if (++docsLoaded == 1) {
62
 
    setUpPageStatus = 'complete';
63
 
    runJSUnitTests();
64
 
    markTodos();
65
 
    SimpleTest.finish();
66
 
  }
67
 
}
68
 
 
69
 
var docName = 'hc_elementgetelementsbytagnamespecialvalue';
70
 
 
71
 
 
72
 
 
73
 
window.doc = window;  
74
 
SimpleTest.waitForExplicitFinish();
75
 
addLoadEvent(setUpPage);
76
 
function testFails (test) {
77
 
  if (!test.result) {
78
 
    test.todo = true;
79
 
    return true;
80
 
  }
81
 
  return false;
82
 
}
83
 
function markTodos() {
84
 
  if (todoTests[docName]) {
85
 
    // mark the failures as todos
86
 
    var failures = filter(testFails, SimpleTest._tests);
87
 
    // shouldn't be 0 failures
88
 
    todo(SimpleTest._tests != 0 && failures == 0, "test marked todo should fail somewhere");
89
 
  }
90
 
}
91
 
 
92
 
function runJSUnitTests() {
93
 
  builder = createConfiguredBuilder();
94
 
  try {
95
 
   forEach(exposeTestFunctionNames(), 
96
 
     function (testName) { 
97
 
       window[testName](); 
98
 
     }
99
 
   );
100
 
  } catch (ex) {
101
 
    ok(false, "Test threw exception: " + ex);
102
 
  }
103
 
}
104
 
 
105
 
 
106
 
/**
107
 
108
 
The "getElementsByTagName(name)" method may use the
109
 
special value "*" to match all tags in the element
110
 
tree.
111
 
 
112
 
Create a NodeList of all the descendant elements
113
 
of the last employee by using the special value "*".
114
 
The method should return all the descendant children(6)
115
 
in the order the children were encountered.
116
 
 
117
 
* @author Curt Arnold
118
 
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1938918D
119
 
*/
120
 
function hc_elementgetelementsbytagnamespecialvalue() {
121
 
   var success;
122
 
    if(checkInitialization(builder, "hc_elementgetelementsbytagnamespecialvalue") != null) return;
123
 
    var doc;
124
 
      var elementList;
125
 
      var lastEmployee;
126
 
      var lastempList;
127
 
      var child;
128
 
      var childName;
129
 
      var result = new Array();
130
 
 
131
 
      expectedResult = new Array();
132
 
      expectedResult[0] = "em";
133
 
      expectedResult[1] = "strong";
134
 
      expectedResult[2] = "code";
135
 
      expectedResult[3] = "sup";
136
 
      expectedResult[4] = "var";
137
 
      expectedResult[5] = "acronym";
138
 
 
139
 
      
140
 
      var docRef = null;
141
 
      if (typeof(this.doc) != 'undefined') {
142
 
        docRef = this.doc;
143
 
      }
144
 
      doc = load(docRef, "doc", "hc_staff");
145
 
      elementList = doc.getElementsByTagName("p");
146
 
      lastEmployee = elementList.item(4);
147
 
      lastempList = lastEmployee.getElementsByTagName("*");
148
 
      for(var indexN65639 = 0;indexN65639 < lastempList.length; indexN65639++) {
149
 
      child = lastempList.item(indexN65639);
150
 
      childName = child.nodeName;
151
 
 
152
 
      result[result.length] = childName;
153
 
 
154
 
        }
155
 
   assertEqualsListAutoCase("element", "tagNames",expectedResult,result);
156
 
       
157
 
}
158
 
 
159
 
</script>
160
 
</head>
161
 
<body>
162
 
<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementgetelementsbytagnamespecialvalue</h2>
163
 
<p></p>
164
 
<p>
165
 
Copyright (c) 2001-2004 World Wide Web Consortium, 
166
 
(Massachusetts Institute of Technology, European Research Consortium 
167
 
for Informatics and Mathematics, Keio University). All 
168
 
Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
169
 
hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
170
 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
171
 
</p>
172
 
<iframe name="doc" src="files/hc_staff.html"></iframe>
173
 
<br>
174
 
</body>
175
 
</html>