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

Unified Diff: third_party/WebKit/LayoutTests/editing/deleting/delete-3800834-fix.html

Issue 1459783003: Make layout tests in editing/deleting and editing/execCommand to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/execCommand/4924441.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/deleting/delete-3800834-fix.html
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete-3800834-fix.html b/third_party/WebKit/LayoutTests/editing/deleting/delete-3800834-fix.html
index 6584b24a4b69c62e9ce356970b7fd395421579be..c410b711c9c29ebf844ba7637de975465ee40db2 100644
--- a/third_party/WebKit/LayoutTests/editing/deleting/delete-3800834-fix.html
+++ b/third_party/WebKit/LayoutTests/editing/deleting/delete-3800834-fix.html
@@ -1,37 +1,18 @@
-<html>
-<head>
-
-<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
-
-<style>
-.editing {
- border: 2px solid red;
- padding: 12px;
- font-size: 24px;
-}
-</style>
-
-<script>
-
-function editingTest() {
- for (var i = 0; i < 8; i++)
- moveSelectionForwardByCharacterCommand();
- for (var i = 0; i < 4; i++)
- deleteCommand();
-}
-
-</script>
-
-<title>Editing Test</title>
-</head>
-<body contenteditable='true'>
-<div id="root" class="editing">
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div id="root" contenteditable='true'>
<span id="test">Foo<BR><BLOCKQUOTE>Bar</BLOCKQUOTE></span>
</div>
-
+<div id="log"></div>
<script>
-runEditingTest();
+test(function() {
+ var selection = window.getSelection();
+ selection.collapse(document.getElementById('test').firstChild, 0);
+ for (var i = 0; i < 8; i++)
+ selection.modify("move", "forward", "character");
+ for (var i = 0; i < 4; i++)
+ document.execCommand('delete');
+ assert_equals(document.getElementById('root').innerHTML, '\n<span id="test">Foo</span>');
+});
</script>
-
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/execCommand/4924441.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698