Title: [98340] trunk/Tools
- Revision
- 98340
- Author
- [email protected]
- Date
- 2011-10-25 06:49:33 -0700 (Tue, 25 Oct 2011)
Log Message
WIN: editing tests fail under NRWT because editing delegate callbacks aren't stripped
https://bugs.webkit.org/show_bug.cgi?id=64471
Reviewed by Adam Roben.
Speculative fix.
* Scripts/webkitpy/layout_tests/port/win.py:
* Scripts/webkitpy/layout_tests/port/win_unittest.py:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (98339 => 98340)
--- trunk/Tools/ChangeLog 2011-10-25 13:49:24 UTC (rev 98339)
+++ trunk/Tools/ChangeLog 2011-10-25 13:49:33 UTC (rev 98340)
@@ -1,3 +1,15 @@
+2011-10-25 Eric Seidel <[email protected]>
+
+ WIN: editing tests fail under NRWT because editing delegate callbacks aren't stripped
+ https://bugs.webkit.org/show_bug.cgi?id=64471
+
+ Reviewed by Adam Roben.
+
+ Speculative fix.
+
+ * Scripts/webkitpy/layout_tests/port/win.py:
+ * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+
2011-10-24 Mikhail Naganov <[email protected]>
Fix bug summary when rolling Chromium DEPS to LKGR.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py (98339 => 98340)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2011-10-25 13:49:24 UTC (rev 98339)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2011-10-25 13:49:33 UTC (rev 98340)
@@ -72,6 +72,20 @@
ApplePort.__init__(self, **kwargs)
self._operating_system = 'win'
+ def compare_text(self, expected_text, actual_text):
+ # Sanity was restored in WK2, so we don't need this hack there.
+ if self.get_option('webkit_test_runner'):
+ return ApplePort.compare_text(self, expected_text, actual_text)
+
+ # This is a hack (which dates back to ORWT).
+ # Windows does not have an EDITING DELEGATE, so we strip any EDITING DELEGATE
+ # messages to make more of the tests pass.
+ # It's possible more of the ports might want this and this could move down into WebKitPort.
+ delegate_regexp = re.compile("^EDITING DELEGATE: .*?\n", re.MULTILINE)
+ expected_text = delegate_regexp.sub("", expected_text)
+ actual_text = delegate_regexp.sub("", actual_text)
+ return expected_text != actual_text
+
def baseline_search_path(self):
try:
fallback_index = self.VERSION_FALLBACK_ORDER.index(self._port_name_with_version())
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py (98339 => 98340)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py 2011-10-25 13:49:24 UTC (rev 98339)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py 2011-10-25 13:49:33 UTC (rev 98340)
@@ -94,3 +94,14 @@
self._assert_version('win-xp', 'xp')
self._assert_version('win-vista', 'vista')
self._assert_version('win-7sp0', '7sp0')
+
+ def test_compare_text(self):
+ expected = "EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification\nfoo\nEDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification\n"
+ port = self.make_port()
+ self.assertFalse(port.compare_text(expected, "foo\n"))
+ self.assertTrue(port.compare_text(expected, "foo"))
+ self.assertTrue(port.compare_text(expected, "bar"))
+
+ # This hack doesn't exist in WK2.
+ port._options = MockOptions(webkit_test_runner=True)
+ self.assertTrue(port.compare_text(expected, "foo\n"))
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes