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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-constructor.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-constructor.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-constructor.html b/third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..75a8ea35dc4b48ca724ce3c4349e4a085a42f8bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/dom/ranges/StaticRange-constructor.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<title>StaticRange: constructor</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ assert_equals(typeof new StaticRange, 'object');
+ assert_equals(Object.prototype.toString.call(new StaticRange), '[object StaticRange]');
+ assert_true(new StaticRange instanceof StaticRange);
+ assert_equals(Object.getPrototypeOf(new StaticRange), StaticRange.prototype);
+}, 'Basic interface');
+
+test(() => {
+ const staticRange = new StaticRange();
+ assert_equals(staticRange.startContainer, document);
+ assert_equals(staticRange.startOffset, 0);
+ assert_equals(staticRange.endContainer, document);
+ assert_equals(staticRange.endOffset, 0);
+ assert_true(staticRange.collapsed);
+}, 'Default attributes');
foolip 2017/04/04 04:32:36 Suggest 'Attribute default values', the attributes
chongz 2017/04/07 18:14:11 Done.
+</script>

Powered by Google App Engine
This is Rietveld 408576698