selenium-core-runner 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/Gemfile +9 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +30 -0
  5. data/app/controllers/selenium_core_runner/suites_controller.rb +19 -0
  6. data/app/views/selenium_core_runner/suites/index.html.erb +177 -0
  7. data/app/views/selenium_core_runner/suites/show.html.erb +0 -0
  8. data/config/routes.rb +6 -0
  9. data/lib/selenium-core-runner/engine.rb +19 -0
  10. data/lib/selenium-core-runner.rb +3 -0
  11. data/public/selenium-core-runner/Blank.html +7 -0
  12. data/public/selenium-core-runner/InjectedRemoteRunner.html +8 -0
  13. data/public/selenium-core-runner/RemoteRunner.html +101 -0
  14. data/public/selenium-core-runner/SeleniumLog.html +109 -0
  15. data/public/selenium-core-runner/TestPrompt.html +145 -0
  16. data/public/selenium-core-runner/TestRunner-splash.html +55 -0
  17. data/public/selenium-core-runner/TestRunner.hta +177 -0
  18. data/public/selenium-core-runner/TestRunner.html +177 -0
  19. data/public/selenium-core-runner/icons/all.png +0 -0
  20. data/public/selenium-core-runner/icons/continue.png +0 -0
  21. data/public/selenium-core-runner/icons/continue_disabled.png +0 -0
  22. data/public/selenium-core-runner/icons/pause.png +0 -0
  23. data/public/selenium-core-runner/icons/pause_disabled.png +0 -0
  24. data/public/selenium-core-runner/icons/selected.png +0 -0
  25. data/public/selenium-core-runner/icons/step.png +0 -0
  26. data/public/selenium-core-runner/icons/step_disabled.png +0 -0
  27. data/public/selenium-core-runner/iedoc-core.xml +1789 -0
  28. data/public/selenium-core-runner/iedoc.xml +1830 -0
  29. data/public/selenium-core-runner/lib/cssQuery/cssQuery-p.js +6 -0
  30. data/public/selenium-core-runner/lib/cssQuery/src/cssQuery-level2.js +142 -0
  31. data/public/selenium-core-runner/lib/cssQuery/src/cssQuery-level3.js +150 -0
  32. data/public/selenium-core-runner/lib/cssQuery/src/cssQuery-standard.js +53 -0
  33. data/public/selenium-core-runner/lib/cssQuery/src/cssQuery.js +356 -0
  34. data/public/selenium-core-runner/lib/prototype.js +2006 -0
  35. data/public/selenium-core-runner/lib/scriptaculous/builder.js +101 -0
  36. data/public/selenium-core-runner/lib/scriptaculous/controls.js +815 -0
  37. data/public/selenium-core-runner/lib/scriptaculous/dragdrop.js +915 -0
  38. data/public/selenium-core-runner/lib/scriptaculous/effects.js +958 -0
  39. data/public/selenium-core-runner/lib/scriptaculous/scriptaculous.js +47 -0
  40. data/public/selenium-core-runner/lib/scriptaculous/slider.js +283 -0
  41. data/public/selenium-core-runner/lib/scriptaculous/unittest.js +383 -0
  42. data/public/selenium-core-runner/lib/snapsie.js +91 -0
  43. data/public/selenium-core-runner/scripts/find_matching_child.js +69 -0
  44. data/public/selenium-core-runner/scripts/htmlutils.js +1623 -0
  45. data/public/selenium-core-runner/scripts/injection.html +72 -0
  46. data/public/selenium-core-runner/scripts/selenium-api.js +3240 -0
  47. data/public/selenium-core-runner/scripts/selenium-browserbot.js +2333 -0
  48. data/public/selenium-core-runner/scripts/selenium-browserdetect.js +153 -0
  49. data/public/selenium-core-runner/scripts/selenium-commandhandlers.js +379 -0
  50. data/public/selenium-core-runner/scripts/selenium-executionloop.js +175 -0
  51. data/public/selenium-core-runner/scripts/selenium-logging.js +148 -0
  52. data/public/selenium-core-runner/scripts/selenium-remoterunner.js +695 -0
  53. data/public/selenium-core-runner/scripts/selenium-testrunner.js +1362 -0
  54. data/public/selenium-core-runner/scripts/selenium-version.js +5 -0
  55. data/public/selenium-core-runner/scripts/ui-doc.html +803 -0
  56. data/public/selenium-core-runner/scripts/ui-element.js +1627 -0
  57. data/public/selenium-core-runner/scripts/ui-map-sample.js +979 -0
  58. data/public/selenium-core-runner/scripts/user-extensions.js +3 -0
  59. data/public/selenium-core-runner/scripts/user-extensions.js.sample +75 -0
  60. data/public/selenium-core-runner/scripts/xmlextras.js +153 -0
  61. data/public/selenium-core-runner/selenium-logo.png +0 -0
  62. data/public/selenium-core-runner/selenium-test.css +43 -0
  63. data/public/selenium-core-runner/selenium.css +316 -0
  64. data/public/selenium-core-runner/xpath/dom.js +566 -0
  65. data/public/selenium-core-runner/xpath/javascript-xpath-0.1.11.js +2816 -0
  66. data/public/selenium-core-runner/xpath/util.js +549 -0
  67. data/public/selenium-core-runner/xpath/xmltoken.js +149 -0
  68. data/public/selenium-core-runner/xpath/xpath.js +2481 -0
  69. metadata +121 -0
