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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/type-checking.html

Issue 1778683005: Drop remaining [LegacyInterfaceTypeChecking] for Selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests Created 4 years, 9 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/type-checking.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/type-checking.html b/third_party/WebKit/LayoutTests/editing/selection/type-checking.html
new file mode 100644
index 0000000000000000000000000000000000000000..da265cb41c51b754192c02d1aa2a922f753473d0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/type-checking.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<body>
+<script>
+window.selection = getSelection();
+
+shouldNotThrow('selection.collapse(document.body, 0)');
+shouldNotThrow('selection.collapse(null, 0)');
+shouldNotThrow('selection.collapse(undefined, 0)');
+shouldThrow('selection.collapse(0, 0)');
+shouldThrow('selection.collapse(window, 0)');
+
+shouldNotThrow('selection.setPosition(document.body, 0)');
+shouldNotThrow('selection.setPosition(null, 0)');
+shouldNotThrow('selection.setPosition(undefined, 0)');
+shouldThrow('selection.setPosition(0, 0)');
+shouldThrow('selection.setPosition(window, 0)');
+
+shouldNotThrow('selection.setBaseAndExtent(document.body, 0, document.body, 0)');
+shouldNotThrow('selection.setBaseAndExtent(null, 0, null, 0)');
+shouldNotThrow('selection.setBaseAndExtent(undefined, 0, undefined, 0)');
+shouldThrow('selection.setBaseAndExtent(0, 0, null, 0)');
+shouldThrow('selection.setBaseAndExtent(null, 0, 0, 0)');
+shouldThrow('selection.setBaseAndExtent(window, 0, null, 0)');
+shouldThrow('selection.setBaseAndExtent(null, 0, window, 0)');
+</script>

Powered by Google App Engine
This is Rietveld 408576698