summaryrefslogtreecommitdiff
path: root/testing/resources/javascript/document_props.in
diff options
context:
space:
mode:
Diffstat (limited to 'testing/resources/javascript/document_props.in')
-rw-r--r--testing/resources/javascript/document_props.in13
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