| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,8 +8,6 @@ const common = require('../common'); | |||
| 8 | 8 | if (!common.hasIntl) | |
| 9 | 9 | common.skip('missing Intl'); | |
| 10 | 10 | ||
| 11 | - const assert = require('assert'); | ||
| 12 | - | ||
| 13 | 11 | { | |
| 14 | 12 | [ | |
| 15 | 13 | { encoding: 'utf-8', sequence: [0xC0] }, | |
@@ -28,12 +26,6 @@ const assert = require('assert'); | |||
| 28 | 26 | `The encoded data was not valid for encoding ${testCase.encoding}` | |
| 29 | 27 | } | |
| 30 | 28 | ); | |
| 31 | - | ||
| 32 | - // TODO(joyeecheung): remove this when WPT is ported | ||
| 33 | - assert.strictEqual( | ||
| 34 | - new TextDecoder(testCase.encoding).decode(data), | ||
| 35 | - '\uFFFD' | ||
| 36 | - ); | ||
| 37 | 29 | }); | |
| 38 | 30 | } | |
| 39 | 31 | ||
@@ -42,10 +34,6 @@ const assert = require('assert'); | |||
| 42 | 34 | const odd = new Uint8Array([0x00]); | |
| 43 | 35 | const even = new Uint8Array([0x00, 0x00]); | |
| 44 | 36 | ||
| 45 | - // TODO(joyeecheung): remove this when WPT is ported | ||
| 46 | - assert.strictEqual(decoder.decode(odd, { stream: true }), ''); | ||
| 47 | - assert.strictEqual(decoder.decode(odd), '\u0000'); | ||
| 48 | - | ||
| 49 | 37 | common.expectsError( | |
| 50 | 38 | () => { | |
| 51 | 39 | decoder.decode(even, { stream: true }); | |
@@ -69,8 +57,4 @@ const assert = require('assert'); | |||
| 69 | 57 | 'The encoded data was not valid for encoding utf-16le' | |
| 70 | 58 | } | |
| 71 | 59 | ); | |
| 72 | - | ||
| 73 | - // TODO(joyeecheung): remove this when WPT is ported | ||
| 74 | - assert.strictEqual(decoder.decode(even, { stream: true }), '\u0000'); | ||
| 75 | - assert.strictEqual(decoder.decode(even), '\u0000'); | ||
| 76 | 60 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,8 +8,6 @@ const common = require('../common'); | |||
| 8 | 8 | if (!common.hasIntl) | |
| 9 | 9 | common.skip('missing Intl'); | |
| 10 | 10 | ||
| 11 | - const assert = require('assert'); | ||
| 12 | - | ||
| 13 | 11 | const bad = [ | |
| 14 | 12 | { encoding: 'utf-8', input: [0xFF], name: 'invalid code' }, | |
| 15 | 13 | { encoding: 'utf-8', input: [0xC0], name: 'ends early' }, | |
@@ -82,11 +80,3 @@ bad.forEach((t) => { | |||
| 82 | 80 | } | |
| 83 | 81 | ); | |
| 84 | 82 | }); | |
| 85 | - | ||
| 86 | - // TODO(joyeecheung): remove this when WPT is ported | ||
| 87 | - { | ||
| 88 | - assert('fatal' in new TextDecoder()); | ||
| 89 | - assert.strictEqual(typeof new TextDecoder().fatal, 'boolean'); | ||
| 90 | - assert(!new TextDecoder().fatal); | ||
| 91 | - assert(new TextDecoder('utf-8', { fatal: true }).fatal); | ||
| 92 | - } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,8 +8,6 @@ const common = require('../common'); | |||
| 8 | 8 | if (!common.hasIntl) | |
| 9 | 9 | common.skip('missing Intl'); | |
| 10 | 10 | ||
| 11 | - const assert = require('assert'); | ||
| 12 | - | ||
| 13 | 11 | const bad = [ | |
| 14 | 12 | { | |
| 15 | 13 | encoding: 'utf-16le', | |
@@ -44,11 +42,6 @@ const bad = [ | |||
| 44 | 42 | ]; | |
| 45 | 43 | ||
| 46 | 44 | bad.forEach((t) => { | |
| 47 | - // TODO(joyeecheung): remove this when WPT is ported | ||
| 48 | - assert.strictEqual( | ||
| 49 | - new TextDecoder(t.encoding).decode(new Uint8Array(t.input)), | ||
| 50 | - t.expected); | ||
| 51 | - | ||
| 52 | 45 | common.expectsError( | |
| 53 | 46 | () => { | |
| 54 | 47 | new TextDecoder(t.encoding, { fatal: true }) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments