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

Unified Diff: LayoutTests/fast/encoding/api/legacy-encode.html

Issue 15901002: Implement Encoding API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline webexposed global constructor tests Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/encoding/api/legacy-encode.html
diff --git a/LayoutTests/fast/encoding/api/legacy-encode.html b/LayoutTests/fast/encoding/api/legacy-encode.html
new file mode 100644
index 0000000000000000000000000000000000000000..335b3a3055f99ff8dbbd59bba0584db761e5abb7
--- /dev/null
+++ b/LayoutTests/fast/encoding/api/legacy-encode.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="resources/shared.js"></script>
+<script>
+
+description("Non-UTF encodings supported only for decode, not encode");
+
+utf_encodings.forEach(function(encoding) {
+ shouldBeEqualToString("new TextDecoder('"+encoding+"').encoding", encoding);
+ shouldBeEqualToString("new TextEncoder('"+encoding+"').encoding", encoding);
+});
+
+legacy_encodings.forEach(function(encoding) {
+ shouldBeEqualToString("new TextDecoder('"+encoding+"').encoding", encoding);
+ shouldThrow("new TextEncoder('"+encoding+"').encoding");
+});
+
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
« no previous file with comments | « LayoutTests/fast/encoding/api/fatal-flag-expected.txt ('k') | LayoutTests/fast/encoding/api/legacy-encode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698