Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 description("This tests the constructor for the ErrorEvent DOM class."); | 9 description("This tests the constructor for the ErrorEvent DOM class."); |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 shouldBe("new ErrorEvent('eventType', { lineno: '12345' }).lineno", "12345"); | 67 shouldBe("new ErrorEvent('eventType', { lineno: '12345' }).lineno", "12345"); |
| 68 shouldBe("new ErrorEvent('eventType', { lineno: '12345a' }).lineno", "0"); | 68 shouldBe("new ErrorEvent('eventType', { lineno: '12345a' }).lineno", "0"); |
| 69 shouldBe("new ErrorEvent('eventType', { lineno: 'abc' }).lineno", "0"); | 69 shouldBe("new ErrorEvent('eventType', { lineno: 'abc' }).lineno", "0"); |
| 70 shouldBe("new ErrorEvent('eventType', { lineno: [] }).lineno", "0"); | 70 shouldBe("new ErrorEvent('eventType', { lineno: [] }).lineno", "0"); |
| 71 shouldBe("new ErrorEvent('eventType', { lineno: [12345] }).lineno", "12345"); | 71 shouldBe("new ErrorEvent('eventType', { lineno: [12345] }).lineno", "12345"); |
| 72 shouldBe("new ErrorEvent('eventType', { lineno: [12345, 67890] }).lineno", "0"); | 72 shouldBe("new ErrorEvent('eventType', { lineno: [12345, 67890] }).lineno", "0"); |
| 73 shouldBe("new ErrorEvent('eventType', { lineno: {} }).lineno", "0"); | 73 shouldBe("new ErrorEvent('eventType', { lineno: {} }).lineno", "0"); |
| 74 shouldBe("new ErrorEvent('eventType', { lineno: {moemoe: 12345} }).lineno", "0") ; | 74 shouldBe("new ErrorEvent('eventType', { lineno: {moemoe: 12345} }).lineno", "0") ; |
| 75 shouldBe("new ErrorEvent('eventType', { lineno: {valueOf: function () { return 1 2345; }} }).lineno", "12345"); | 75 shouldBe("new ErrorEvent('eventType', { lineno: {valueOf: function () { return 1 2345; }} }).lineno", "12345"); |
| 76 | 76 |
| 77 // colno is passed. | |
| 78 // numbers within the unsigned long range. | |
| 79 shouldBe("new ErrorEvent('eventType', { colno: 0 }).colno", "0"); | |
|
tkent
2013/07/28 21:52:11
According to the specification, the member name of
do-not-use
2013/07/30 05:20:12
The specification has now been fixed:
http://html5
| |
| 80 shouldBe("new ErrorEvent('eventType', { colno: 1 }).colno", "1"); | |
| 81 shouldBe("new ErrorEvent('eventType', { colno: 4294967294 }).colno", "4294967294 "); | |
| 82 shouldBe("new ErrorEvent('eventType', { colno: 4294967295 }).colno", "4294967295 "); | |
| 83 | |
| 84 // numbers out of the unsigned long range. | |
| 85 // 2^{53}-1, the largest number that can be exactly represented by double. | |
| 86 shouldBe("new ErrorEvent('eventType', { colno: 9007199254740991 }).colno", "4294 967295"); | |
| 87 // 2^{64}-1 | |
| 88 shouldBe("new ErrorEvent('eventType', { colno: 18446744073709551615 }).colno", " 0"); | |
| 89 shouldBe("new ErrorEvent('eventType', { colno: 12345678901234567890 }).colno", " 3944679424"); | |
| 90 shouldBe("new ErrorEvent('eventType', { colno: -1 }).colno", "4294967295"); | |
| 91 shouldBe("new ErrorEvent('eventType', { colno: 123.45 }).colno", "123"); | |
| 92 shouldBe("new ErrorEvent('eventType', { colno: NaN }).colno", "0"); | |
| 93 | |
| 94 // Non-numeric values. | |
| 95 shouldBe("new ErrorEvent('eventType', { colno: undefined }).colno", "0"); | |
| 96 shouldBe("new ErrorEvent('eventType', { colno: null }).colno", "0"); | |
| 97 shouldBe("new ErrorEvent('eventType', { colno: '' }).colno", "0"); | |
| 98 shouldBe("new ErrorEvent('eventType', { colno: '12345' }).colno", "12345"); | |
| 99 shouldBe("new ErrorEvent('eventType', { colno: '12345a' }).colno", "0"); | |
| 100 shouldBe("new ErrorEvent('eventType', { colno: 'abc' }).colno", "0"); | |
| 101 shouldBe("new ErrorEvent('eventType', { colno: [] }).colno", "0"); | |
| 102 shouldBe("new ErrorEvent('eventType', { colno: [12345] }).colno", "12345"); | |
| 103 shouldBe("new ErrorEvent('eventType', { colno: [12345, 67890] }).colno", "0"); | |
| 104 shouldBe("new ErrorEvent('eventType', { colno: {} }).colno", "0"); | |
| 105 shouldBe("new ErrorEvent('eventType', { colno: {moemoe: 12345} }).colno", "0"); | |
| 106 shouldBe("new ErrorEvent('eventType', { colno: {valueOf: function () { return 12 345; }} }).colno", "12345"); | |
| 107 | |
| 77 // All initializers are passed. | 108 // All initializers are passed. |
| 78 shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message : 'sakuranbo', filename: 'amaenbo', lineno: 12345 }).bubbles", "true"); | 109 shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message : 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).bubbles", "tr ue"); |
| 79 shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message : 'sakuranbo', filename: 'amaenbo', lineno: 12345 }).cancelable", "true"); | 110 shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message : 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).cancelable", "true"); |
| 80 shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345 }).message", "sak uranbo"); | 111 shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }). message", "sakuranbo"); |
| 81 shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345 }).filename", "am aenbo"); | 112 shouldBeEqualToString("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }). filename", "amaenbo"); |
| 82 shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message : 'sakuranbo', filename: 'amaenbo', lineno: 12345 }).lineno", "12345"); | 113 shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message : 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).lineno", "123 45"); |
| 114 shouldBe("new ErrorEvent('eventType', { bubbles: true, cancelable: true, message : 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456 }).colno", "2345 6"); | |
| 83 </script> | 115 </script> |
| 84 <script src="../../js/resources/js-test-post.js"></script> | 116 <script src="../../js/resources/js-test-post.js"></script> |
| 85 </body> | 117 </body> |
| 86 </html> | 118 </html> |
| OLD | NEW |