Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/5354455-1.html

Issue 1455413002: Make some editing layout test files to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-11-19T12:41:19 Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/5354455-1-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/selection/5354455-1.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/5354455-1.html b/third_party/WebKit/LayoutTests/editing/selection/5354455-1.html
index 6361c2e2200f788ccf0b44a08e77539aca87bb35..4eb3defd20791618af09fcfb02965fd08f4dd2b7 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/5354455-1.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/5354455-1.html
@@ -1,18 +1,18 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<p>This tests whether right clicking on a paragraph break in editable content selects it. The break should be selected on OS X, but not on Windows or Unix. To run it manually, right click on the paragraph break after the first paragraph below.</p>
<div id="div" contenteditable="true">
<div><span id="text">The following paragraph break should be selected on OS X.</span></div>
<br>
</div>
-<p>Mac: <span id="resultmac">RUNNING</span></p>
-<p>Win: <span id="resultwin">RUNNING</span></p>
-<p>Unix: <span id="resultunix">RUNNING</span></p>
-<p>Android: <span id="resultandroid">RUNNING</span></p>
-
+<div id="log"></div>
<script>
-function test(platform, result) {
+function testIt(platform, expectedValue) {
window.getSelection().removeAllRanges();
+ internals.settings.setAsynchronousSpellCheckingEnabled(true);
internals.settings.setEditingBehavior(platform);
-
+
paragraph = document.getElementById("text");
x = paragraph.offsetParent.offsetLeft + paragraph.offsetLeft + paragraph.offsetWidth + 10;
y = paragraph.offsetParent.offsetTop + paragraph.offsetTop + paragraph.offsetHeight / 2;
@@ -24,17 +24,13 @@ function test(platform, result) {
eventSender.contextClick();
// esc key to kill the context menu.
eventSender.keyDown("escape", null);
-
- document.getElementById(result).innerHTML = window.getSelection().type;
+ assert_equals(window.getSelection().type, expectedValue);
}
if (window.eventSender && window.testRunner && window.internals) {
- testRunner.dumpAsText();
-
- test('mac', 'resultmac');
- test('win', 'resultwin');
- test('unix', 'resultunix');
- test('android', 'resultandroid');
+ test(testIt.bind(this, 'mac', 'Range'), 'mac');
+ test(testIt.bind(this, 'win', 'Caret'), 'win');
+ test(testIt.bind(this, 'unix', 'Caret'), 'unix');
+ test(testIt.bind(this, 'android', 'Caret'), 'android');
}
</script>
-
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/5354455-1-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698