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

Unified Diff: third_party/WebKit/LayoutTests/editing/style/apple-style-editable-mix.html

Issue 2454613002: Convert editing/style/apple-style-editable-mix.html to utilize w3c test harness (Closed)
Patch Set: 2016-10-26T17:04:03 Created 4 years, 2 months 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/platform/linux/editing/style/apple-style-editable-mix-expected.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/style/apple-style-editable-mix.html
diff --git a/third_party/WebKit/LayoutTests/editing/style/apple-style-editable-mix.html b/third_party/WebKit/LayoutTests/editing/style/apple-style-editable-mix.html
index 4fc22b22d6b4992fbf80e1f1446257c593bbe6ed..dbd7b984e8ed7dbe375a2969405f210c15fd80b5 100644
--- a/third_party/WebKit/LayoutTests/editing/style/apple-style-editable-mix.html
+++ b/third_party/WebKit/LayoutTests/editing/style/apple-style-editable-mix.html
@@ -1,40 +1,31 @@
-<html>
- <head>
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
<script>
-if (window.testRunner)
- testRunner.dumpEditingCallbacks();
+test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '^abc',
+ '<div contenteditable="false">',
+ 'def',
+ '<div contenteditable>xyz</div>',
+ 'ghi',
+ '</div>',
+ 'def|',
+ '</div>',
+ ].join(''),
+ 'bold',
+ [
+ '<div contenteditable>',
+ '<b>^abc</b>',
+ '<div contenteditable="false">',
+ 'def',
+ '<div contenteditable><b>xyz</b></div>',
+ 'ghi',
+ '</div>',
+ '<b>def|</b>',
+ '</div>',
+ ].join('')),
+ 'Apply style to mixed editable contents');
</script>
-
- <script>
- function test()
- {
- var tbl1 = document.getElementById('tbl1');
- var tbl2 = document.getElementById('tbl2');
- var selection = window.getSelection();
- selectAllCommand();
- boldCommand();
- }
- </script>
- <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
- </head>
-<body onload="test()" contenteditable>
- <table id="tbl1" contenteditable=false>
- <tr>
- <td>This tests that a style can be applied to a selection that contains both editable and non-editable content.
- </td>
- <td>
- <span contenteditable>Editable - line 1</span>
- </td>
- </tr>
- </table>
- <table id="tbl2" contenteditable=false>
- <tr>
- <td>The test passes if the editable content is bold, and the non editable content remains unchanged.
- </td>
- <td>
- <span contenteditable>Editable - line 2</span>
- </td>
- </tr>
- </table>
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/style/apple-style-editable-mix-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698