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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js

Issue 2693813002: Selection API: Some functions should throw InvalidNodeTypeError and IndexSizeError. (Closed)
Patch Set: adjust 2 more tests Created 3 years, 10 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
Index: third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js
diff --git a/third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js b/third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js
index 6b83df332b347a707d31202bb26d212cd0d64f0c..260203df1769291147f97dc179049002e444ac61 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js
+++ b/third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js
@@ -5,16 +5,16 @@ description("Test to check if setBaseAndExtent guard node with null owner docume
var sel = window.getSelection();
var docType = document.implementation.createDocumentType('c', null, null);
-sel.setBaseAndExtent(docType, 0, null, 0);
+shouldThrow("sel.setBaseAndExtent(docType, 0, null, 0)");
shouldBeNull("sel.anchorNode");
sel.setBaseAndExtent(null, 0, docType, 0);
shouldBeNull("sel.anchorNode");
-sel.collapse(docType);
+shouldThrow("sel.collapse(docType)");
shouldBeNull("sel.anchorNode");
-sel.selectAllChildren(docType);
+shouldThrow("sel.selectAllChildren(docType)");
shouldBeNull("sel.anchorNode");
shouldThrow("sel.extend(docType, 0)");

Powered by Google App Engine
This is Rietveld 408576698