Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: LayoutTests/fast/encoding/api/resources/shared.js

Issue 269593009: Encoding API: Update tests and simplify constructors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This file is based on non-normative encodings.json resource referenced by
2 // http://encoding.spec.whatwg.org/ - a reference copy is saved in this
3 // directory and can be updated via:
4 // curl -O http://encoding.spec.whatwg.org/encodings.json
5 //
6 // Changes made to this file are:
7 // * whitespace
8 // * encodings.json data assigned to `encodings_table` (for tests)
9 // * UTF encodings listed in `utf_encodings` (for tests)
10 // * 'ibm866' not yet supported - crbug.com/277023
11 // * 'gb18030' distinct from 'gbk' - crbug.com/339862
12 // * 'big5-hkscs' distinct from 'big5' - crbug.com/277040
13 // * 'hz-gb-2312' is replacement label - w3.org/Bugs/Public/show_bug.cgi?id=25 339
14
1 // Only these encodings are supported for encoding (vs. decoding) 15 // Only these encodings are supported for encoding (vs. decoding)
2 utf_encodings = ["utf-8", "utf-16le", "utf-16be"]; 16 var utf_encodings = ["utf-8", "utf-16le", "utf-16be"];
3 17
4 // From non-normative encodings.json resource referenced by http://encoding.spec .whatwg.org/ 18 var encodings_table = [
5 encodings_table = [
6 { 19 {
7 "encodings": [ 20 "encodings": [
8 { 21 {
9 "labels": [ 22 "labels": [
10 "unicode-1-1-utf-8", 23 "unicode-1-1-utf-8",
11 "utf-8", 24 "utf-8",
12 "utf8" 25 "utf8"
13 ], 26 ],
14 "name": "utf-8" 27 "name": "utf-8"
15 } 28 }
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 "csiso58gb231280", 352 "csiso58gb231280",
340 "gb2312", 353 "gb2312",
341 "gb_2312", 354 "gb_2312",
342 "gb_2312-80", 355 "gb_2312-80",
343 "gbk", 356 "gbk",
344 "iso-ir-58", 357 "iso-ir-58",
345 "x-gbk" 358 "x-gbk"
346 ], 359 ],
347 "name": "gbk" 360 "name": "gbk"
348 }, 361 },
362 // 'gb18030' separate from 'gbk': crbug.com/339862
349 { 363 {
350 "labels": [ 364 "labels": [
351 "gb18030" 365 "gb18030"
352 ], 366 ],
353 "name": "gb18030" 367 "name": "gb18030"
354 },
355 {
356 "labels": [
357 "hz-gb-2312"
358 ],
359 "name": "hz-gb-2312"
360 } 368 }
361 ], 369 ],
362 "heading": "Legacy multi-byte Chinese (simplified) encodings" 370 "heading": "Legacy multi-byte Chinese (simplified) encodings"
363 }, 371 },
364 { 372 {
365 "encodings": [ 373 "encodings": [
366 { 374 {
367 "labels": [ 375 "labels": [
368 "big5", 376 "big5",
369 "big5-hkscs", 377 // "big5-hkscs", see crbug.com/277040
370 "cn-big5", 378 "cn-big5",
371 "csbig5", 379 "csbig5",
372 "x-x-big5" 380 "x-x-big5"
373 ], 381 ],
374 "name": "big5" 382 "name": "big5"
375 } 383 }
376 ], 384 ],
377 "heading": "Legacy multi-byte Chinese (traditional) encodings" 385 "heading": "Legacy multi-byte Chinese (traditional) encodings"
378 }, 386 },
379 { 387 {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 "euc-kr", 425 "euc-kr",
418 "iso-ir-149", 426 "iso-ir-149",
419 "korean", 427 "korean",
420 "ks_c_5601-1987", 428 "ks_c_5601-1987",
421 "ks_c_5601-1989", 429 "ks_c_5601-1989",
422 "ksc5601", 430 "ksc5601",
423 "ksc_5601", 431 "ksc_5601",
424 "windows-949" 432 "windows-949"
425 ], 433 ],
426 "name": "euc-kr" 434 "name": "euc-kr"
427 },
428 {
429 "labels": [
430 "csiso2022kr",
431 "iso-2022-kr"
432 ],
433 "name": "iso-2022-kr"
434 } 435 }
435 ], 436 ],
436 "heading": "Legacy multi-byte Korean encodings" 437 "heading": "Legacy multi-byte Korean encodings"
437 }, 438 },
438 { 439 {
439 "encodings": [ 440 "encodings": [
440 { 441 {
441 "labels": [ 442 "labels": [
443 "csiso2022kr",
444 // 'hz-gb-2312' added: w3.org/Bugs/Public/show_bug.cgi?id=25 339
445 "hz-gb-2312",
442 "iso-2022-cn", 446 "iso-2022-cn",
443 "iso-2022-cn-ext" 447 "iso-2022-cn-ext",
448 "iso-2022-kr"
444 ], 449 ],
445 "name": "replacement" 450 "name": "replacement"
446 }, 451 },
447 { 452 {
448 "labels": [ 453 "labels": [
449 "utf-16be" 454 "utf-16be"
450 ], 455 ],
451 "name": "utf-16be" 456 "name": "utf-16be"
452 }, 457 },
453 { 458 {
454 "labels": [ 459 "labels": [
455 "utf-16", 460 "utf-16",
456 "utf-16le" 461 "utf-16le"
457 ], 462 ],
458 "name": "utf-16le" 463 "name": "utf-16le"
459 }, 464 },
460 { 465 {
461 "labels": [ 466 "labels": [
462 "x-user-defined" 467 "x-user-defined"
463 ], 468 ],
464 "name": "x-user-defined" 469 "name": "x-user-defined"
465 } 470 }
466 ], 471 ],
467 "heading": "Legacy miscellaneous encodings" 472 "heading": "Legacy miscellaneous encodings"
468 } 473 }
469 ]; 474 ];
OLDNEW
« no previous file with comments | « LayoutTests/fast/encoding/api/resources/encodings.json ('k') | Source/modules/encoding/TextDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698