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