haikuwebkit/LayoutTests/editing/selection/block-with-positioned-lastc...

31 lines
894 B
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<body>
<div style="padding: 20px;" contenteditable>Click on the left of this line.
<div>Caret should NOT be placed in this line,</div>
<div style="position:absolute; top:0px; right:0px;"></div>
</div>
<pre><script>
Editing tests should use testRunner instead of layoutTestController https://bugs.webkit.org/show_bug.cgi?id=88955 Reviewed by Darin Adler. * editing/: * platform/blackberry/editing/text-iterator/findString-markers.html: * platform/chromium-linux/editing/selection/linux_selection_color.html: * platform/chromium-win/editing/selection/paragraph-granularity-expected.txt: * platform/chromium-win/editing/selection/triple-click-in-pre-expected.txt: * platform/chromium-win/editing/selection/word-granularity-expected.txt: * platform/chromium/editing/spelling/delete-misspelled-word.html: * platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html: * platform/gtk/editing/pasteboard/middle-button-paste.html: * platform/gtk/editing/pasteboard/script-tests/middle-click-onpaste.js: * platform/gtk/editing/selection/caret-mode-document-begin-end.html: * platform/gtk/editing/selection/paragraph-granularity-expected.txt: * platform/gtk/editing/selection/triple-click-in-pre-expected.txt: * platform/gtk/editing/selection/word-granularity-expected.txt: * platform/mac/editing/: * platform/qt/editing/selection/paragraph-granularity-expected.txt: * platform/qt/editing/selection/triple-click-in-pre-expected.txt: * platform/qt/editing/selection/word-granularity-expected.txt: * platform/win/editing/deleting/delete-start-block-expected.txt: * platform/win/editing/pasteboard/pasting-crlf-isnt-translated-to-crcrlf-win.html: * platform/win/editing/selection/shift-page-up-down.html: Canonical link: https://commits.webkit.org/106795@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-13 08:51:53 +00:00
if (window.testRunner) {
testRunner.dumpAsText();
var container = document.body.children[0];
eventSender.mouseMoveTo(container.offsetLeft + 5, container.offsetTop + 5);
eventSender.mouseDown();
eventSender.mouseUp();
if (!getSelection().isCollapsed)
document.writeln('FAIL - selection was not collapsed');
else if (getSelection().baseNode != container.firstChild)
document.writeln('FAIL - caret was not in the first line');
else if (getSelection().baseOffset)
document.writeln('FAIL - caret was not on the left edge');
else
document.writeln('PASS');
}
</script></pre>
</body>
</html>