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

Side by Side Diff: LayoutTests/imported/web-platform-tests/encoding/api-invalid-label.html

Issue 1157103007: update-w3c-deps import using blink b712b6ce0eb599d90d890aa609f596c7852fb824 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Skip swfsoures Created 5 years, 6 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: invalid label</title> 2 <title>Encoding API: invalid label</title>
3 <meta name="timeout" content="long">
3 <script src="../../../resources/testharness.js"></script> 4 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script> 5 <script src="../../../resources/testharnessreport.js"></script>
5 <script src="resources/encodings.js"></script> 6 <script src="resources/encodings.js"></script>
6 <script> 7 <script>
7 var tests = ["invalid-invalidLabel"]; 8 var tests = ["invalid-invalidLabel"];
8 setup(function() { 9 setup(function() {
9 encodings_table.forEach(function(section) { 10 encodings_table.forEach(function(section) {
10 section.encodings.filter(function(encoding) { 11 section.encodings.filter(function(encoding) {
11 return encoding.name !== 'replacement'; 12 return encoding.name !== 'replacement';
12 }).forEach(function(encoding) { 13 }).forEach(function(encoding) {
(...skipping 11 matching lines...) Expand all
24 tests.forEach(function(input) { 25 tests.forEach(function(input) {
25 test(function() { 26 test(function() {
26 assert_throws(new RangeError(), function() { new TextEncoder(input); }); 27 assert_throws(new RangeError(), function() { new TextEncoder(input); });
27 }, 'Invalid label ' + format_value(input) + ' should be rejected by TextEncode r.'); 28 }, 'Invalid label ' + format_value(input) + ' should be rejected by TextEncode r.');
28 29
29 test(function() { 30 test(function() {
30 assert_throws(new RangeError(), function() { new TextDecoder(input); }); 31 assert_throws(new RangeError(), function() { new TextDecoder(input); });
31 }, 'Invalid label ' + format_value(input) + ' should be rejected by TextDecode r.'); 32 }, 'Invalid label ' + format_value(input) + ' should be rejected by TextDecode r.');
32 }); 33 });
33 </script> 34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698