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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/encoding/textdecoder-fatal.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: Fatal flag</title> 2 <title>Encoding API: Fatal flag</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 bad = [ 7 var bad = [
8 { encoding: 'utf-8', input: [0xFF], name: 'invalid code' }, 8 { encoding: 'utf-8', input: [0xFF], name: 'invalid code' },
9 { encoding: 'utf-8', input: [0xC0], name: 'ends early' }, 9 { encoding: 'utf-8', input: [0xC0], name: 'ends early' },
10 { encoding: 'utf-8', input: [0xE0], name: 'ends early 2' }, 10 { encoding: 'utf-8', input: [0xE0], name: 'ends early 2' },
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 test(function() { 64 test(function() {
65 assert_true('fatal' in new TextDecoder(), 'The fatal attribute should exist on TextDecoder.'); 65 assert_true('fatal' in new TextDecoder(), 'The fatal attribute should exist on TextDecoder.');
66 assert_equals(typeof new TextDecoder().fatal, 'boolean', 'The type of the f atal attribute should be boolean.'); 66 assert_equals(typeof new TextDecoder().fatal, 'boolean', 'The type of the f atal attribute should be boolean.');
67 assert_false(new TextDecoder().fatal, 'The fatal attribute should default to false.'); 67 assert_false(new TextDecoder().fatal, 'The fatal attribute should default to false.');
68 assert_true(new TextDecoder('utf-8', {fatal: true}).fatal, 'The fatal attrib ute can be set using an option.'); 68 assert_true(new TextDecoder('utf-8', {fatal: true}).fatal, 'The fatal attrib ute can be set using an option.');
69 69
70 }, 'The fatal attribute of TextDecoder'); 70 }, 'The fatal attribute of TextDecoder');
71 71
72 </script> 72 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698