Chromium Code Reviews| 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> |