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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/staticrange/StaticRange-constructor.html

Issue 2791373002: [InputEvent] Make StaticRange immutable and move tests to wpt (Closed)
Patch Set: Make attributes immutable and address foolip's comments Created 3 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: third_party/WebKit/LayoutTests/external/wpt/staticrange/StaticRange-constructor.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/staticrange/StaticRange-constructor.html b/third_party/WebKit/LayoutTests/external/wpt/staticrange/StaticRange-constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..4a38bddae946efe3cc75271da8078b2b5b27d780
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/staticrange/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');
foolip 2017/04/10 07:37:17 The constructor is gone from http://garykac.github
chongz 2017/04/12 20:47:11 Removed constructor to match spec. We could add it
+ 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);
+}, 'Attribute default values');
+</script>

Powered by Google App Engine
This is Rietveld 408576698