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

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

Issue 252783002: Make Range.detach() a no-op (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 8 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: LayoutTests/fast/dom/Range/range-isPointInRange.html
diff --git a/LayoutTests/fast/dom/Range/range-isPointInRange.html b/LayoutTests/fast/dom/Range/range-isPointInRange.html
index 00c955ad787d2b8f52d860212b7c502c3e9e1123..d3480e0989cfca946ecadbc6722a3653f0cb2375 100644
--- a/LayoutTests/fast/dom/Range/range-isPointInRange.html
+++ b/LayoutTests/fast/dom/Range/range-isPointInRange.html
@@ -60,14 +60,12 @@ function test()
document.getElementById("test8").innerHTML = "test 8 passed";
// test 9 - detached range, attached node
- // firefox throws an exception and does not return a value
+ expectedResult = false;
var detachedRange = document.createRange();
- detachedRange.detach();
- try {
- result = detachedRange.isPointInRange(document.getElementById("a1"), 0);
- } catch (e) {
+ detachedRange.detach(); // No-op.
+ result = detachedRange.isPointInRange(document.getElementById("a1"), 0);
+ if (result == expectedResult)
document.getElementById("test9").innerHTML = "test 9 passed";
- }
// test 10 - attached range, detached node
// firefox does not throw an exception and returns false for this test

Powered by Google App Engine
This is Rietveld 408576698