qunit_for_rails 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. data/.gitignore +5 -0
  2. data/Gemfile +7 -0
  3. data/MIT-LICENSE +20 -0
  4. data/README.mdown +103 -0
  5. data/Rakefile +31 -0
  6. data/app/controllers/qunit_for_rails/qunit_tests_controller.rb +19 -0
  7. data/app/views/layouts/qunit_for_rails/main.haml +15 -0
  8. data/app/views/qunit_for_rails/qunit_tests/index.html.haml +15 -0
  9. data/config/routes.rb +3 -0
  10. data/lib/qunit_for_rails.rb +15 -0
  11. data/lib/qunit_for_rails/engine.rb +20 -0
  12. data/lib/qunit_for_rails/version.rb +3 -0
  13. data/lib/tasks/qunit_for_rails_tasks.rake +4 -0
  14. data/public/images/bg_diagonalDarkBlue.gif +0 -0
  15. data/public/images/bg_secondaryNav_left.gif +0 -0
  16. data/public/images/bg_secondaryNav_right.gif +0 -0
  17. data/public/images/i_loading_bar.gif +0 -0
  18. data/public/images/l_qunit.png +0 -0
  19. data/public/javascripts/qunit_for_rails/index.js +0 -0
  20. data/public/javascripts/qunit_for_rails/inject.js +191 -0
  21. data/public/javascripts/qunit_for_rails/jquery-1.6.4.min.js +4 -0
  22. data/public/javascripts/qunit_for_rails/qunit.js +1585 -0
  23. data/public/javascripts/qunit_for_rails/qunit.page_load.js +47 -0
  24. data/public/javascripts/qunit_for_rails/qunit.test_loader.js +98 -0
  25. data/public/javascripts/qunit_for_rails/qunit.test_page.js +55 -0
  26. data/public/javascripts/qunit_for_rails/qunit_for_rails.js +159 -0
  27. data/public/javascripts/tests/test.js +13 -0
  28. data/public/stylesheets/qunit.css +228 -0
  29. data/public/stylesheets/qunit_for_rails.css +255 -0
  30. data/qunit_for_rails.gemspec +29 -0
  31. data/test/dummy/Rakefile +7 -0
  32. data/test/dummy/app/controllers/application_controller.rb +3 -0
  33. data/test/dummy/app/helpers/application_helper.rb +2 -0
  34. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  35. data/test/dummy/config.ru +4 -0
  36. data/test/dummy/config/application.rb +43 -0
  37. data/test/dummy/config/boot.rb +10 -0
  38. data/test/dummy/config/database.yml +22 -0
  39. data/test/dummy/config/environment.rb +5 -0
  40. data/test/dummy/config/environments/development.rb +26 -0
  41. data/test/dummy/config/environments/production.rb +49 -0
  42. data/test/dummy/config/environments/test.rb +35 -0
  43. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  44. data/test/dummy/config/initializers/inflections.rb +10 -0
  45. data/test/dummy/config/initializers/mime_types.rb +5 -0
  46. data/test/dummy/config/initializers/secret_token.rb +7 -0
  47. data/test/dummy/config/initializers/session_store.rb +8 -0
  48. data/test/dummy/config/locales/en.yml +5 -0
  49. data/test/dummy/config/routes.rb +58 -0
  50. data/test/dummy/db/development.sqlite3 +0 -0
  51. data/test/dummy/log/development.log +4297 -0
  52. data/test/dummy/log/production.log +0 -0
  53. data/test/dummy/log/server.log +0 -0
  54. data/test/dummy/log/test.log +0 -0
  55. data/test/dummy/public/404.html +26 -0
  56. data/test/dummy/public/422.html +26 -0
  57. data/test/dummy/public/500.html +26 -0
  58. data/test/dummy/public/favicon.ico +0 -0
  59. data/test/dummy/public/javascripts/application.js +2 -0
  60. data/test/dummy/public/javascripts/controls.js +965 -0
  61. data/test/dummy/public/javascripts/dragdrop.js +974 -0
  62. data/test/dummy/public/javascripts/effects.js +1123 -0
  63. data/test/dummy/public/javascripts/prototype.js +6001 -0
  64. data/test/dummy/public/javascripts/rails.js +191 -0
  65. data/test/dummy/public/javascripts/test/example2_test.js +23 -0
  66. data/test/dummy/public/javascripts/test/example_test.js +23 -0
  67. data/test/dummy/public/stylesheets/.gitkeep +0 -0
  68. data/test/dummy/script/rails +6 -0
  69. data/test/integration/navigation_test.rb +7 -0
  70. data/test/qunit_for_rails_test.rb +33 -0
  71. data/test/support/integration_case.rb +5 -0
  72. data/test/test_helper.rb +3 -0
  73. metadata +224 -0
