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

Unified Diff: LayoutTests/fast/files/blob-constructor.html

Issue 1305393006: Don't NFC-normalize strings during Blob/File construction (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/fast/files/blob-constructor-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/files/blob-constructor.html
diff --git a/LayoutTests/fast/files/blob-constructor.html b/LayoutTests/fast/files/blob-constructor.html
index a85627d6ffc8f2cd26a56fc9b78ccc70c1f3abc8..cdf4684e0fc111eeb9507a10f73dc7ae6a5cd117 100644
--- a/LayoutTests/fast/files/blob-constructor.html
+++ b/LayoutTests/fast/files/blob-constructor.html
@@ -3,6 +3,7 @@
<script src="../../resources/js-test.js"></script>
<script>
description("Test the Blob constructor.");
+var jsTestIsAsync = true;
// Test the different ways you can construct a Blob.
shouldBeTrue("(new Blob()) instanceof window.Blob");
@@ -107,4 +108,14 @@ shouldBe("new Blob([new Blob([(new Int32Array(100)).buffer]), (new Uint8Array(10
// (This depends on the bindings code handling of sequence<T>)
shouldBe("new Blob({length: 0}).size", "0");
shouldBe("new Blob({length: 1, 0: 'string'}).size", "6");
+
+// Test that strings are not NFC normalized
+var OMICRON_WITH_OXIA = '\u1F79'; // NFC normalized to U+3CC
+shouldBe("OMICRON_WITH_OXIA.charCodeAt(0)", "0x1F79");
+var reader = new FileReader();
+reader.readAsText(new Blob([OMICRON_WITH_OXIA]));
+reader.onload = function() {
+ shouldBe("reader.result.charCodeAt(0)", "0x1F79");
+ finishJSTest();
+};
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/files/blob-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698