@@ -47,23 +47,23 @@ public class ElementClosesElementTest extends WebDriverTestCase {
4747
4848 private static int ServerRestartCount_ ;
4949
50- private static final List <String > parentZero = Arrays .asList ("area" , "base" , "basefont" , "bgsound" , "br" ,
50+ private static final List <String > PARENT_ZERO = Arrays .asList ("area" , "base" , "basefont" , "bgsound" , "br" ,
5151 "command" , "col" , "colgroup" ,
5252 "embed" , "frame" , "frameset" , "head" , "hr" , "iframe" , "image" , "img" , "input" , "keygen" ,
5353 "link" , "meta" , "noembed" , "noframes" , "noscript" , "param" , "plaintext" ,
5454 "script" , "select" , "source" , "style" ,
5555 "table" , "tbody" , "template" , "textarea" , "tfoot" , "thead" , "title" ,
5656 "tr" , "track" , "wbr" , "xmp" );
5757
58- private static final List <String > childZero = Arrays .asList ("body" , "caption" , "col" , "colgroup" ,
58+ private static final List <String > CHILD_ZERO = Arrays .asList ("body" , "caption" , "col" , "colgroup" ,
5959 "frame" , "frameset" , "head" , "html" , "tbody" , "td" , "tfoot" , "th" , "thead" , "tr" );
6060
61- private static final List <String > svgChildZero = Arrays .asList ("b" , "big" , "blockquote" , "body" , "br" ,
61+ private static final List <String > SVG_CHILD_ZERO = Arrays .asList ("b" , "big" , "blockquote" , "body" , "br" ,
6262 "center" , "code" , "dd" , "div" , "dl" , "dt" , "em" , "embed" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" , "head" ,
6363 "hr" , "i" , "img" , "li" , "listing" , "menu" , "meta" , "nobr" , "ol" , "p" , "pre" , "ruby" , "s" , "small" ,
6464 "span" , "strike" , "strong" , "sub" , "sup" , "table" , "tt" , "u" , "ul" , "var" );
6565
66- private static final String resultScript = " var e = document.getElementById('outer');\n "
66+ private static final String RESULT_SCRIPT = " var e = document.getElementById('outer');\n "
6767 + " var res = '-';\n "
6868 + " try {\n "
6969 + " res = e == null ? e : e.children.length;\n "
@@ -171,10 +171,10 @@ else if ("title".equals(parent)) {
171171 expected = getExpectedAlerts ()[0 ];
172172 }
173173 else {
174- if (childZero .contains (child )) {
174+ if (CHILD_ZERO .contains (child )) {
175175 expected = "0" ;
176176 }
177- else if (parentZero .contains (parent )) {
177+ else if (PARENT_ZERO .contains (parent )) {
178178 expected = "0" ;
179179 }
180180 else if ("html" .equals (parent )) {
@@ -183,7 +183,7 @@ else if ("html".equals(parent)) {
183183
184184 if ("svg" .equals (parent )) {
185185 expected = "1" ;
186- if (svgChildZero .contains (child )) {
186+ if (SVG_CHILD_ZERO .contains (child )) {
187187 expected = "0" ;
188188 }
189189 }
@@ -207,7 +207,7 @@ else if ("html".equals(parent)) {
207207
208208 loadPage2 (pageHtml );
209209
210- final String result = (String ) ((JavascriptExecutor ) driver ).executeScript (resultScript );
210+ final String result = (String ) ((JavascriptExecutor ) driver ).executeScript (RESULT_SCRIPT );
211211 assertEquals (expected , result );
212212 }
213213
0 commit comments