gabrielg-xultestrunner 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,90 @@
1
+ body, div, p, h1, h2, h3, ul, ol, span, a, table, td, form, img, li {
2
+ font-family: sans-serif;
3
+ }
4
+
5
+ body {
6
+ font-size:0.8em;
7
+ }
8
+
9
+ .navigation {
10
+ background: #9DC569;
11
+ color: #fff;
12
+ }
13
+
14
+ .navigation h1 {
15
+ font-size: 20px;
16
+ }
17
+
18
+ .navigation h2 {
19
+ font-size: 16px;
20
+ font-weight: normal;
21
+ margin: 0;
22
+ border: 1px solid #e8a400;
23
+ border-bottom: 0;
24
+ background: #ffc;
25
+ color: #E8A400;
26
+ padding: 8px;
27
+ padding-bottom: 0;
28
+ }
29
+
30
+ .navigation ul {
31
+ margin-top: 0;
32
+ border: 1px solid #E8A400;
33
+ border-top: none;
34
+ background: #ffc;
35
+ padding: 8px;
36
+ margin-left: 0;
37
+ }
38
+
39
+ .navigation ul li {
40
+ font-size: 12px;
41
+ list-style-type: none;
42
+ margin-top: 1px;
43
+ margin-bottom: 1px;
44
+ color: #555;
45
+ }
46
+
47
+ .navigation a {
48
+ color: #ffc;
49
+ }
50
+
51
+ .navigation ul li a {
52
+ color: #000;
53
+ }
54
+
55
+ #log {
56
+ padding-bottom: 1em;
57
+ border-bottom: 2px solid #000;
58
+ margin-bottom: 2em;
59
+ }
60
+
61
+ #logsummary {
62
+ margin-bottom: 1em;
63
+ padding: 1ex;
64
+ border: 1px solid #000;
65
+ font-weight: bold;
66
+ }
67
+
68
+ #logtable {
69
+ width:100%;
70
+ border-collapse: collapse;
71
+ border: 1px dotted #666;
72
+ }
73
+
74
+ #logtable td, #logtable th {
75
+ text-align: left;
76
+ padding: 3px 8px;
77
+ border: 1px dotted #666;
78
+ }
79
+
80
+ #logtable .passed {
81
+ background-color: #cfc;
82
+ }
83
+
84
+ #logtable .failed, #logtable .error {
85
+ background-color: #fcc;
86
+ }
87
+
88
+ #logtable .nameCell {
89
+ cursor: pointer;
90
+ }
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <title>Unit Test Harness</title>
5
+ <script type="text/javascript" src="resource://xultestrunner/vendor/prototype/prototype.js"></script>
6
+ <script type="text/javascript" src="resource://xultestrunner/vendor/scriptaculous/unittest.js"></script>
7
+ <link rel="stylesheet" href="resource://xultestrunner/vendor/scriptaculous/test.css" type="text/css" />
8
+ <script type="text/javascript">
9
+ $(document).observe('dom:loaded', function(){
10
+
11
+ // FIXME - Because we're in crazy HTML/resource URL land we need to grant ourselves some magical privileges
12
+ // since I clearly don't "get" XULRunner security
13
+ var privileges = 'UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite ' +
14
+ 'UniversalPreferencesRead UniversalPreferencesWrite CapabilityPreferencesAccess UniversalFileRead';
15
+ netscape.security.PrivilegeManager.enablePrivilege(privileges);
16
+ var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
17
+ loader.loadSubScript("resource://xultestrunner/lib/shortcuts.js");
18
+ loader.loadSubScript("resource://xultestrunner/lib/xultestcase.js");
19
+
20
+ var qp = window.location.search.toQueryParams();
21
+ var testCase = XULTestCase.loadFromFile(qp.testFile);
22
+ testCase.go();
23
+ });
24
+ </script>
25
+ </head>
26
+ <body>
27
+ <h1>Unit Test Harness</h1>
28
+ <!-- Log output -->
29
+ <div id="testlog"></div>
30
+ </body>
31
+ </html>