Index: LayoutTests/fast/dom/Range/range-compareNode.html |
diff --git a/LayoutTests/fast/dom/Range/range-compareNode.html b/LayoutTests/fast/dom/Range/range-compareNode.html |
index a174f2560457f3139bc4d8abd6c1f68ebc72ed5c..e895387e41e87c52b580f8b5f59f5670f5f86b76 100644 |
--- a/LayoutTests/fast/dom/Range/range-compareNode.html |
+++ b/LayoutTests/fast/dom/Range/range-compareNode.html |
@@ -113,18 +113,12 @@ function test() |
document.getElementById("test13").innerHTML = "test 13 passed: start at range start, end after range"; |
// test 14 - detached range, attached node |
- // firefox throws an exception and does not return a value |
+ expectedResult = 1; |
var detachedRange = document.createRange(); |
- detachedRange.detach(); |
- try { |
- result = detachedRange.compareNode(document.getElementById("a1")); |
- } catch (e) { |
- if(e.code == DOMException.INVALID_STATE_ERR) { |
- document.getElementById("test14").innerHTML = "test 14 passed: detached range, attached node"; |
- } else { |
- document.getElementById("test14").innerHTML = "<span style=\"color: red;\">test 14 failed error: " + e.message + "</span>"; |
- } |
- } |
+ detachedRange.detach(); // no-op. |
+ result = detachedRange.compareNode(document.getElementById("a1")); |
+ if (result == expectedResult) |
+ document.getElementById("test14").innerHTML = "test 14 passed: detached range, attached node"; |
// test 15 - attached range, detached node |
// firefox does not throw an exception and returns 0 for this test |