@@ -0,0 +1,101 @@
1
+ // Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2
+ //
3
+ // See scriptaculous.js for full license.
4
+
5
+ var Builder = {
6
+ NODEMAP: {
7
+ AREA: 'map',
8
+ CAPTION: 'table',
9
+ COL: 'table',
10
+ COLGROUP: 'table',
11
+ LEGEND: 'fieldset',
12
+ OPTGROUP: 'select',
13
+ OPTION: 'select',
14
+ PARAM: 'object',
15
+ TBODY: 'table',
16
+ TD: 'table',
17
+ TFOOT: 'table',
18
+ TH: 'table',
19
+ THEAD: 'table',
20
+ TR: 'table'
21
+ },
22
+ // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
23
+ // due to a Firefox bug
24
+ node: function(elementName) {
25
+ elementName = elementName.toUpperCase();
26
+
27
+ // try innerHTML approach
28
+ var parentTag = this.NODEMAP[elementName] || 'div';
29
+ var parentElement = document.createElement(parentTag);
30
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
31
+ parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
32
+ } catch(e) {}
33
+ var element = parentElement.firstChild || null;
34
+
35
+ // see if browser added wrapping tags
36
+ if(element && (element.tagName != elementName))
37
+ element = element.getElementsByTagName(elementName)[0];
38
+
39
+ // fallback to createElement approach
40
+ if(!element) element = document.createElement(elementName);
41
+
42
+ // abort if nothing could be created
43
+ if(!element) return;
44
+
45
+ // attributes (or text)
46
+ if(arguments[1])
47
+ if(this._isStringOrNumber(arguments[1]) ||
48
+ (arguments[1] instanceof Array)) {
49
+ this._children(element, arguments[1]);
50
+ } else {
51
+ var attrs = this._attributes(arguments[1]);
52
+ if(attrs.length) {
53
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
54
+ parentElement.innerHTML = "<" +elementName + " " +
55
+ attrs + "></" + elementName + ">";
56
+ } catch(e) {}
57
+ element = parentElement.firstChild || null;
58
+ // workaround firefox 1.0.X bug
59
+ if(!element) {
60
+ element = document.createElement(elementName);
61
+ for(attr in arguments[1])
62
+ element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
63
+ }
64
+ if(element.tagName != elementName)
65
+ element = parentElement.getElementsByTagName(elementName)[0];
66
+ }
67
+ }
68
+
69
+ // text, or array of children
70
+ if(arguments[2])
71
+ this._children(element, arguments[2]);
72
+
73
+ return element;
74
+ },
75
+ _text: function(text) {
76
+ return document.createTextNode(text);
77
+ },
78
+ _attributes: function(attributes) {
79
+ var attrs = [];
80
+ for(attribute in attributes)
81
+ attrs.push((attribute=='className' ? 'class' : attribute) +
82
+ '="' + attributes[attribute].toString().escapeHTML() + '"');
83
+ return attrs.join(" ");
84
+ },
85
+ _children: function(element, children) {
86
+ if(typeof children=='object') { // array can hold nodes and text
87
+ children.flatten().each( function(e) {
88
+ if(typeof e=='object')
89
+ element.appendChild(e)
90
+ else
91
+ if(Builder._isStringOrNumber(e))
92
+ element.appendChild(Builder._text(e));
93
+ });
94
+ } else
95
+ if(Builder._isStringOrNumber(children))
96
+ element.appendChild(Builder._text(children));
97
+ },
98
+ _isStringOrNumber: function(param) {
99
+ return(typeof param=='string' || typeof param=='number');
100
+ }
101
+ }