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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-no-mutation.html

Issue 2791373002: [InputEvent] Make StaticRange immutable and move tests to wpt (Closed)
Patch Set: Created 3 years, 9 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: 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>

Powered by Google App Engine
This is Rietveld 408576698