diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-18 21:58:01 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-18 21:58:01 +0000 |
commit | 7203104c34853f1b4d61027ea0f96c8b4b85f2bf (patch) | |
tree | a898db850b4ee9d850022ec258ee0d84eab7c032 /testing/resources/javascript/document_props.in | |
parent | 1ee77bd42da61a91900e669f21d7041c1b8bc3c9 (diff) | |
download | pdfium-7203104c34853f1b4d61027ea0f96c8b4b85f2bf.tar.xz |
Try assigning more kinds of values to doc props
Change-Id: I99b28f5f047f9043bd95f76f17970d1979276d63
Reviewed-on: https://pdfium-review.googlesource.com/c/44310
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'testing/resources/javascript/document_props.in')
-rw-r--r-- | testing/resources/javascript/document_props.in | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/testing/resources/javascript/document_props.in b/testing/resources/javascript/document_props.in index efc8e4406f..fa7d92a165 100644 --- a/testing/resources/javascript/document_props.in +++ b/testing/resources/javascript/document_props.in @@ -119,11 +119,11 @@ function testGetProps(props) { } } -function testSetProps(props) { - app.alert('*** Setting properties ***'); +function testSetProps(props, value) { + app.alert('*** Setting properties to ' + value + ' ***'); for (var i = 0; i < props.length; ++i) { try { - var expr1 = "this." + props[i] + ' = 3;' + var expr1 = "this." + props[i] + ' = ' + value + ';' app.alert(expr1 + " yields " + eval(expr1)); } catch (e) { app.alert("ERROR: " + e.toString()); @@ -132,7 +132,12 @@ function testSetProps(props) { } testGetProps(document_props); -testSetProps(document_props); +testSetProps(document_props, 'true'); +testSetProps(document_props, 'false'); +testSetProps(document_props, '["red", 0, "blue", 42]'); +testSetProps(document_props, '{"red": 0, "blue": 42}'); +testSetProps(document_props, '"red"'); +testSetProps(document_props, '3'); testGetProps(document_props); endstream endobj |