Index: third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-no-mutation.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/StaticRange/staticrange-no-mutate.html b/third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-no-mutation.html |
similarity index 58% |
rename from third_party/WebKit/LayoutTests/fast/dom/StaticRange/staticrange-no-mutate.html |
rename to third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-no-mutation.html |
index 6dec75d2130f0fe1127ce5d83c4b632436a42634..b2217c72aff0f29f7ffa48ca9fe40c5c7b259fe0 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/StaticRange/staticrange-no-mutate.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-no-mutation.html |
@@ -1,20 +1,18 @@ |
-<!DOCTYPE html> |
-<html> |
-<head> |
-<title>StaticRange: No mutate on DOM change</title> |
-<script src="../../../resources/testharness.js"></script> |
-<script src="../../../resources/testharnessreport.js"></script> |
-</head> |
-<body> |
+<!doctype html> |
+<title>StaticRange: No mutate on DOM changes</title> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<div id='txt'> |
abcdefg |
+</div> |
<script> |
-test(function() { |
+test(() => { |
// Initialize. |
- var txt = document.body.firstChild; |
- var staticRange = new StaticRange(); |
+ const txt = document.getElementById('txt').firstChild; |
+ const staticRange = new StaticRange(); |
staticRange.setStart(txt, 0); |
staticRange.setEnd(txt, 5); |
- var range = staticRange.toRange(); |
+ const range = staticRange.toRange(); |
foolip
2017/04/04 04:32:36
Add a test for when this throws an exception, or r
chongz
2017/04/07 18:14:11
Removed |toRange()|.
|
// Split text and StaticRange shouldn't mutate. |
txt.splitText(2); |
@@ -28,7 +26,5 @@ test(function() { |
assert_equals(range.startOffset, 0); |
assert_equals(range.endContainer, txt.nextSibling); |
assert_equals(range.endOffset, 3); |
-}, 'Testing StaticRange wont mutate on DOM change'); |
+}, 'StaticRange does not mutate on DOM changes'); |
foolip
2017/04/04 04:32:36
If you make this the <title> you can omit it here,
chongz
2017/04/07 18:14:11
Removed this test as we have no way to set the att
|
</script> |
-</body> |
-</html> |