wpa_cli_web 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/.bowerrc +3 -0
  2. data/lib/wpa_cli_web.rb +19 -31
  3. data/lib/wpa_cli_web/public/bower_components/house-style/.bower.json +14 -0
  4. data/lib/wpa_cli_web/public/bower_components/house-style/.bowerrc +3 -0
  5. data/lib/wpa_cli_web/public/bower_components/house-style/.gitignore +2 -0
  6. data/lib/wpa_cli_web/public/bower_components/house-style/Gemfile +6 -0
  7. data/lib/wpa_cli_web/public/bower_components/house-style/Gruntfile.js +99 -0
  8. data/lib/wpa_cli_web/public/bower_components/house-style/Guardfile +19 -0
  9. data/lib/wpa_cli_web/public/bower_components/house-style/bower.json +7 -0
  10. data/lib/wpa_cli_web/public/bower_components/house-style/bower_components/normalize-css/LICENSE.md +19 -0
  11. data/lib/wpa_cli_web/public/bower_components/house-style/bower_components/normalize-css/README.md +49 -0
  12. data/lib/wpa_cli_web/public/bower_components/house-style/bower_components/normalize-css/bower.json +23 -0
  13. data/lib/wpa_cli_web/public/bower_components/house-style/bower_components/normalize-css/normalize.css +396 -0
  14. data/lib/wpa_cli_web/public/bower_components/house-style/house-style.css +860 -0
  15. data/lib/wpa_cli_web/public/bower_components/house-style/house-style.min.css +1 -0
  16. data/lib/wpa_cli_web/public/bower_components/house-style/modules/base/base.css +37 -0
  17. data/lib/wpa_cli_web/public/bower_components/house-style/modules/button/button.css +26 -0
  18. data/lib/wpa_cli_web/public/bower_components/house-style/modules/grid/grid.css +151 -0
  19. data/lib/wpa_cli_web/public/bower_components/house-style/modules/grid/grid.png +0 -0
  20. data/lib/wpa_cli_web/public/bower_components/house-style/modules/grid/images.html +208 -0
  21. data/lib/wpa_cli_web/public/bower_components/house-style/modules/grid/index.html +141 -0
  22. data/lib/wpa_cli_web/public/bower_components/house-style/modules/loading/index.html +22 -0
  23. data/lib/wpa_cli_web/public/bower_components/house-style/modules/loading/loading.css +41 -0
  24. data/lib/wpa_cli_web/public/bower_components/house-style/modules/loading/spinner.svg +11 -0
  25. data/lib/wpa_cli_web/public/bower_components/house-style/modules/masthead/bbc-blocks-white.png +0 -0
  26. data/lib/wpa_cli_web/public/bower_components/house-style/modules/masthead/index.html +20 -0
  27. data/lib/wpa_cli_web/public/bower_components/house-style/modules/masthead/masthead.css +23 -0
  28. data/lib/wpa_cli_web/public/bower_components/house-style/modules/panel/panel.css +71 -0
  29. data/lib/wpa_cli_web/public/bower_components/house-style/modules/project-header/index.html +22 -0
  30. data/lib/wpa_cli_web/public/bower_components/house-style/modules/project-header/project-header.css +37 -0
  31. data/lib/wpa_cli_web/public/bower_components/house-style/modules/table/index.html +26 -0
  32. data/lib/wpa_cli_web/public/bower_components/house-style/modules/table/table.css +6 -0
  33. data/lib/wpa_cli_web/public/bower_components/house-style/modules/transitions/transitions.css +11 -0
  34. data/lib/wpa_cli_web/public/bower_components/house-style/package.json +21 -0
  35. data/lib/wpa_cli_web/public/bower_components/house-style/vendor/prefixfree.min.js +5 -0
  36. data/lib/wpa_cli_web/public/bower_components/normalize-css/.bower.json +21 -0
  37. data/lib/wpa_cli_web/public/bower_components/normalize-css/LICENSE.md +19 -0
  38. data/lib/wpa_cli_web/public/bower_components/normalize-css/README.md +49 -0
  39. data/lib/wpa_cli_web/public/bower_components/normalize-css/bower.json +12 -0
  40. data/lib/wpa_cli_web/public/bower_components/normalize-css/normalize.css +396 -0
  41. data/lib/wpa_cli_web/public/bower_components/qwery/.bower.json +14 -0
  42. data/lib/wpa_cli_web/public/bower_components/qwery/.gitignore +3 -0
  43. data/lib/wpa_cli_web/public/bower_components/qwery/.travis.yml +10 -0
  44. data/lib/wpa_cli_web/public/bower_components/qwery/LICENSE +7 -0
  45. data/lib/wpa_cli_web/public/bower_components/qwery/Makefile +6 -0
  46. data/lib/wpa_cli_web/public/bower_components/qwery/README.md +167 -0
  47. data/lib/wpa_cli_web/public/bower_components/qwery/config/smoosh.json +35 -0
  48. data/lib/wpa_cli_web/public/bower_components/qwery/integration/ender.js +1033 -0
  49. data/lib/wpa_cli_web/public/bower_components/qwery/integration/integration.html +26 -0
  50. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/ender.js +62 -0
  51. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/package.json +14 -0
  52. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/qwery-mobile.js +79 -0
  53. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/qwery-mobile.min.js +7 -0
  54. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/src/mobile.js +72 -0
  55. data/lib/wpa_cli_web/public/bower_components/qwery/package.json +25 -0
  56. data/lib/wpa_cli_web/public/bower_components/qwery/pseudos/package.json +17 -0
  57. data/lib/wpa_cli_web/public/bower_components/qwery/pseudos/qwery-pseudos.js +106 -0
  58. data/lib/wpa_cli_web/public/bower_components/qwery/pseudos/qwery-pseudos.min.js +7 -0
  59. data/lib/wpa_cli_web/public/bower_components/qwery/pseudos/src/pseudos.js +99 -0
  60. data/lib/wpa_cli_web/public/bower_components/qwery/qwery.js +369 -0
  61. data/lib/wpa_cli_web/public/bower_components/qwery/qwery.min.js +7 -0
  62. data/lib/wpa_cli_web/public/bower_components/qwery/src/copyright.js +6 -0
  63. data/lib/wpa_cli_web/public/bower_components/qwery/src/ender.js +62 -0
  64. data/lib/wpa_cli_web/public/bower_components/qwery/src/qwery.js +362 -0
  65. data/lib/wpa_cli_web/public/bower_components/qwery/tests/W3C-Selector-tests.html +1372 -0
  66. data/lib/wpa_cli_web/public/bower_components/qwery/tests/benchmarks.html +220 -0
  67. data/lib/wpa_cli_web/public/bower_components/qwery/tests/index.html +132 -0
  68. data/lib/wpa_cli_web/public/bower_components/qwery/tests/mobile.html +58 -0
  69. data/lib/wpa_cli_web/public/bower_components/qwery/tests/phantom.js +43 -0
  70. data/lib/wpa_cli_web/public/bower_components/qwery/tests/test-env.js +25 -0
  71. data/lib/wpa_cli_web/public/bower_components/qwery/tests/tests.js +533 -0
  72. data/lib/wpa_cli_web/public/bower_components/qwery/vendor/nw.js +1680 -0
  73. data/lib/wpa_cli_web/public/bower_components/qwery/vendor/sink.css +79 -0
  74. data/lib/wpa_cli_web/public/bower_components/qwery/vendor/sink.js +181 -0
  75. data/lib/wpa_cli_web/public/bower_components/qwery/vendor/sizzle.js +1400 -0
  76. data/lib/wpa_cli_web/public/bower_components/reqwest/.bower.json +14 -0
  77. data/lib/wpa_cli_web/public/bower_components/reqwest/.gitignore +1 -0
  78. data/lib/wpa_cli_web/public/bower_components/reqwest/.jshintrc +61 -0
  79. data/lib/wpa_cli_web/public/bower_components/reqwest/Makefile +8 -0
  80. data/lib/wpa_cli_web/public/bower_components/reqwest/README.md +308 -0
  81. data/lib/wpa_cli_web/public/bower_components/reqwest/build.json +74 -0
  82. data/lib/wpa_cli_web/public/bower_components/reqwest/make/tests.js +89 -0
  83. data/lib/wpa_cli_web/public/bower_components/reqwest/package.json +27 -0
  84. data/lib/wpa_cli_web/public/bower_components/reqwest/reqwest.js +565 -0
  85. data/lib/wpa_cli_web/public/bower_components/reqwest/reqwest.min.js +7 -0
  86. data/lib/wpa_cli_web/public/bower_components/reqwest/src/copyright.js +6 -0
  87. data/lib/wpa_cli_web/public/bower_components/reqwest/src/ender.js +26 -0
  88. data/lib/wpa_cli_web/public/bower_components/reqwest/src/reqwest.js +559 -0
  89. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/ender.js +117 -0
  90. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/badfixtures.xml +1 -0
  91. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures.html +1 -0
  92. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures.js +1 -0
  93. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures.json +1 -0
  94. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures.xml +1 -0
  95. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp.jsonp +1 -0
  96. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp2.jsonp +1 -0
  97. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp3.jsonp +1 -0
  98. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp_multi.jsonp +1 -0
  99. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp_multi_b.jsonp +1 -0
  100. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp_multi_c.jsonp +1 -0
  101. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_with_prefix.json +1 -0
  102. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/invalidJSON.json +5 -0
  103. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/tests.html +105 -0
  104. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/tests.js +1723 -0
  105. data/lib/wpa_cli_web/views/access_points.erb +5 -0
  106. data/lib/wpa_cli_web/views/access_points_list.erb +19 -0
  107. data/lib/wpa_cli_web/views/layout.erb +141 -0
  108. data/lib/wpa_cli_web/views/networks_edit.erb +15 -0
  109. data/lib/wpa_cli_web/views/restart.erb +7 -0
  110. data/lib/wpa_cli_web/views/restarting.erb +14 -0
  111. data/wpa_cli_web.gemspec +1 -1
  112. metadata +111 -2
