Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
2010-09-23 Tony Chang <tony@chromium.org>
Reviewed by David Levin. [chromium] make fast/events/standalone-image-drag-to-editable.html non-flakey https://bugs.webkit.org/show_bug.cgi?id=46381 In chromium, the image that was dropped sometimes hasn't loaded when the pixel results are taken. This results in a 0x0 image and makes the test flakey. The fix is to wait for the image load event if it's not already loaded. * fast/events/resources/standalone-image-drag-to-editable-frame.html: * fast/events/standalone-image-drag-to-editable.html: * platform/chromium-linux/fast/events/standalone-image-drag-to-editable-expected.checksum: Image result with dropped image loaded. * platform/chromium-linux/fast/events/standalone-image-drag-to-editable-expected.png: * platform/chromium/test_expectations.txt: Canonical link: https://commits.webkit.org/58912@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@68213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
6 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 18 additions & 1 deletion
19
LayoutTests/fast/events/resources/standalone-image-drag-to-editable-frame.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
<html><body style='margin: 0 0 0 0;'><div style='height: 100px; border: solid 1px black;' contenteditable=true> | ||
This layout test is checks that we don't crash when a stand alone image is dragged into a content editable div. <br /> | ||
<a href='rdar://problem/5021127'>rdar://problem/5021127</a> | ||
</div></body></html> | ||
</div></body> | ||
<script> | ||
function waitForImageLoad() | ||
{ | ||
if (!window.layoutTestController) | ||
return; | ||
|
||
var img = document.body.getElementsByTagName("img")[0]; | ||
if (img.width != 0) | ||
layoutTestController.notifyDone(); | ||
else { | ||
img.addEventListener("load", function() { | ||
layoutTestController.notifyDone(); | ||
}, false); | ||
} | ||
} | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/platform/chromium-linux/fast/events/standalone-image-drag-to-editable-expected.checksum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7429c38b94fe347b650e87fa3b75d41f | ||
b0912533e2471dd0f47bb205acbc2302 |
Binary file modified
BIN
-21 Bytes
(100%)
...tform/chromium-linux/fast/events/standalone-image-drag-to-editable-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters