[Webkit-unassigned] [Bug 132230] New: LayoutTests/editing/execCommand/12244.html passes, but is actually failing
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Apr 27 08:15:16 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=132230
Summary: LayoutTests/editing/execCommand/12244.html passes, but
is actually failing
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ddkilzer at webkit.org
CC: ap at webkit.org, justin.garcia at apple.com
LayoutTests/editing/execCommand/12244.html was added by Bug 12244 in r20071.
However, it calls setTimeout() without calling waitUntilDone()/notifyDone(), so it doesn't actually test window.find() because the test ends before the runTest() method is called.
Adding waitUntilDone()/notifyDone():
diff --git a/LayoutTests/editing/execCommand/12244.html b/LayoutTests/editing/execCommand/12244.html
index 73660c3..af4800e 100644
--- a/LayoutTests/editing/execCommand/12244.html
+++ b/LayoutTests/editing/execCommand/12244.html
@@ -1,3 +1,5 @@
+<html>
+<body>
This is a test for window.find().
<br><br>
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and ded
@@ -19,12 +21,18 @@ function assert(expected, actual, error)
}
function runTest() {
- assert(window.find("now we are"), true, "'now we are' wasn't found");
- assert(window.find(), true, "'now we are' wasn't found");
+ assert(window.find("now we are", false), true, "'now we are' wasn't found");
+ assert(window.find(), true, "'now we are' wasn't found");
+ if (window.testRunner) {
+ window.testRunner.notifyDone();
+ }
}
if (window.testRunner) {
window.testRunner.dumpEditingCallbacks();
window.testRunner.dumpAsText();
+ window.testRunner.waitUntilDone();
}
window.setTimeout(runTest, 100);
</script>
+</body>
+</html>
Causes the test to fail:
--- /tmp/layout-test-results-X/editing/execCommand/12244-expected.txt
+++ /tmp/layout-test-results-X/editing/execCommand/12244-actual.txt
@@ -1,6 +1,7 @@
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
This is a test for window.find().
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.
-
+Error: 'now we are' wasn't found
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list