[HtmlUnit] SVN: [13824] trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/ general/ElementDefaultStyleDisplayTest.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] SVN: [13824] trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/ general/ElementDefaultStyleDisplayTest.java

asashour-2
Revision: 13824
          http://sourceforge.net/p/htmlunit/code/13824
Author:   asashour
Date:     2017-03-19 12:21:56 +0000 (Sun, 19 Mar 2017)
Log Message:
-----------
trivial

Modified Paths:
--------------
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementDefaultStyleDisplayTest.java

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementDefaultStyleDisplayTest.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementDefaultStyleDisplayTest.java 2017-03-19 06:24:05 UTC (rev 13823)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementDefaultStyleDisplayTest.java 2017-03-19 12:21:56 UTC (rev 13824)
@@ -32,15 +32,13 @@
 @StandardsMode
 public class ElementDefaultStyleDisplayTest extends WebDriverTestCase {
 
-    private static String test(final String tagName) throws Exception {
+    private static String test(final String tagName) {
         return "<html><head><script>\n"
             + "  function test() {\n"
-            + "    try {\n"
-            + "      var e = document.createElement('" + tagName + "');\n"
-            + "      alert(window.getComputedStyle(e, null).display);\n"
-            + "      document.body.appendChild(e);\n"
-            + "      alert(window.getComputedStyle(e, null).display);\n"
-            + "    } catch (e) {alert('exception')}\n"
+            + "    var e = document.createElement('" + tagName + "');\n"
+            + "    alert(window.getComputedStyle(e, null).display);\n"
+            + "    document.body.appendChild(e);\n"
+            + "    alert(window.getComputedStyle(e, null).display);\n"
             + "  }\n"
             + "</script></head><body onload='test()'>\n"
             + "</body></html>";


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop