Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <title>StaticRange: constructor</title> | |
| 3 <script src="/resources/testharness.js"></script> | |
| 4 <script src="/resources/testharnessreport.js"></script> | |
| 5 <script> | |
| 6 test(() => { | |
| 7 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
| |
| 8 assert_equals(Object.prototype.toString.call(new StaticRange), '[object Stat icRange]'); | |
| 9 assert_true(new StaticRange instanceof StaticRange); | |
| 10 assert_equals(Object.getPrototypeOf(new StaticRange), StaticRange.prototype) ; | |
| 11 }, 'Basic interface'); | |
| 12 | |
| 13 test(() => { | |
| 14 const staticRange = new StaticRange(); | |
| 15 assert_equals(staticRange.startContainer, document); | |
| 16 assert_equals(staticRange.startOffset, 0); | |
| 17 assert_equals(staticRange.endContainer, document); | |
| 18 assert_equals(staticRange.endOffset, 0); | |
| 19 assert_true(staticRange.collapsed); | |
| 20 }, 'Attribute default values'); | |
| 21 </script> | |
| OLD | NEW |