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

Unified Diff: LayoutTests/fast/dom/Range/range-compareNode.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-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

Powered by Google App Engine
This is Rietveld 408576698