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

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

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 | « third_party/WebKit/LayoutTests/editing/assert_selection.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/assert_selection.js
diff --git a/third_party/WebKit/LayoutTests/editing/assert_selection.js b/third_party/WebKit/LayoutTests/editing/assert_selection.js
index 2f5764aa71b2cd3b5bf7be648f6a7ad5a09a54cf..9d26d1fcc2baa79ab62ea384a08088c5ff163fd9 100644
--- a/third_party/WebKit/LayoutTests/editing/assert_selection.js
+++ b/third_party/WebKit/LayoutTests/editing/assert_selection.js
@@ -466,7 +466,10 @@ class Serializer {
* @param {!HTMLDocument} document
*/
serialize(document) {
- this.serializeChildren(document.body);
+ if (document.body)
+ this.serializeChildren(document.body);
+ else
+ this.serializeInternal(document.documentElement);
return this.strings_.join('');
}
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/assert_selection.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698