1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.htmlunit.libraries;
16
17 import java.util.List;
18
19 import org.htmlunit.WebServerTestCase;
20 import org.htmlunit.junit.BrowserRunner;
21 import org.junit.BeforeClass;
22 import org.junit.Test;
23 import org.junit.runner.RunWith;
24 import org.openqa.selenium.By;
25 import org.openqa.selenium.WebDriver;
26 import org.openqa.selenium.WebElement;
27
28
29
30
31
32
33
34
35
36 @RunWith(BrowserRunner.class)
37 public class Prototype160Test extends PrototypeTestBase {
38
39
40
41
42 @BeforeClass
43 public static void aaa_startSesrver() throws Exception {
44 SERVER_ = WebServerTestCase.createWebServer("src/test/resources/libraries/prototype/1.6.0/", null);
45 }
46
47
48
49
50 @Override
51 protected String getVersion() {
52 return "1.6.0";
53 }
54
55
56
57
58 @Override
59 protected String getBaseUrl() {
60 return URL_FIRST + "test/unit/";
61 }
62
63 @Override
64 protected boolean testFinished(final WebDriver driver) {
65 final List<WebElement> status = driver.findElements(By.cssSelector("div#logsummary"));
66 for (final WebElement webElement : status) {
67 if (!webElement.getText().contains("errors")) {
68 return false;
69 }
70 }
71 return true;
72 }
73
74
75
76
77 @Test
78 public void ajax() throws Exception {
79 test("ajax.html");
80 }
81
82
83
84
85 @Test
86 public void array() throws Exception {
87 test("array.html");
88 }
89
90
91
92
93 @Test
94 public void base() throws Exception {
95 test("base.html");
96 }
97
98
99
100
101
102
103
104
105
106
107
108
109 @Test
110 public void dom() throws Exception {
111 test("dom.html");
112 }
113
114
115
116
117
118
119 @Test
120 public void elementMixins() throws Exception {
121 test("element_mixins.html");
122 }
123
124
125
126
127 @Test
128 public void enumerable() throws Exception {
129 test("enumerable.html");
130 }
131
132
133
134
135 @Test
136 public void event() throws Exception {
137 test("event.html");
138 }
139
140
141
142
143 @Test
144 public void form() throws Exception {
145 test("form.html");
146 }
147
148
149
150
151 @Test
152 public void hash() throws Exception {
153 test("hash.html");
154 }
155
156
157
158
159 @Test
160 public void number() throws Exception {
161 test("number.html");
162 }
163
164
165
166
167 @Test
168 public void position() throws Exception {
169 test("position.html");
170 }
171
172
173
174
175 @Test
176 public void range() throws Exception {
177 test("range.html");
178 }
179
180
181
182
183 @Test
184 public void selector() throws Exception {
185 test("selector.html");
186 }
187
188
189
190
191 @Test
192 public void string() throws Exception {
193 test("string.html");
194 }
195
196
197
198
199
200 @Test
201 public void unitTests() throws Exception {
202 test("unit_tests.html");
203 }
204 }