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

Unified Diff: LayoutTests/editing/selection/containsNode.html

Issue 1308663003: The node and allowPartialContainment arguments for Selection API should not be optional (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | LayoutTests/editing/selection/containsNode-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/selection/containsNode.html
diff --git a/LayoutTests/editing/selection/containsNode.html b/LayoutTests/editing/selection/containsNode.html
index 3c16b67eefb7a60e6b619cc1727a9ef08b91adb0..4d50873f8f34df89ff41beeabcb132f7a5e62de3 100644
--- a/LayoutTests/editing/selection/containsNode.html
+++ b/LayoutTests/editing/selection/containsNode.html
@@ -23,6 +23,15 @@ function shouldBe(expr, expected) {
log("Success: " + expr + " is " + expected + ".");
}
+function shouldThrow(expr) {
+ try {
+ eval(expr);
+ log("Failure: " + expr + " didn't raise an exception" + ".");
+ } catch (ex) {
+ log("Success: " + expr + " raised " + ex + ".");
+ }
+}
+
if (window.testRunner)
testRunner.dumpAsText();
@@ -33,8 +42,8 @@ r.setStart(span1, 1);
r.setEnd(span1, 2);
s.addRange(r);
-shouldBe('s.containsNode(null, false)', false);
-shouldBe('s.containsNode(null, true)', false);
+shouldThrow("s.containsNode(null, false);");
+shouldThrow("s.containsNode(null, true);");
shouldBe('s.containsNode(testDiv, false)', false);
shouldBe('s.containsNode(testDiv, true)', true);
shouldBe('s.containsNode(span1, false)', false);
« no previous file with comments | « no previous file | LayoutTests/editing/selection/containsNode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698