| Index: LayoutTests/fast/encoding/api/encoding-names.html
|
| diff --git a/LayoutTests/fast/encoding/api/encoding-names.html b/LayoutTests/fast/encoding/api/encoding-names.html
|
| index 6a8a3efbaa934d6b08045846b147f9d1b5125cf9..cbc3ff4c34be426e9a13dd520504981e006ba234 100644
|
| --- a/LayoutTests/fast/encoding/api/encoding-names.html
|
| +++ b/LayoutTests/fast/encoding/api/encoding-names.html
|
| @@ -1,25 +1,29 @@
|
| <!DOCTYPE html>
|
| -<script src="../../../resources/js-test.js"></script>
|
| +<title>Encoding API: Encoding names</title>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<script src="resources/shared.js"></script>
|
| <script>
|
|
|
| -description("Test the Encoding API's use of encoding names");
|
| +test(function() {
|
|
|
| -debug("Encoding names are case insensitive");
|
| -var encodings = [
|
| - { label: 'utf-8', encoding: 'utf-8' },
|
| - { label: 'utf-16', encoding: 'utf-16le' },
|
| - { label: 'utf-16le', encoding: 'utf-16le' },
|
| - { label: 'utf-16be', encoding: 'utf-16be' },
|
| - { label: 'ascii', encoding: 'windows-1252' },
|
| - { label: 'iso-8859-1', encoding: 'windows-1252' }
|
| -];
|
| + var encodings = [
|
| + { label: 'utf-8', encoding: 'utf-8' },
|
| + { label: 'utf-16', encoding: 'utf-16le' },
|
| + { label: 'utf-16le', encoding: 'utf-16le' },
|
| + { label: 'utf-16be', encoding: 'utf-16be' },
|
| + { label: 'ascii', encoding: 'windows-1252' },
|
| + { label: 'iso-8859-1', encoding: 'windows-1252' }
|
| + ];
|
|
|
| -// encoding-labels.html tests the full set of names/labels; this test just
|
| -// exercises some common cases and case-insensitivity.
|
| + // encoding-labels.html tests the full set of names/labels; this test just
|
| + // exercises some common cases and case-insensitivity.
|
|
|
| -encodings.forEach(function(test) {
|
| - shouldBeEqualToString("new TextDecoder('" + test.label.toLowerCase() + "').encoding", test.encoding);
|
| - shouldBeEqualToString("new TextDecoder('" + test.label.toUpperCase() + "').encoding", test.encoding);
|
| -});
|
| + encodings.forEach(function(t) {
|
| + assert_equals(new TextDecoder(t.label.toLowerCase()).encoding, t.encoding);
|
| + assert_equals(new TextDecoder(t.label.toUpperCase()).encoding, t.encoding);
|
| + });
|
| +
|
| +}, 'Encoding labels are case-insensitive');
|
|
|
| </script>
|
|
|