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

Unified Diff: LayoutTests/fast/dom/Range/range-comparePoint.html

Issue 410413002: Range.comparePoint should throw TypeError when refNode is not an object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | LayoutTests/fast/dom/Range/range-comparePoint-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/Range/range-comparePoint.html
diff --git a/LayoutTests/fast/dom/Range/range-comparePoint.html b/LayoutTests/fast/dom/Range/range-comparePoint.html
index 6dec4ac74210c9d42f65f59da5d4af6a284ffec7..abbd84e39a880984c070affa52aecbd18f774433 100644
--- a/LayoutTests/fast/dom/Range/range-comparePoint.html
+++ b/LayoutTests/fast/dom/Range/range-comparePoint.html
@@ -78,7 +78,15 @@ function test()
} catch (e) {
document.getElementById("test10").innerHTML = "test 10 passed";
}
-
+
+ // test 11 - should throw TypeError when node is not an object
+ try {
+ range.comparePoint(null, 0);
+ } catch (e) {
+ if (e.name == 'TypeError')
+ document.getElementById("test11").innerHTML = "test 11 passed";
+ }
+
if (window.testRunner)
testRunner.dumpAsText();
}
@@ -98,6 +106,7 @@ function test()
<div id=test8><span style="color: red;">test 8 failed</span></div><br>
<div id=test9><span style="color: red;">test 9 failed</span></div><br>
<div id=test10><span style="color: red;">test 10 failed</span></div><br>
+<div id=test11><span style="color: red;">test 11 failed</span></div><br>
<!-- hidden area to create the ranges being tested -->
<div style="visibility: hidden">
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/range-comparePoint-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698