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

Unified Diff: third_party/WebKit/LayoutTests/fast/encoding/latin1-unencodables.html

Issue 2470043004: Fix vector resize logic when encoding non-BMP chars to latin1 as ?s (Closed)
Patch Set: rebased Created 4 years, 1 month 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 | third_party/WebKit/LayoutTests/fast/encoding/latin1-unencodables-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/encoding/latin1-unencodables.html
diff --git a/third_party/WebKit/LayoutTests/fast/encoding/latin1-unencodables.html b/third_party/WebKit/LayoutTests/fast/encoding/latin1-unencodables.html
new file mode 100644
index 0000000000000000000000000000000000000000..eb73eb409e579f528bb152cd1c4b070b00aa96a3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/encoding/latin1-unencodables.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<meta charset=windows-1252>
+<title>Regression test for crbug.com/661367</title>
+
+<p>
+ To test manually, create a local file named &#x13166;.txt then select it in the form
+ and hit submit. If there is no crash, the test passes.
+</p>
+
+<form method=POST accept-charset="windows-1252" enctype="multipart/form-data">
+ <input type=file name=q>
+ <input type=hidden name=submitted value=true>
+ <input type=submit>
+</form>
+
+<script>
+if (window.eventSender) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ window.onload = () => {
+ if (window.location.search !== '?posted') {
+ // Start the test
+ var input = document.querySelector('input[type=file]');
+ var rect = input.getClientRects()[0];
+ var targetX = rect.left + rect.width / 2;
+ var targetY = rect.top + rect.height / 2;
+ eventSender.beginDragWithFiles(['\ud80c\udd66.txt']); // U+13166
+ eventSender.mouseMoveTo(targetX, targetY);
+ eventSender.mouseUp();
+ var form = document.querySelector('form');
+ form.action = window.location.href + '?posted';
+ form.submit();
+ } else {
+ document.querySelector('p').innerText = 'PASS: did not crash';
+ testRunner.notifyDone();
+ }
+ }
+}
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/encoding/latin1-unencodables-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698