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

Unified Diff: LayoutTests/fast/encoding/api/replacement-encoding.html

Issue 145973021: Implement "replacement" text encoding. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Replacement codec should emit U+FFFD Created 6 years, 9 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/replacement-encoding.html
diff --git a/LayoutTests/fast/encoding/api/replacement-encoding.html b/LayoutTests/fast/encoding/api/replacement-encoding.html
new file mode 100644
index 0000000000000000000000000000000000000000..cd7808de87b19b342242d7c6a936eb9d1ae8fb75
--- /dev/null
+++ b/LayoutTests/fast/encoding/api/replacement-encoding.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+<script>
+
+description("Verify replacement encoding behavior");
+
+shouldThrow("new TextEncoder('replacement')");
+shouldThrow("new TextDecoder('replacement')");
+
+encodings_table.forEach(function(section) {
+ section.encodings.forEach(function(encoding) {
+ if (encoding.name !== "replacement")
+ return;
+
+ encoding.labels.forEach(function(label) {
+
+ debug("");
+ debug("label: " + label);
+ debug("");
+
+ shouldThrow("new TextEncoder('" + label + "')");
+ shouldThrow("new TextDecoder('" + label + "')");
+ });
+ });
+});
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698