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

Unified Diff: third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html

Issue 2254453004: Convert editing/style/justify-left-crash.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-17T16:00:35 Created 4 years, 4 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/editing/style/justify-left-crash-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html
diff --git a/third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html b/third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html
index 02ae756f5a4fc06d358474c25869431c93348c9d..18054a22032dee0a84033df3d975da66dee694ef 100644
--- a/third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html
+++ b/third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html
@@ -1,20 +1,30 @@
-<!DOCTYPE html>
+<!doctype html>
<html hidden>
<head>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<style>
html, head, style {
display: block;
}
</style>
</head>
+<body>
+<div id="sample">foo</div>
<script>
- document.designMode = "on";
- document.execCommand("selectAll");
- document.execCommand("italic");
- document.execCommand("justifyLeft");
- document.documentElement.removeAttribute("hidden");
+ document.designMode = 'on';
+ document.execCommand('selectAll');
+ document.execCommand('italic');
+ document.execCommand('justifyLeft');
+ document.documentElement.removeAttribute('hidden');
+
+ test(() => {
+ var sample = document.getElementById('sample');
+ assert_equals(sample.innerHTML, '<i>foo</i>');
+ // TODO(yosin): Once we do lazy visible position canonicalization,
+ // we should have a caret.
+ assert_equals(getSelection().rangeCount, 0);
+ }, 'This is a crash test.');
</script>
-<body>
-This test passes if it does not crash.
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/style/justify-left-crash-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698