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

Side by Side Diff: LayoutTests/fast/encoding/api/encoding-labels.html

Issue 240283013: Convert Encoding API tests to W3C testharness.js (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script> 2 <title>Encoding API: Encoding labels</title>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
3 <script src="resources/shared.js"></script> 5 <script src="resources/shared.js"></script>
4 <script> 6 <script>
5 7
6 description("Test the Encoding API's use of encoding names");
7
8 encodings_table.forEach(function(section) { 8 encodings_table.forEach(function(section) {
9 var list = section.encodings; 9 section.encodings.forEach(function(encoding) {
10 list.forEach(function(encoding) { 10 var name = encoding.name;
11 debug(""); 11 test(function(){
12 evalAndLog("name = " + JSON.stringify(encoding.name)); 12 encoding.labels.forEach(function(label) {
13 encoding.labels.forEach(function(label) { 13 assert_equals(new TextDecoder(label).encoding, encoding.name);
14 shouldBeEqualToString("new TextDecoder(" + JSON.stringify(label) + " ).encoding", encoding.name); 14 });
15 }); 15 }, 'Labels for: ' + name);
16 }); 16 });
17 }); 17 });
18 18
19 </script> 19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698