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
37 @RunWith(BrowserRunner.class)
38 public class Prototype150rc1Test extends PrototypeTestBase {
39
40
41
42
43 @BeforeClass
44 public static void startSesrver() throws Exception {
45 SERVER_ = WebServerTestCase.createWebServer("src/test/resources/libraries/prototype/1.5.0-rc1/", null);
46 }
47
48
49
50
51 @Override
52 protected String getVersion() {
53 return "1.5.0-rc1";
54 }
55
56
57
58
59 @Override
60 protected String getBaseUrl() {
61 return URL_FIRST + "test/unit/";
62 }
63
64 @Override
65 protected boolean testFinished(final WebDriver driver) {
66 final List<WebElement> status = driver.findElements(By.cssSelector("div#logsummary"));
67 for (final WebElement webElement : status) {
68 if (!webElement.getText().contains("errors")) {
69 return false;
70 }
71 }
72 return true;
73 }
74
75
76
77
78 @Test
79 public void ajax() throws Exception {
80 test("ajax.html");
81 }
82
83
84
85
86 @Test
87 public void array() throws Exception {
88 test("array.html");
89 }
90
91
92
93
94 @Test
95 public void base() throws Exception {
96 test("base.html");
97 }
98
99
100
101
102 @Test
103 public void dom() throws Exception {
104 test("dom.html");
105 }
106
107
108
109
110 @Test
111 public void elementMixins() throws Exception {
112 test("element_mixins.html");
113 }
114
115
116
117
118 @Test
119 public void enumerable() throws Exception {
120 test("enumerable.html");
121 }
122
123
124
125
126 @Test
127 public void form() throws Exception {
128 test("form.html");
129 }
130
131
132
133
134 @Test
135 public void hash() throws Exception {
136 test("hash.html");
137 }
138
139
140
141
142 @Test
143 public void position() throws Exception {
144 test("position.html");
145 }
146
147
148
149
150 @Test
151 public void range() throws Exception {
152 test("range.html");
153 }
154
155
156
157
158 @Test
159 public void selector() throws Exception {
160 test("selector.html");
161 }
162
163
164
165
166 @Test
167 public void string() throws Exception {
168 test("string.html");
169 }
170 }