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

Unified Diff: third_party/WebKit/LayoutTests/svg/text/invalid-non-bmp-characters.html

Issue 1816453002: Add workaround for invalid non-bmp character measurements in SVG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/text/invalid-non-bmp-characters.html
diff --git a/third_party/WebKit/LayoutTests/svg/text/invalid-non-bmp-characters.html b/third_party/WebKit/LayoutTests/svg/text/invalid-non-bmp-characters.html
new file mode 100644
index 0000000000000000000000000000000000000000..0021de108f8668cb9c9679f480873fbe23adfd7c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/text/invalid-non-bmp-characters.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<svg id="svg" height="0" font-size="100">
+ <text id="text">
+ <!-- invalid non-bmp character followed by a valid character -->
+ <tspan>&#x90012;a</tspan>
+ <!-- many invalid non-bmp characters followed by a valid character -->
+ <tspan>&#x90012;&#x90012;&#x90012;&#x90012;a&#x90012;&#x90012;&#x90012;&#x90012;a</tspan>
+ <!-- alternating valid and invalid non-bmp characters -->
+ <tspan>&#128514;&#x90012;&#128514;&#x90012;&#128514;&#x90012;</tspan>
+ <!-- invalid non-bmp characters in rtl -->
+ <tspan direction="rtl">نشاط&#128514;نشاط&#x90012;&#x90012;ن&#x90012;شاط&#128514;نش&#x90012;اط&#x90012;ا</tspan>
+ </text>
+</svg>
+<script>
+test(function() {
+ text.getComputedTextLength();
+ svg.parentElement.removeChild(svg);
+}, 'Text runs with invalid non-bmp characters should not crash.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698