summaryrefslogtreecommitdiff
path: root/testing/resources/javascript/bug_361.in
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-14 12:24:50 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-14 12:24:50 -0800
commit652bd5f333145c39b2e14eee49c654d9501beebf (patch)
tree61ebc7d949079395e60613481ce7188edcf68cf6 /testing/resources/javascript/bug_361.in
parent32b639de35f905a5e5559f305d9032cde5ae5c77 (diff)
downloadpdfium-652bd5f333145c39b2e14eee49c654d9501beebf.tar.xz
Merge to XFA: Additional test cases for bug_361
Original Review URL: https://codereview.chromium.org/1582383002 . (cherry picked from commit 1a82d5c28be2ebdb7524a7249e43026546d0ebf0) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1590053002 .
Diffstat (limited to 'testing/resources/javascript/bug_361.in')
-rw-r--r--testing/resources/javascript/bug_361.in20
1 files changed, 19 insertions, 1 deletions
diff --git a/testing/resources/javascript/bug_361.in b/testing/resources/javascript/bug_361.in
index 34fde70fe2..f98ef829f2 100644
--- a/testing/resources/javascript/bug_361.in
+++ b/testing/resources/javascript/bug_361.in
@@ -50,11 +50,13 @@ function testField(x) {
var y = field.value;
app.alert("Answer for \"" + x + "\" is: " + typeof(y) + " " + y);
}
+testField("");
testField("goats");
testField("b4");
testField("b4.5");
testField("4x");
testField("4.5x");
+testField(4);
testField("4");
testField(" 4");
testField("4 ");
@@ -63,15 +65,25 @@ testField("4 3 2 1");
testField("-4");
testField("23.00000001");
testField("23.00000000000000001");
+testField(40000000000000000000000000);
+testField("40000000000000000000000000");
testField("25,5");
testField("1e+5");
testField("1e5");
testField("1e-5");
testField("-1e-5");
testField("1.2e5");
-testField("NAN");
+testField(Infinity);
+testField("Infinity");
+testField("INFINITY");
testField("INF");
+testField(NaN);
+testField("NaN");
+testField("NAN");
testField("0x100");
+testField("0x100.1");
+testField("0x100,1");
+testField("0x100x1");
testField("123x6");
testField("123xy6");
testField("123.y6");
@@ -81,6 +93,12 @@ testField("1-3");
testField("1+3");
testField("1.-3");
testField("1.+3");
+testField([1, 2, 3, 4]);
+testField("[1, 2, 3, 4]");
+testField({a: 1, b: 2});
+testField("{a: 1, b: 2}");
+testField(function(x) { return x+1; });
+testField("function(x) { return x+1; }");
endstream
endobj
{{xref}}