@@ -0,0 +1,220 @@
1
+ <!DOCTYPE HTML>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
+ <title>Qwery Benchmarks</title>
6
+ <style type="text/css">
7
+ body {
8
+ width: 700px;
9
+ margin: 0 auto;
10
+ font: 300 16px 'helvetica neue', helvetica, arial;
11
+ text-shadow: 0 2px 2px #CCC;
12
+ }
13
+ ul,li {
14
+ list-style: none;
15
+ margin: 0;
16
+ padding: 0;
17
+ }
18
+ li {
19
+ font-size: 16px;
20
+ }
21
+ h1, h2 {
22
+ margin: 0;
23
+ font-weight: normal;
24
+ font-size: 30px;
25
+ }
26
+ h2 {
27
+ font-size: 20px;
28
+ }
29
+ .result {
30
+ background-color: lightGreen;
31
+ margin-top: 15px;
32
+ padding: 10px;
33
+ border-radius: 10px;
34
+ box-shadow: 0 0 5px #ccc;
35
+ }
36
+ .result div {
37
+ padding: 7px;
38
+ border-radius: 5px;
39
+ background-color: #BDFCC9;
40
+ }
41
+ .win {
42
+ color: rgb(0, 125, 0);
43
+ font-weight: bold;
44
+ }
45
+ </style>
46
+ <script src="../vendor/nw.js"></script>
47
+ <script src="../vendor/sizzle.js"></script>
48
+ <script src="../src/qwery.js"></script>
49
+ <script type="text/javascript">
50
+ var qwerynew = qwery
51
+ </script>
52
+ <script src="../qwery.js"></script>
53
+ <script type="text/javascript">
54
+ var qweryold = qwery
55
+ </script>
56
+ </head>
57
+ <body>
58
+ <h1>Selector Benchmarks</h1>
59
+ <div id="results"></div>
60
+ <div foo="bar"></div>
61
+ <div class="a"></div>
62
+ <div id="boosh">
63
+ <div class="a b">
64
+ <div class="d e" test="fg" id="booshTest">
65
+ <div class="a b"></div>
66
+ </div>
67
+ <em test="f g"></em>
68
+ <span class="h i a"></span>
69
+ </div>
70
+ </div>
71
+ <div id="attr-test1" -data-attr></div>
72
+ <div id="attr-test2" -data-attr></div>
73
+ <div id="attr-test3" class="found you" -data-attr title="whatup duders">
74
+ <span></span>
75
+ <em></em>
76
+ </div>
77
+ <script type="text/javascript">
78
+ var tests = [
79
+
80
+ { name: 'Mixed bag', tests: [
81
+ 'div .a'
82
+ , 'div'
83
+ , 'div#attr-test3.found.you[title="whatup duders"]'
84
+ , '#boosh'
85
+ , '.a'
86
+ , 'div.a'
87
+ , '#boosh .a'
88
+ ]}
89
+
90
+ , { name: 'Simple tags and classes', tests: [
91
+ 'div .a'
92
+ , 'div'
93
+ , '.a'
94
+ , 'div.a'
95
+ ]}
96
+
97
+ , { name: 'Simple IDs', tests: [
98
+ '#boosh'
99
+ , '#boosh .a'
100
+ , 'div#boosh'
101
+ , 'div#boosh .h'
102
+ ]}
103
+
104
+ , { name: 'Attributes', tests: [
105
+ 'div#attr-test3.found.you[title="whatup duders"]'
106
+ , '[test]'
107
+ , 'div[class="d e"]'
108
+ , 'div[title="whatup duders"] span'
109
+ ]}
110
+
111
+ , { name: 'Groups', tests: [
112
+ 'div .a, div, #boosh, .a, div.a, #boosh a'
113
+ , '[test], div[class="d e"], div[title="whatup duders"] span'
114
+ , '#boosh .h, .a>.e>.b,#booshTest>.b'
115
+ ]}
116
+
117
+ , { name: 'Relationships', tests: [
118
+ '.b > .e .a'
119
+ , 'div > .a > .e ~ span'
120
+ ]}
121
+
122
+ ]
123
+
124
+
125
+ var libs = [
126
+ { fn: Sizzle, id: 'Sizzle' }
127
+ , { fn: NW.Dom.select, id: 'NW' }
128
+ , { fn: qwerynew, id: 'Qwery (new)' }
129
+ , { fn: qweryold, id: 'Qwery (old)' }
130
+ ]
131
+
132
+ var libidx = 0, testidx = 0, iterations
133
+
134
+ function calibrate() {
135
+ var start = +new Date
136
+ for (var i = 0; i < libs.length; i++) {
137
+ var lstart = +new Date
138
+ for (var j = 0; j < 50; j++) {
139
+ for (var k = 0; k < tests[testidx].tests.length; k++) {
140
+ libs[i].fn(tests[testidx].tests[k]);
141
+ }
142
+ }
143
+ libs[i].times[testidx] = +new Date - lstart
144
+ }
145
+ iterations = Math.round(1 / (+new Date - start) * 50000)
146
+ iterations = Math.min(10000, Math.max(10, iterations))
147
+ }
148
+
149
+ function setup() {
150
+ var r = document.createElement('div'), html
151
+ r.setAttribute('id', 'result_' + testidx)
152
+ r.className = 'result'
153
+ html = '<div><h2>Benchmark: <i>' + tests[testidx].name + '</i> (' + iterations + ' iterations)</h2><ul>'
154
+ for (var i = 0; i < libs.length; i++) {
155
+ html += '<li>' + libs[i].id + ': <span id="result_' + testidx + '_' + i + '"></span></li>'
156
+ }
157
+ html += '</ul></div>'
158
+ r.innerHTML = html
159
+ document.getElementById('results').appendChild(r)
160
+ }
161
+
162
+ function upd(t, l, txt) {
163
+ document.getElementById('result_' + t + '_' + l).innerHTML = txt
164
+ }
165
+
166
+ function win(t, l) {
167
+ var el = document.getElementById('result_' + t + '_' + l).parentNode
168
+ el.className = 'win'
169
+ el.innerHTML = '&raquo; ' + el.innerHTML + ' &laquo;'
170
+ }
171
+
172
+ function markWinner() {
173
+ var j, winner = -1
174
+ for (j = 0; j < libs.length; j++) {
175
+ if (winner === -1 || libs[j].times[testidx] < libs[winner].times[testidx])
176
+ winner = j
177
+ }
178
+ win(testidx, winner)
179
+ }
180
+
181
+ function runner() {
182
+ var i = 0, j, start = +new Date
183
+
184
+ if (!testidx && !libidx) {
185
+ for (j = 0; j < libs.length; j++) libs[j].times = []
186
+ }
187
+ if (libidx === 0) {
188
+ calibrate()
189
+ setup()
190
+ }
191
+
192
+ while (i++ < iterations) {
193
+ for (j = 0; j < tests[testidx].tests.length; j++) {
194
+ var r = libs[libidx].fn(tests[testidx].tests[j])
195
+ if (!r || r.length == 0) {
196
+ alert('something went wrong with ' + libs[libidx].id + ' on test ' + tests[testidx].tests[j])
197
+ i = iterations
198
+ break
199
+ }
200
+ }
201
+ }
202
+
203
+ libs[libidx].times[testidx] += +new Date - start
204
+ upd(testidx, libidx, libs[libidx].times[testidx] + ' ms')
205
+
206
+ if (!libs[++libidx]) {
207
+ markWinner()
208
+ libidx = 0
209
+ testidx++
210
+ }
211
+
212
+ if (tests[testidx])
213
+ setTimeout(runner, 0)
214
+ }
215
+
216
+ runner()
217
+
218
+ </script>
219
+ </body>
220
+ </html>
@@ -0,0 +1,132 @@
1
+ <!DOCTYPE HTML>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
+ <title>Qwery tests</title>
6
+ <style type="text/css">
7
+ #fixtures {
8
+ position: absolute;
9
+ top: -9999px;
10
+ }
11
+ </style>
12
+ <link rel="stylesheet" href="../node_modules/sink-test/src/sink.css" type="text/css">
13
+ <script src="../node_modules/sink-test/src/sink.js"></script>
14
+ <script src="../src/qwery.js"></script>
15
+ <script src="../pseudos/qwery-pseudos.js"></script>
16
+ <script type="text/javascript">
17
+ var Q = qwery
18
+ </script>
19
+ </head>
20
+ <body>
21
+ <h1>Qwery Tests</h1>
22
+ <div id="fixtures">
23
+ <ol id="list">
24
+ <li>hello</li>
25
+ <li>world</li>
26
+ <ol>
27
+ <li>world</li>
28
+ <li id="attr-child-boosh" attr="boosh">hello</li>
29
+ </ol>
30
+ <li>humans</li>
31
+ </ol>
32
+ <div id="spaced-tokens">
33
+ <p><em><a href="#"></a></em></p>
34
+ <p></p>
35
+ </div>
36
+ <div id="pseudos">
37
+ <div class="odd pseudos pseudo-1"></div>
38
+ <div class="even pseudos pseudo-2"></div>
39
+ <div class="odd"></div>
40
+ <div class="even"></div>
41
+ <a class="odd"></a>
42
+ <div class="even"></div>
43
+ <div class="odd"></div>
44
+ </div>
45
+ <div foo="bar"></div>
46
+ <div class="a"></div>
47
+ <div class="class-with-dashes"></div>
48
+ <div id="boosh">
49
+ <!-- comment -->
50
+ <!-- comment -->
51
+ <div class="a b">
52
+ <div class="d e" test="fg" id="booshTest"></div>
53
+ <!-- comment -->
54
+ <em nopass="copyrighters" rel="copyright booshrs" test="f g"></em>
55
+ <span class="h i a"></span>
56
+ </div>
57
+ <!-- comment -->
58
+ </div>
59
+ <div id="lonelyBoosh"></div>
60
+ <div id="attr-test1" -data-attr></div>
61
+ <div id="attr-test2" -data-attr></div>
62
+ <div id="attr-test3" class="found you" -data-attr title="whatup duders"></div>
63
+ <div id="attributes">
64
+ <div test="one" unique-test="baz" id="attr-test-1"></div>
65
+ <div test="two-foo" id="attr-test-2"></div>
66
+ <div test=" three " id="attr-test-3"></div>
67
+ <a href="#aname" id="attr-test-4">aname</a>
68
+ </div>
69
+ <div class="idless">
70
+ <div class="tokens" title="one" id="token-one"></div>
71
+ <div class="tokens" title="one two" id="token-two"></div>
72
+ <div class="tokens" title="one two three #%" id="token-three">
73
+ <a href="foo" id="token-four">
74
+ <div id="token-five"></div>
75
+ </a>
76
+ </div>
77
+ </div>
78
+ <div id="order-matters" class="order-matters">
79
+ <p class="order-matters"></p>
80
+ <a class="order-matters">
81
+ <em class="order-matters"></em><b class="order-matters"></b>
82
+ </a>
83
+ </div>
84
+ <div id="direct-descend" class="oogabooga">
85
+ <div></div>
86
+ <div class="direct-descend">
87
+ <span></span>
88
+ <div class="direct-descend">
89
+ <div class="lvl2" id="toodeep"><span></span></div>
90
+ </div>
91
+ <div class="direct-descend"><span></span></div>
92
+ <div class="lvl2" id="l2">
93
+ <span></span>
94
+ <div class="direct-descend"><span></span></div>
95
+ </div>
96
+ <div class="lvl2" id="l3"></div>
97
+ </div>
98
+ <div class="ignoreme"></div>
99
+ <div class="direct-descend">
100
+ <div class="direct-descend"></div>
101
+ <div class="lvl2" id="l4"></div>
102
+ </div>
103
+ <div></div>
104
+ </div>
105
+ <div id="sibling-selector"></div>
106
+ <div class="sibling-selector" id="sib1">
107
+ <div class="sibling-selector"></div>
108
+ <div class="sibling-selector"></div>
109
+ </div>
110
+ <div class="sibling-selector" id="sib2">
111
+ <div class="sibling-selector">
112
+ <div class="sibling-selector"></div>
113
+ </div>
114
+ </div>
115
+ <div class="parent">
116
+ <h1 class="sibling oldest"></h1>
117
+ <h2 class="sibling older"></h2>
118
+ <h3 class="sibling middle"></h3>
119
+ <h4 class="sibling younger"></h4>
120
+ <h5 class="sibling youngest"></h5>
121
+ </div>
122
+ <form>
123
+ <button></button>
124
+ <input type="text">
125
+ <input type="hidden">
126
+ </form>
127
+ </div>
128
+ <ol id="tests"></ol>
129
+ <iframe id="frame" style="width: 0; height: 0; margin-left: -1000px;"></iframe>
130
+ <script src="tests.js"></script>
131
+ </body>
132
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE HTML>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
+ <title>Qwery tests</title>
6
+ <link rel="stylesheet" href="../build/sink/src/sink.css" type="text/css">
7
+ <script src="../build/sink/src/sink.js"></script>
8
+ <script type="text/javascript">
9
+ // test for noConflict()
10
+ var qwery = function () {
11
+ return 'success';
12
+ };
13
+ </script>
14
+ <script src="../mobile/qwery-mobile.js"></script>
15
+ <script type="text/javascript">
16
+ var Q = qwery.noConflict();
17
+ </script>
18
+ </head>
19
+ <body>
20
+ <h1>Qwery Tests</h1>
21
+ <div foo="bar"></div>
22
+ <div class="a"></div>
23
+ <div class="class-with-dashes"></div>
24
+ <div id="boosh">
25
+ <div class="a b">
26
+ <div class="d e" test="fg" id="booshTest"></div>
27
+ <em nopass="copyrighters" rel="copyright booshrs" test="f g"></em>
28
+ <span class="h i a"></span>
29
+ </div>
30
+ </div>
31
+ <div id="attr-test1" -data-attr></div>
32
+ <div id="attr-test2" -data-attr></div>
33
+ <div id="attr-test3" class="found you" -data-attr title="whatup duders"></div>
34
+ <div id="attributes">
35
+ <div test="one" unique-test="baz" id="attr-test-1"></div>
36
+ <div test="two-foo" id="attr-test-2"></div>
37
+ <div test=" three " id="attr-test-3"></div>
38
+ </div>
39
+ <div>
40
+ <div class="tokens" title="one" id="token-one"></div>
41
+ <div class="tokens" title="one two" id="token-two"></div>
42
+ <div class="tokens" title="one two three #%" id="token-three">
43
+ <a href="foo" id="token-four">
44
+ <div id="token-five"></div>
45
+ </a>
46
+ </div>
47
+ </div>
48
+ <div id="order-matters">
49
+ <p class="order-matters"></p>
50
+ <a class="order-matters">
51
+ <em class="order-matters"></em><b class="order-matters"></b>
52
+ </a>
53
+ </div>
54
+
55
+ <ol id="tests"></ol>
56
+ <script src="tests.js"></script>
57
+ </body>
58
+ </html>
@@ -0,0 +1,43 @@
1
+ var page = new WebPage()
2
+ , url = "http://localhost:3000/tests/index.html"
3
+
4
+ var fs = require("fs");
5
+
6
+
7
+ function waitFor(testFx, onReady, timeOutMillis) {
8
+ var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 10000
9
+ , start = new Date().getTime()
10
+ , condition = false
11
+ , interval = setInterval(function() {
12
+ var diff = new Date().getTime() - start
13
+ if ( (diff < maxtimeOutMillis) && !condition ) {
14
+ condition = testFx()
15
+ } else {
16
+ if (!condition) {
17
+ console.log("'waitFor()' timeout")
18
+ phantom.exit(1)
19
+ } else {
20
+ console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms");
21
+ onReady()
22
+ clearInterval(interval)
23
+ }
24
+ }
25
+ }, 250)
26
+ }
27
+
28
+
29
+ page.open(url, function (status) {
30
+ waitFor(function() {
31
+ var result = page.evaluate(function () {
32
+ return document.querySelectorAll('.sink-pass').length
33
+ })
34
+ var result2 = page.evaluate(function () {
35
+ return document.querySelectorAll('.pass').length
36
+ })
37
+ return !!result
38
+ }
39
+ , function() {
40
+ console.log("qwery tests have passed")
41
+ phantom.exit(0)
42
+ })
43
+ })