~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/embedding/qa/jstests/accessibility/xul/xulimage.xul

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
 
3
     for XUL IMAGE Node
 
4
     Author: dsirnapalli@netscape.com
 
5
     Created:06.13.02
 
6
     Last Updated:06.13.02.
 
7
 
 
8
   - The contents of this file are subject to the Mozilla Public
 
9
   - License Version 1.1 (the "License"); you may not use this file
 
10
   - except in compliance with the License. You may obtain a copy of
 
11
   - the License at http://www.mozilla.org/MPL/
 
12
   -
 
13
   - Software distributed under the License is distributed on an "AS
 
14
   - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
15
   - implied. See the License for the specific language governing
 
16
   - rights and limitations under the License.
 
17
   -
 
18
   - The Original Code is Mozilla Communicator Test Cases.
 
19
   -
 
20
   - The Initial Developer of the Original Code is Netscape Communications
 
21
   - Corp.  Portions created by Netscape Communications Corp. are
 
22
   - Copyright (C) 1999 Netscape Communications Corp.  All
 
23
   - Rights Reserved.
 
24
   -
 
25
   - Contributor(s):
 
26
  -->
 
27
 
 
28
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 
29
<window
 
30
  id="image-window"
 
31
  title="XUL Image"
 
32
  orient="vertical"
 
33
  xmlns:html="http://www.w3.org/1999/xhtml"
 
34
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
35
 
 
36
  <html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
 
37
  <html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
 
38
 
 
39
  <html:script>
 
40
  <![CDATA[
 
41
 
 
42
  function getDomNodeImage()
 
43
  {
 
44
    try{
 
45
      netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
 
46
      netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
 
47
  
 
48
      var node = document.getElementsByTagName("image").item(0);
 
49
      return node;
 
50
    }
 
51
    catch(e){
 
52
      alert("Exception: " + e);
 
53
    }
 
54
  }  
 
55
 
 
56
  function executeTestCase()
 
57
  {
 
58
    var domNode = getDomNodeImage();
 
59
    accNode = getAccessibleNode(domNode);
 
60
    if(accNode == "Exception")
 
61
    {            
 
62
      temp = "<table border cols=2 width='70%'>";
 
63
      temp += "<tr>";
 
64
      temp += "<td> The Node you selected is not an Accessible Node </td>";
 
65
      temp += "<td> PASS </td>";
 
66
      temp += "</tr>";
 
67
      temp += "</table>";
 
68
      res = res + temp;
 
69
    }    
 
70
    WriteResults(res);    
 
71
  }
 
72
 
 
73
  ]]>
 
74
  </html:script>
 
75
  
 
76
  <box orient="vertical" flex="1">  
 
77
    <description>
 
78
      <html:b> Testing XUL Image for Accessibility.. </html:b>
 
79
    </description>
 
80
    <box oreint="horizontal">
 
81
      <!-- image element is used to display images within a window -->
 
82
      <image src="mozilla-banner.gif"/>
 
83
      <spacer flex="1"/>
 
84
    </box>
 
85
  </box>
 
86
 
 
87
  <html:script>
 
88
  <![CDATA[
 
89
    res = "<b><u> Results for XUL Image Node:</u></b><br><br>";
 
90
 
 
91
    setTimeout("executeTestCase();", 2000);
 
92
  ]]>
 
93
  </html:script>    
 
94
</window>
 
95
  
 
 
b'\\ No newline at end of file'