B2G/gecko/dom/encoding/test/test_TextDecoder.js
/*
* function testDecodeABVOption()
*
* - ABV for ArrayBufferView
* - fatal remains null for the entire test
* - encoding remains as "iso-8859-11"
* - The stream option is modified for this test.
* - ArrayBufferView is modified for this test.
*/
function testDecodeABVOption()
ABV for ArrayBufferView
fatal remains null for the entire test
encoding remains as "iso-8859-11"
The stream option is modified for this test.
ArrayBufferView is modified for this test.
function testDecodeABVOption () ABV for ArrayBufferView fatal remains null for the entire test encoding remains as " iso - 8859 - 11 " The stream option is modified for this test . ArrayBufferView is modified for this test .
function testDecodeABVOption(data, expectedString)
{
  testCharset({encoding: "iso-8859-11", input: data, expected: expectedString,
    msg: "decode test ABV valid data."});
  testCharset({encoding: "iso-8859-11", input: [], expected: "",
    msg: "decode test ABV empty data."});
  testCharset({encoding: "iso-8859-11", input: ["\u0020\u0020"], expected: "\0",
    msg: "text decoding ABV string test."});
  testCharset({encoding: "iso-8859-11", input: [""], expected: "\0",
    msg: "text decoding ABV empty string test."});
  testCharset({encoding: "iso-8859-11", input: null, expected: "",
    msg: "text decoding ABV null test."});
}
function testDecodeABVOption ( data , expectedString ) { testCharset ( { encoding : "iso-8859-11" , input : data , expected : expectedString , msg : "decode test ABV valid data." } ) ; testCharset ( { encoding : "iso-8859-11" , input : [ ] , expected : "" , msg : "decode test ABV empty data." } ) ; testCharset ( { encoding : "iso-8859-11" , input : [ "\u0020\u0020" ] , expected : "\0" , msg : "text decoding ABV string test." } ) ; testCharset ( { encoding : "iso-8859-11" , input : [ "" ] , expected : "\0" , msg : "text decoding ABV empty string test." } ) ; testCharset ( { encoding : "iso-8859-11" , input : null , expected : "" , msg : "text decoding ABV null test." } ) ; }
function testDecodeABVOption()
 ABV for ArrayBufferView
 fatal remains null for the entire test
 encoding remains as "iso-8859-11"
 The stream option is modified for this test.
function testDecodeABVOption () ABV for ArrayBufferView fatal remains null for the entire test encoding remains as " iso - 8859 - 11 " The stream option is modified for this test .
// valid data // invalid empty data // spaces // null for Array Buffer