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

Unified Diff: third_party/WebKit/LayoutTests/editing/assert_selection.html

Issue 2162063004: Make assert_selection() to support no BODY element case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-20T13:35:22 Created 4 years, 5 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/assert_selection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/assert_selection.html
diff --git a/third_party/WebKit/LayoutTests/editing/assert_selection.html b/third_party/WebKit/LayoutTests/editing/assert_selection.html
index 4af095e9cef76703f8135b42668dbcdc5f3296de..8b0c933ef0792bc11d14cb0a0f7c98f7fcfb7ae8 100644
--- a/third_party/WebKit/LayoutTests/editing/assert_selection.html
+++ b/third_party/WebKit/LayoutTests/editing/assert_selection.html
@@ -61,6 +61,18 @@ test(() => {
}, 'markers around table');
test(() => {
+ assert_selection(
+ '<div>foo</div>',
+ selection => {
+ let doc = selection.document;
+ doc.documentElement.replaceChild(
+ doc.createTextNode('baz'), doc.body);
+ },
+ '<html><head></head>baz</html>',
+ 'Serialize document element instead of document.body when it is null.');
+}, 'result with out body');
+
+test(() => {
assert_equals(checked_assert_selection('fo|o', 'noop', 'fo|o'),
'no exception');
}, 'no marker in output');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/assert_selection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698