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

Unified Diff: third_party/WebKit/LayoutTests/editing/inserting/insert-div-026.html

Issue 1456333002: Make layout tests in editing/inserting to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-11-19T14:56:35 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/inserting/insert-paragraph-04.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/inserting/insert-div-026.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-026.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-026.html
index d9d69b0ed5507b78e452c5087063bfe6500500b9..398d75ce3a75463a5fff22c0c7eb6a80b4505aa3 100644
--- a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-026.html
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-026.html
@@ -1,42 +1,6 @@
-<html>
-<head>
-
-<style>
-.editing {
- border: 2px solid red;
- font-size: 24px;
-}
-.explanation {
- border: 2px solid blue;
- padding: 12px;
- font-size: 24px;
- margin-bottom: 24px;
-}
-.scenario { margin-bottom: 16px;}
-.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
-.expected-results:first-line { font-weight: bold }
-</style>
-<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
-
-<script>
-
-function editingTest() {
- extendSelectionForwardByLineCommand();
- boldCommand();
- moveSelectionForwardByCharacterCommand();
- insertParagraphCommand();
- boldCommand();
- typeCharacterCommand();
- moveSelectionBackwardByCharacterCommand();
- deleteCommand();
-}
-
-</script>
-
-<title>Editing Test</title>
-</head>
-<body>
-
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<div class="explanation">
<div class="scenario">
Tests:
@@ -52,13 +16,23 @@ Should see this content in the red box below: <b>fo</b>x
</div>
<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
-<div id="test" class="editing">
-fo
-</div>
-
+<div id="sample" class="editing">fo</div>
+<div id="log"></div>
<script>
-runEditingTest();
+test(function() {
+ var selection = window.getSelection();
+ var sample = document.getElementById('sample');
+
+ selection.collapse(sample.firstChild, 0);
+ selection.modify('extend', 'forward', 'line');
+ document.execCommand('bold');
+ selection.modify('move', 'forward', 'character');
+ document.execCommand('insertParagraph');
+ document.execCommand('bold');
+ document.execCommand('InsertText', false, 'x')
+ selection.modify('move', 'backward', 'character');
+ document.execCommand('delete');
+
+ assert_equals(sample.innerHTML, '<b>fo</b>x');
+});
</script>
-
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-04.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698