Title: [98685] trunk/LayoutTests
Revision
98685
Author
[email protected]
Date
2011-10-27 21:24:35 -0700 (Thu, 27 Oct 2011)

Log Message

Fix click-before-and-after-table.html for Chromium
https://bugs.webkit.org/show_bug.cgi?id=70869

Reviewed by Tony Chang.

Fixed the test by wrapping tests in a function to avoid shadowing "top" variable.

* editing/selection/click-before-and-after-table.html:
* platform/chromium/test_expectations.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (98684 => 98685)


--- trunk/LayoutTests/ChangeLog	2011-10-28 03:50:15 UTC (rev 98684)
+++ trunk/LayoutTests/ChangeLog	2011-10-28 04:24:35 UTC (rev 98685)
@@ -1,3 +1,15 @@
+2011-10-27  Ryosuke Niwa  <[email protected]>
+
+        Fix click-before-and-after-table.html for Chromium
+        https://bugs.webkit.org/show_bug.cgi?id=70869
+
+        Reviewed by Tony Chang.
+
+        Fixed the test by wrapping tests in a function to avoid shadowing "top" variable.
+
+        * editing/selection/click-before-and-after-table.html:
+        * platform/chromium/test_expectations.txt:
+
 2011-10-27  John Gregg  <[email protected]>
 
         Update chromium test expectations.

Modified: trunk/LayoutTests/editing/selection/click-before-and-after-table.html (98684 => 98685)


--- trunk/LayoutTests/editing/selection/click-before-and-after-table.html	2011-10-28 03:50:15 UTC (rev 98684)
+++ trunk/LayoutTests/editing/selection/click-before-and-after-table.html	2011-10-28 04:24:35 UTC (rev 98685)
@@ -1,7 +1,3 @@
-<script>
-if (window.layoutTestController)
-     layoutTestController.dumpEditingCallbacks();
-</script>
 <style>
 td {
     border: 1px solid #aaa;
@@ -11,6 +7,9 @@
 <body style="border: 1px solid red;" contenteditable="true"><table id="table" style="margin: 25px; border:10px solid #ccc; padding: 10px;"><tr><td>cell one</td><td>cell two</td></tr></table>
 <ul id="console"></ul>
 <script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+
 function log(message) {
     var console = document.getElementById("console");
     var li = document.createElement("li");
@@ -19,10 +18,8 @@
     console.appendChild(li);
     li.appendChild(text);
 }
-if (!window.layoutTestController) {
-    log("This test uses the eventSender to do mouse clicks.  To run it manually, click after the table, the caret should appear there (and not inside the table).  Then click inside the table.  The caret should appear inside it.");
-    document.body.addEventListener("click", function() { var s = window.getSelection(); log("click @ " + event.clientX + ", " + event.clientY + " caret at: " + s.anchorNode + ", " + s.anchorOffset); }, true);
-} else {
+
+function runAutomatedTest() {
     window.layoutTestController.dumpAsText();
     var s, x, y, e, top, bottom, left, right;
     table = document.getElementById("table");
@@ -72,5 +69,13 @@
     if (s.anchorNode == document.body)
         log("Failure: Clicking @ " + x + ", " + y + " inside the table put the caret before or after it.  Instead: " + s.anchorNode + ", " + s.anchorOffset);
 }
+
+if (window.layoutTestController)
+    runAutomatedTest();
+else {
+    log("This test uses the eventSender to do mouse clicks.  To run it manually, click after the table, the caret should appear there (and not inside the table).  Then click inside the table.  The caret should appear inside it.");
+    document.body.addEventListener("click", function() { var s = window.getSelection(); log("click @ " + event.clientX + ", " + event.clientY + " caret at: " + s.anchorNode + ", " + s.anchorOffset); }, true);
+}
+
 </script>
 </body>

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (98684 => 98685)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-10-28 03:50:15 UTC (rev 98684)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-10-28 04:24:35 UTC (rev 98685)
@@ -479,11 +479,6 @@
 // supporting that option.
 WONTFIX SKIP : fast/parser/pre-html5-parser-quirks.html = FAIL
 
-// These tests have been rewritten, with the original being ignored,
-// because they rely on being able to shadow the 'top' variable on the
-// global object.  For security we disallow shadowing of top.
-WONTFIX SKIP : editing/selection/click-before-and-after-table.html = FAIL
-
 // We're taking a different approach on this test than Webkit does, related to
 // whether we create a window via a plugin when target is _blank.
 WONTFIX SKIP : plugins/get-url-with-blank-target.html = FAIL
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to