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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/encoding/textdecoder-ignorebom.html

Issue 1990653002: Move the encoding directory from web-platform-tests/ to wpt/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Encoding API: TextDecoder ignoreBOM option</title> 2 <title>Encoding API: TextDecoder ignoreBOM option</title>
3 <script src="../../../resources/testharness.js"></script> 3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script> 4 <script src="../../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 6
7 var cases = [ 7 var cases = [
8 {encoding: 'utf-8', bytes: [0xEF, 0xBB, 0xBF, 0x61, 0x62, 0x63]}, 8 {encoding: 'utf-8', bytes: [0xEF, 0xBB, 0xBF, 0x61, 0x62, 0x63]},
9 {encoding: 'utf-16le', bytes: [0xFF, 0xFE, 0x61, 0x00, 0x62, 0x00, 0x63, 0x0 0]}, 9 {encoding: 'utf-16le', bytes: [0xFF, 0xFE, 0x61, 0x00, 0x62, 0x00, 0x63, 0x0 0]},
10 {encoding: 'utf-16be', bytes: [0xFE, 0xFF, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6 3]} 10 {encoding: 'utf-16be', bytes: [0xFE, 0xFF, 0x00, 0x61, 0x00, 0x62, 0x00, 0x6 3]}
(...skipping 25 matching lines...) Expand all
36 36
37 test(function() { 37 test(function() {
38 assert_true('ignoreBOM' in new TextDecoder(), 'The ignoreBOM attribute shoul d exist on TextDecoder.'); 38 assert_true('ignoreBOM' in new TextDecoder(), 'The ignoreBOM attribute shoul d exist on TextDecoder.');
39 assert_equals(typeof new TextDecoder().ignoreBOM, 'boolean', 'The type of t he ignoreBOM attribute should be boolean.'); 39 assert_equals(typeof new TextDecoder().ignoreBOM, 'boolean', 'The type of t he ignoreBOM attribute should be boolean.');
40 assert_false(new TextDecoder().ignoreBOM, 'The ignoreBOM attribute should de fault to false.'); 40 assert_false(new TextDecoder().ignoreBOM, 'The ignoreBOM attribute should de fault to false.');
41 assert_true(new TextDecoder('utf-8', {ignoreBOM: true}).ignoreBOM, 'The igno reBOM attribute can be set using an option.'); 41 assert_true(new TextDecoder('utf-8', {ignoreBOM: true}).ignoreBOM, 'The igno reBOM attribute can be set using an option.');
42 42
43 }, 'The ignoreBOM attribute of TextDecoder'); 43 }, 'The ignoreBOM attribute of TextDecoder');
44 44
45 </script> 45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698