[HtmlUnit] SF.net SVN: htmlunit:[5156] trunk/htmlunit/src/test/java/com/ gargoylesoftware/htmlunit/html/HtmlTable2Test.java

View: New views
1 Messages — Rating Filter:   Alert me  

[HtmlUnit] SF.net SVN: htmlunit:[5156] trunk/htmlunit/src/test/java/com/ gargoylesoftware/htmlunit/html/HtmlTable2Test.java

by asashour :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Revision: 5156
          http://htmlunit.svn.sourceforge.net/htmlunit/?rev=5156&view=rev
Author:   asashour
Date:     2009-11-07 08:51:03 +0000 (Sat, 07 Nov 2009)

Log Message:
-----------
Add HtmlTable2Test.two_theads
Issue 2884462

Added Paths:
-----------
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlTable2Test.java

Added: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlTable2Test.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlTable2Test.java                        (rev 0)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlTable2Test.java 2009-11-07 08:51:03 UTC (rev 5156)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2002-2009 Gargoyle Software Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gargoylesoftware.htmlunit.html;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.gargoylesoftware.htmlunit.BrowserRunner;
+import com.gargoylesoftware.htmlunit.WebDriverTestCase;
+import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts;
+import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented;
+
+/**
+ * Tests for {@link HtmlTable}.
+ *
+ * @version $Revision$
+ * @author Ahmed Ashour
+ */
+@RunWith(BrowserRunner.class)
+public class HtmlTable2Test extends WebDriverTestCase {
+
+    /**
+     * Table can have multiple children of <thead>, <tbody> and <tfoot>.
+     * Also, IE adds TR between THEAD and TD if missing.
+     * @throws Exception if the test fails
+     */
+    @Test
+    @Alerts(IE = { "TBODY->TR->TD->Two", "THEAD->TR->TD->One", "THEAD->TR->TD->Three" },
+            FF = { "TBODY->TR->TD->Two", "THEAD->TD->One", "THEAD->TR->TD->Three" })
+    @NotYetImplemented
+    public void two_theads() throws Exception {
+        final String html = "<html><head><script>\n"
+            + "  function test() {\n"
+            + "    for (var child = myTable1.firstChild; child != null; child = child.nextSibling) {\n"
+            + "      alert(debug(child));\n"
+            + "    }\n"
+            + "  }\n"
+            + "  function debug(node) {\n"
+            + "    return node.nodeValue != null ? node.nodeValue : (node.nodeName + '->' + debug(node.firstChild));\n"
+            + "  }\n"
+            + "</script></head>\n"
+            + "<body onload='test()'>\n"
+            + "<table id='myTable1'>"
+            + "<td>Two</td>"
+            + "<thead><td>One</td></thead>"
+            + "<thead><tr><td>Three</td></tr></thead>"
+            + "</table>\n"
+            + "</body></html>";
+
+        loadPageWithAlerts2(html);
+    }
+}


Property changes on: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlTable2Test.java
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@...
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop