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

Unified Diff: LayoutTests/fast/encoding/api/surrogate-pairs.html

Issue 240283013: Convert Encoding API tests to W3C testharness.js (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move UTF-16 surrogate tests to separate file 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/encoding/api/surrogate-pairs.html
diff --git a/LayoutTests/fast/encoding/api/surrogate-pairs.html b/LayoutTests/fast/encoding/api/surrogate-pairs.html
deleted file mode 100644
index 7c6104d1ff4c2b0df67978ecd1409f7706d01d7d..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/encoding/api/surrogate-pairs.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<script src="../../../resources/js-test.js"></script>
-<script>
-
-description("Test invalid UTF-16 surrogate pairs with UTF-8 encoding");
-
-var badStrings = [
- { input: "'abc123'", expected: [97, 98, 99, 49, 50, 51] }, // Sanity check.
- { input: "'\\ud800'", expected: [0xef, 0xbf, 0xbd] }, // Surrogate half.
- { input: "'\\udc00'", expected: [0xef, 0xbf, 0xbd] }, // Surrogate half.
- { input: "'abc\\ud800123'", expected: [0x61, 0x62, 0x63, 0xef, 0xbf, 0xbd, 0x31, 0x32, 0x33] }, // Surrogate half.
- { input: "'abc\\udc00123'", expected: [0x61, 0x62, 0x63, 0xef, 0xbf, 0xbd, 0x31, 0x32, 0x33] }, // Surrogate half.
- { input: "'\\udc00\\ud800'", expected: [239, 191, 189, 239, 191, 189] } // Wrong order.
-];
-
-badStrings.forEach(
- function(t) {
- evalAndLog("encoded = new TextEncoder('utf-8').encode(" + t.input + ")");
- shouldBeEqualToString("JSON.stringify([].slice.call(encoded))", JSON.stringify(t.expected));
- debug("");
- });
-
-</script>

Powered by Google App Engine
This is Rietveld 408576698