@@ -0,0 +1,47 @@
1
+ QUnit.page_load = (function(){
2
+ var page_loading = false,
3
+
4
+ get_container = function() {
5
+ return $('#qunit-page-load');
6
+ },
7
+ add_page = function(html) {
8
+ var page_load_container = get_container();
9
+
10
+ if( page_load_container.length === 0 ){
11
+ $('body').append('<div id="qunit-page-load"></div>');
12
+ page_load_container = get_container();
13
+ }
14
+
15
+ page_load_container.append(html);
16
+ },
17
+ clear_container = function(){
18
+ var page_load_container = get_container();
19
+
20
+ page_load_container.empty();
21
+ },
22
+ set_test_page = function(url, testsCallback){
23
+ page_loading = true;
24
+
25
+ parent.window.QUnit.test_loader.load(test_name, testsCallback);
26
+
27
+ /*$.get(url)
28
+ .success(function(page){
29
+ clear_container();
30
+ add_page(page);
31
+ page_loading = false;
32
+ //testsCallback();
33
+ })
34
+ .error(function(){
35
+ console.log('There was an error loading the page');
36
+ page_loading = false;
37
+ });*/
38
+ };
39
+
40
+
41
+ return {
42
+ is_page_loading : function(){ return page_loading; },
43
+ set_test_page : set_test_page,
44
+ clear_test_page : clear_container
45
+ };
46
+
47
+ })();
@@ -0,0 +1,98 @@
1
+ var QUnit = QUnit || {};
2
+ QUnit.extensions = QUnit.extensions || {};
3
+
4
+ QUnit.extensions.test_loader = (function(){
5
+ var test_suites = {},
6
+
7
+ suite = function(){
8
+ if( arguments.length === 2 ){
9
+ if( typeof arguments[0] === 'string' && typeof arguments[1] === 'function' ){
10
+ load(arguments[0], arguments[1]);
11
+ }
12
+ } else if( arguments.length === 3 ){
13
+ if( typeof arguments[0] === 'string' && typeof arguments[1] === 'object' && typeof arguments[2] === 'function' ){
14
+ load(arguments[0], arguments[2], arguments[1]);
15
+ }
16
+ }
17
+ },
18
+ load = function(suite_name, tests, options){
19
+ var iframe, testFrameContainer, testFrameHeader,
20
+ options = options || {};
21
+
22
+ if( test_suites[suite_name] !== undefined ){
23
+ $('#testFrameContainer_' + suite_name).remove();
24
+ } else {
25
+ test_suites[suite_name] = { 'name' : suite_name, 'tests' : String(tests) };
26
+
27
+ $('#testFrameHeader_' + suite_name).live('click', function(){
28
+ $(this).siblings('iframe').toggle();
29
+ toggle_containers(suite_name);
30
+ });
31
+ }
32
+
33
+ toggle_containers(suite_name);
34
+
35
+ if( options['test_page'] ){
36
+ iframe = $('<iframe />', {
37
+ id : 'testFrame_' + suite_name,
38
+ src : options['test_page']
39
+ });
40
+ } else {
41
+ iframe = $('<iframe />', {
42
+ id : 'testFrame_' + suite_name
43
+ });
44
+ }
45
+
46
+ testFrameContainer = $('<div />', { id : 'testFrameContainer_' + suite_name, class : 'testFrameContainer' });
47
+ testFrameHeader = $('<div />', { id : 'testFrameHeader_' + suite_name, class : 'testFrameHeader' });
48
+
49
+ testFrameHeader.append($('<h2/>', { text : "Running....." }));
50
+ testFrameHeader.append($('<h2/>', { text : "Tests for test suite: " + suite_name }));
51
+
52
+ testFrameContainer.append(testFrameHeader);
53
+ testFrameContainer.append(iframe);
54
+
55
+ iframe.load(function(){
56
+ get_scripts(suite_name);
57
+ });
58
+
59
+ $('#testSuiteContainer').append(testFrameContainer);
60
+ iframe.width('100%');
61
+
62
+ },
63
+ get_scripts = function(suite_name){
64
+ var scripts = [];
65
+
66
+ scripts.push($('<link />', { href : '/katello/stylesheets/qunit.css', rel : 'stylesheet', type : 'text/css' }));
67
+ scripts.push($('<script />', { src : '/katello/javascripts/qunit_for_rails/jquery-1.6.4.min.js', type : 'text/javascript' }));
68
+ scripts.push($('<script />', { src : '/katello/javascripts/qunit_for_rails/qunit.js', type : 'text/javascript' }));
69
+ scripts.push($('<script />', { src : '/katello/javascripts/qunit_for_rails/qunit.test_page.js', type : 'text/javascript' }));
70
+
71
+ for( script in scripts){
72
+ $('#testFrame_' + suite_name)[0].contentDocument.getElementsByTagName('head')[0].appendChild(scripts[script][0]);
73
+ }
74
+
75
+
76
+ //$('#testFrame_' + suite_name)[0].contentDocument.getElementsByTagName('body')[0].setAttribute('data-url', QFR.root_url + '/javascripts/test/' + test_script);
77
+ $('#testFrame_' + suite_name)[0].contentDocument.getElementsByTagName('body')[0].setAttribute('data-testname', suite_name);
78
+ },
79
+ toggle_containers = function(current_suite){
80
+ var suite;
81
+
82
+ for( suite in test_suites ){
83
+ if( suite !== current_suite ){
84
+ $('#testFrame_' + suite).hide();
85
+ }
86
+ }
87
+ },
88
+ get_suite = function(suite_name){
89
+ return test_suites[suite_name]['tests'];
90
+ };
91
+
92
+ return {
93
+ load : load,
94
+ suite : suite,
95
+ get_suite : get_suite
96
+ };
97
+
98
+ })();
@@ -0,0 +1,55 @@
1
+ var QUnit = QUnit || {};
2
+
3
+ QUnit.test_page = function($){
4
+
5
+ var init = function(){
6
+ var test_suite;
7
+
8
+ // define qunit results
9
+ var qr = "";
10
+ qr += "<h1 id=\"qunit-header\">Results</h1>";
11
+ qr += "<h2 id=\"qunit-banner\"></h2>";
12
+ qr += '<div id="qunit-testrunner-toolbar"></div>';
13
+ qr += "<h2 id=\"qunit-userAgent\"></h2>";
14
+ qr += '<p id="qunit-testresult" class="result"></p>';
15
+ qr += "<ol id=\"qunit-tests\"></ol>";
16
+ qr += '<div id="qunit-fixture">test markup, will be hidden</div>';
17
+ qr += "</div>";
18
+
19
+ $("body").prepend(qr);
20
+
21
+ QUnit.done = function(results){
22
+ if( results['failed'] !== 0 ){
23
+ parent.window.$('#testFrameHeader_' + $('body').data('testname')).find('h2:first').html('Failed!');
24
+ parent.window.$('#testFrameHeader_' + $('body').data('testname')).addClass('fail');
25
+ } else {
26
+ parent.window.$('#testFrameHeader_' + $('body').data('testname')).find('h2:first').html('Passed!');
27
+ parent.window.$('#testFrameHeader_' + $('body').data('testname')).addClass('pass');
28
+ }
29
+ }
30
+
31
+ test_suite = parent.window.QUnit.extensions.test_loader.get_suite($('body').data('testname'));
32
+ load_tests(test_suite);
33
+
34
+ },
35
+ load_tests = function(tests){
36
+ if( typeof tests === 'string' ){
37
+ QUnit.init();
38
+ var func = eval('[' + tests + ']')[0];
39
+ func();
40
+ start();
41
+ }
42
+ };
43
+
44
+ return {
45
+ init : init,
46
+ load_tests : load_tests
47
+ }
48
+
49
+ };
50
+
51
+ $(document).ready(function(){
52
+ var custom = $.noConflict(true);
53
+
54
+ QUnit.test_page(custom).init();
55
+ });
@@ -0,0 +1,159 @@
1
+ var QFR = QFR || {};
2
+ test_list = [];
3
+
4
+ var QUnit_For_Rails = {
5
+
6
+ init: function init()
7
+ {
8
+ // define qunit menu
9
+ var qm = '';
10
+ qm += "<div id=\"qunit-menu\">";
11
+ qm += "<ul class=\"qunit-menu\">";
12
+ qm += "<li><b>Shortcuts (shift + ):</b></li>";
13
+ qm += "<li><b>?</b> - shows/hides the menu</li>";
14
+ qm += "<li><b>s</b> - shows qunit overlay</li>";
15
+ qm += "<li><b>h</b> - hides qunit overlay</li>";
16
+ qm += "<li><b>a</b> - runs all tests</li>";
17
+ qm += "<li><b>t</b> - shows/hides tests</li>";
18
+ qm += "</ul>";
19
+ qm += "</div>";
20
+
21
+ // define qunit results
22
+ var qr = "";
23
+ //qr += "<h1 id=\"qunit-header\">Results</h1>";
24
+ qr += "<h2 id=\"qunit-userAgent\"></h2>";
25
+ qr += '<img id="qunit-loading" src="' + QFR.root_url + '/images/i_loading_bar.gif" alt="loading">';
26
+
27
+ // tests list select
28
+ var tl = "";
29
+ tl += "<select id='qunit-test-select'><option></option><option>all</option>";
30
+ for(var i = 0; i < test_list.length; i += 1){
31
+ tl += '<option id="' + test_list[i] +'">' + test_list[i] + '</option>';
32
+ }
33
+ tl += "</select>";
34
+
35
+ // define qunit-overlay
36
+ var qo = '<div id="qunit-container">';
37
+ qo += "<div id=\"qunit-overlay\">";
38
+ qo += "<div id=\"qunit-test-options\">";
39
+ qo += "<ul class=\"qunit\">";
40
+ qo += "<li class=\"first\"><a id=\"qunit-all-tests\" href=\"#\">Run All Tests</a></li>";
41
+ qo += "<li class=\"last\">Or Choose A Test: " + tl;
42
+ qo += "</ul>";
43
+ qo += '<img src="' + QFR.root_url + '/images/bg_secondaryNav_right.gif">';
44
+ qo += "</div>";
45
+ qo += qm;
46
+ qo += "<div id=\"qunit-logo\">";
47
+ qo += "JavaScript testing powered by: <a href=\"http://docs.jquery.com/QUnit\">";
48
+ qo += '<img src="' + QFR.root_url + '/images/l_qunit.png" alt=\"qunit\" border=\"0\"></a></div>';
49
+ qo += "</div>";
50
+ qo += qr;
51
+ qo += "<div style='clear:both;'></div>";
52
+ qo += '</div>'
53
+ qo += '<div id="testSuiteContainer"></div>';
54
+
55
+ $("body").prepend(qo);
56
+
57
+ $('#qunit-menu').css('background', 'url(' + QFR.root_url + '/images/bg_diagonalDarkBlue.gif) rgb(51, 51, 51)');
58
+ $('ul.qunit').css('background', 'url(' + QFR.root_url + '/images/bg_secondaryNav_left.gif) no-repeat');
59
+ },
60
+
61
+ respond_to_key: function respond_to_key(e)
62
+ {
63
+ if (document.activeElement['nodeName'] == "INPUT" || document.activeElement['nodeName'] == "TEXTAREA") {
64
+ // escape if in a textfield
65
+ } else {
66
+ if (e.shiftKey) {
67
+ var unicode = e.keyCode? e.keyCode : e.charCode;
68
+ switch (unicode) {
69
+ case 83: case 115: // s keypress
70
+ $('#qunit-overlay').show();
71
+ break;
72
+ case 72: case 104: // h keypress
73
+ if($("#qunit-results").height() > 0)
74
+ $("#qunit-results").animate({ height: "0px"}, 500 );
75
+ $('#qunit-overlay').hide();
76
+ break;
77
+ case 191: case 47: // ? keypress
78
+ $('#qunit-overlay').show();
79
+ $('#qunit-menu').toggle();
80
+ break;
81
+ case 65: case 97: // a keypress
82
+ $("#qunit-all-tests").click();
83
+ break;
84
+ case 84: case 116: // t keypress
85
+ if($("#qunit-results").height() > 0) {
86
+ $("#qunit-results").animate({ height: "0px"}, 500 );
87
+ } else {
88
+ $('#qunit-overlay').show();
89
+ $("#qunit-results").animate({ height: "400px"}, 500 );
90
+ }
91
+ break;
92
+ default:
93
+ break;
94
+ }
95
+ }
96
+ }
97
+ },
98
+
99
+ load_js_file: function load_js_file(filename)
100
+ {
101
+ $.getScript(QFR.root_url + '/javascripts/test/' + filename);
102
+ },
103
+
104
+ unload_js_file: function unload_js_file(filename)
105
+ {
106
+ var targetelement="script";
107
+ var targetattr="src";
108
+ var allsuspects=document.getElementsByTagName(targetelement);
109
+ for (var i=allsuspects.length; i>=0; i--) {
110
+ if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null && allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1)
111
+ allsuspects[i].parentNode.removeChild(allsuspects[i]);
112
+ }
113
+ },
114
+
115
+ show_tests: function show_tests()
116
+ {
117
+ $('#qunit-overlay').show();
118
+ // clear out any previous results
119
+ $("#qunit-tests li").remove();
120
+ $("#qunit-testresult").remove();
121
+ $("#qunit-banner").attr("class", "");
122
+ $("#qunit-results").show();
123
+ $("#qunit-results").animate({ height: "400px"}, 500 );
124
+ $("#qunit-loading").show();
125
+ }
126
+ };
127
+
128
+ $(document).ready(function()
129
+ {
130
+ //QUnit.load();
131
+
132
+ QUnit_For_Rails.init();
133
+
134
+ $("#qunit-results").hide();
135
+ $("#qunit-loading").hide();
136
+ $("#qunit-results").animate({ height: "0px"}, 1 );
137
+
138
+ if ($.browser.mozilla) {
139
+ $(document).keypress (QUnit_For_Rails.respond_to_key);
140
+ } else {
141
+ $(document).keydown (QUnit_For_Rails.respond_to_key);
142
+ }
143
+
144
+ $("#qunit-test-select").change( function() {
145
+ if ($(this).val() !== "all" && $(this).val() !== "") {
146
+ QUnit_For_Rails.load_js_file($(this).val());
147
+ } else if( $(this).val() === "all" ) {
148
+ for(var j in test_list) {
149
+ QUnit_For_Rails.load_js_file(test_list[j]);
150
+ }
151
+ }
152
+ });
153
+
154
+ $("#qunit-all-tests").click( function() {
155
+ $("#qunit-test-select option:contains(all)").attr("selected", true);
156
+ $("#qunit-test-select").change();
157
+ });
158
+
159
+ });
@@ -0,0 +1,13 @@
1
+ var localtests = {
2
+ test_another_example : function()
3
+ {
4
+ module("Module Test");
5
+ test("simple passing example", function()
6
+ {
7
+ var value = "foo";
8
+ equals( "foo", value, "We expect value to be foo" );
9
+ });
10
+ }
11
+ };
12
+
13
+ $().extend(tests, localtests);
@@ -0,0 +1,228 @@
1
+ /**
2
+ * QUnit 1.2.0pre - A JavaScript Unit Testing Framework
3
+ *
4
+ * http://docs.jquery.com/QUnit
5
+ *
6
+ * Copyright (c) 2011 John Resig, Jörn Zaefferer
7
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
8
+ * or GPL (GPL-LICENSE.txt) licenses.
9
+ */
10
+
11
+ /** Font Family and Sizes */
12
+
13
+ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
14
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
15
+ }
16
+
17
+ #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
18
+ #qunit-tests { font-size: smaller; }
19
+
20
+
21
+ /** Resets */
22
+
23
+ #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
24
+ margin: 0;
25
+ padding: 0;
26
+ }
27
+
28
+
29
+ /** Header */
30
+
31
+ #qunit-header {
32
+ padding: 0.5em 0 0.5em 1em;
33
+
34
+ color: #8699a4;
35
+ background-color: #0d3349;
36
+
37
+ font-size: 1.5em;
38
+ line-height: 1em;
39
+ font-weight: normal;
40
+
41
+ border-radius: 15px 15px 0 0;
42
+ -moz-border-radius: 15px 15px 0 0;
43
+ -webkit-border-top-right-radius: 15px;
44
+ -webkit-border-top-left-radius: 15px;
45
+ }
46
+
47
+ #qunit-header a {
48
+ text-decoration: none;
49
+ color: #c2ccd1;
50
+ }
51
+
52
+ #qunit-header a:hover,
53
+ #qunit-header a:focus {
54
+ color: #fff;
55
+ }
56
+
57
+ #qunit-banner {
58
+ height: 5px;
59
+ }
60
+
61
+ #qunit-testrunner-toolbar {
62
+ padding: 0.5em 0 0.5em 2em;
63
+ color: #5E740B;
64
+ background-color: #eee;
65
+ }
66
+
67
+ #qunit-userAgent {
68
+ padding: 0.5em 0 0.5em 2.5em;
69
+ background-color: #2b81af;
70
+ color: #fff;
71
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
72
+ }
73
+
74
+
75
+ /** Tests: Pass/Fail */
76
+
77
+ #qunit-tests {
78
+ list-style-position: inside;
79
+ }
80
+
81
+ #qunit-tests li {
82
+ padding: 0.4em 0.5em 0.4em 2.5em;
83
+ border-bottom: 1px solid #fff;
84
+ list-style-position: inside;
85
+ }
86
+
87
+ #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
88
+ display: none;
89
+ }
90
+
91
+ #qunit-tests li strong {
92
+ cursor: pointer;
93
+ }
94
+
95
+ #qunit-tests li a {
96
+ padding: 0.5em;
97
+ color: #c2ccd1;
98
+ text-decoration: none;
99
+ }
100
+ #qunit-tests li a:hover,
101
+ #qunit-tests li a:focus {
102
+ color: #000;
103
+ }
104
+
105
+ #qunit-tests ol {
106
+ margin-top: 0.5em;
107
+ padding: 0.5em;
108
+
109
+ background-color: #fff;
110
+
111
+ border-radius: 15px;
112
+ -moz-border-radius: 15px;
113
+ -webkit-border-radius: 15px;
114
+
115
+ box-shadow: inset 0px 2px 13px #999;
116
+ -moz-box-shadow: inset 0px 2px 13px #999;
117
+ -webkit-box-shadow: inset 0px 2px 13px #999;
118
+
119
+ display: none;
120
+ }
121
+
122
+ #qunit-tests table {
123
+ border-collapse: collapse;
124
+ margin-top: .2em;
125
+ }
126
+
127
+ #qunit-tests th {
128
+ text-align: right;
129
+ vertical-align: top;
130
+ padding: 0 .5em 0 0;
131
+ }
132
+
133
+ #qunit-tests td {
134
+ vertical-align: top;
135
+ }
136
+
137
+ #qunit-tests pre {
138
+ margin: 0;
139
+ white-space: pre-wrap;
140
+ word-wrap: break-word;
141
+ }
142
+
143
+ #qunit-tests del {
144
+ background-color: #e0f2be;
145
+ color: #374e0c;
146
+ text-decoration: none;
147
+ }
148
+
149
+ #qunit-tests ins {
150
+ background-color: #ffcaca;
151
+ color: #500;
152
+ text-decoration: none;
153
+ }
154
+
155
+ /*** Test Counts */
156
+
157
+ #qunit-tests b.counts { color: black; }
158
+ #qunit-tests b.passed { color: #5E740B; }
159
+ #qunit-tests b.failed { color: #710909; }
160
+
161
+ #qunit-tests li li {
162
+ margin: 0.5em;
163
+ padding: 0.4em 0.5em 0.4em 0.5em;
164
+ background-color: #fff;
165
+ border-bottom: none;
166
+ list-style-position: inside;
167
+ }
168
+
169
+ /*** Passing Styles */
170
+
171
+ #qunit-tests li li.pass {
172
+ color: #5E740B;
173
+ background-color: #fff;
174
+ border-left: 26px solid #C6E746;
175
+ }
176
+
177
+ #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
178
+ #qunit-tests .pass .test-name { color: #366097; }
179
+
180
+ #qunit-tests .pass .test-actual,
181
+ #qunit-tests .pass .test-expected { color: #999999; }
182
+
183
+ #qunit-banner.qunit-pass { background-color: #C6E746; }
184
+
185
+ /*** Failing Styles */
186
+
187
+ #qunit-tests li li.fail {
188
+ color: #710909;
189
+ background-color: #fff;
190
+ border-left: 26px solid #EE5757;
191
+ white-space: pre;
192
+ }
193
+
194
+ #qunit-tests > li:last-child {
195
+ border-radius: 0 0 15px 15px;
196
+ -moz-border-radius: 0 0 15px 15px;
197
+ -webkit-border-bottom-right-radius: 15px;
198
+ -webkit-border-bottom-left-radius: 15px;
199
+ }
200
+
201
+ #qunit-tests .fail { color: #000000; background-color: #EE5757; }
202
+ #qunit-tests .fail .test-name,
203
+ #qunit-tests .fail .module-name { color: #000000; }
204
+
205
+ #qunit-tests .fail .test-actual { color: #EE5757; }
206
+ #qunit-tests .fail .test-expected { color: green; }
207
+
208
+ #qunit-banner.qunit-fail { background-color: #EE5757; }
209
+
210
+
211
+ /** Result */
212
+
213
+ #qunit-testresult {
214
+ padding: 0.5em 0.5em 0.5em 2.5em;
215
+
216
+ color: #2b81af;
217
+ background-color: #D2E0E6;
218
+
219
+ border-bottom: 1px solid white;
220
+ }
221
+
222
+ /** Fixture */
223
+
224
+ #qunit-fixture {
225
+ position: absolute;
226
+ top: -10000px;
227
+ left: -10000px;
228
+ }