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

Unified Diff: third_party/WebKit/LayoutTests/svg/dom/integer-optional-integer-value-range.html

Issue 2590433002: Stricter float-to-int conversion in SVGIntegerOptionalInteger (Closed)
Patch Set: ...and back to doing things differently. Created 4 years 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/svg/SVGIntegerOptionalInteger.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/dom/integer-optional-integer-value-range.html
diff --git a/third_party/WebKit/LayoutTests/svg/dom/integer-optional-integer-value-range.html b/third_party/WebKit/LayoutTests/svg/dom/integer-optional-integer-value-range.html
new file mode 100644
index 0000000000000000000000000000000000000000..50e408ee2b914c23e7281be4bf0251b90a7ef8df
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/dom/integer-optional-integer-value-range.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
pdr. 2016/12/19 19:42:54 Please don't rewrite this, but for future patches
fs 2016/12/19 19:54:54 The reason for adding a layout test here is becaus
pdr. 2016/12/19 20:01:51 In terms of web exposed behavior, unittests and la
fs 2016/12/19 20:16:23 Yes, that's a large part of it. It also makes sure
+<title>SVGIntegerOptionalInteger value range</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ var element = document.createElementNS('http://www.w3.org/2000/svg', 'feConvolveMatrix');
+ element.setAttribute('order', '2147483648');
+ assert_equals(element.orderX.baseVal, 2147483647);
+
+ element.setAttribute('order', '-2147483649');
+ assert_equals(element.orderX.baseVal, -2147483648);
+}, document.title+', outside range of int.');
+
+test(function() {
+ var element = document.createElementNS('http://www.w3.org/2000/svg', 'feConvolveMatrix');
+ element.setAttribute('order', '2147483578');
+ assert_equals(element.orderX.baseVal, 2147483647);
+}, document.title+', not exactly representable as int.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698