Index: third_party/WebKit/LayoutTests/editing/execCommand/format-block-with-braces.html |
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/format-block-with-braces.html b/third_party/WebKit/LayoutTests/editing/execCommand/format-block-with-braces.html |
index 27d8ef1ad2c6c314e577083515cda9fc1f84972e..a29819fe43477eedf70df14a5b0f5ad2b873b71a 100644 |
--- a/third_party/WebKit/LayoutTests/editing/execCommand/format-block-with-braces.html |
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/format-block-with-braces.html |
@@ -1,27 +1,11 @@ |
-<!DOCTYPE html> |
-<html> |
-<body> |
-<script src="../../resources/dump-as-markup.js"></script> |
-<div style="display:inline" contenteditable="true" id="item1"> |
-Format Me |
-</div> |
- |
+<!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(); |
- |
-Markup.description("This test uses FormatBlock with html brackets in the tag string passed to execCommand."); |
- |
-Markup.dump("item1", "Before FormatBlock with <h1>"); |
- |
-var s = window.getSelection(); |
-var r = document.createRange(); |
-var p1 = document.getElementById("item1"); |
-s.collapse(p1, 0); |
-document.execCommand("FormatBlock", false, "<h1>"); |
- |
-Markup.dump("item1", "After FormatBlock with <h1>"); |
- |
+ test(() => assert_selection( |
+ '<div contenteditable>|Format Me</div>', |
+ 'formatBlock <h1>', |
+ '<div contenteditable><h1>|Format Me</h1></div>'), |
+ 'foramtBlcok accept tag name with html brackets'); |
</script> |
-</body> |
-</html> |