summaryrefslogtreecommitdiff
path: root/testing/resources/javascript/document_props.in
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-02 12:59:05 -0800
committerTom Sepez <tsepez@chromium.org>2015-03-02 12:59:05 -0800
commit3a83266acee37e99832adaf1337c6b3ab7559f50 (patch)
tree8700b04028864100e2618a72e4a9f52a6bc2f224 /testing/resources/javascript/document_props.in
parentfb3eea5323bf59884659510a6743037cc1d546cd (diff)
downloadpdfium-3a83266acee37e99832adaf1337c6b3ab7559f50.tar.xz
Merge to XFA: Return error information from pdfium to JS.
Cherry-pick from b720d0a14601f1496ef15297bc46d401f5a2a890 + Manually resolve merge conflicts + Fix more IWYU to fix compile. Original Review URL: https://codereview.chromium.org/963193003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/971013002
Diffstat (limited to 'testing/resources/javascript/document_props.in')
-rw-r--r--testing/resources/javascript/document_props.in30
1 files changed, 15 insertions, 15 deletions
diff --git a/testing/resources/javascript/document_props.in b/testing/resources/javascript/document_props.in
index 8ab7e3d566..c628fafad2 100644
--- a/testing/resources/javascript/document_props.in
+++ b/testing/resources/javascript/document_props.in
@@ -105,27 +105,27 @@ var document_props = [
];
function testGetProps(props) {
- try {
- app.alert('*** Getting properties ***');
- for (var i = 0; i < props.length; ++i) {
- var expr1 = "this." + props[i];
- var expr2 = "typeof " + expr1;
- app.alert(expr1 + " is " + eval(expr2) + ' ' + eval(expr1));
+ app.alert('*** Getting properties ***');
+ for (var i = 0; i < props.length; ++i) {
+ try {
+ var expr1 = "this." + props[i];
+ var expr2 = "typeof " + expr1;
+ app.alert(expr1 + " is " + eval(expr2) + ' ' + eval(expr1));
+ } catch (e) {
+ app.alert("ERROR: " + e.toString());
}
- } catch (e) {
- app.alert("ERROR: " + e.toString());
}
}
function testSetProps(props) {
- try {
- app.alert('*** Setting properties ***');
- for (var i = 0; i < props.length; ++i) {
- var expr1 = "this." + props[i] + ' = 3;'
- app.alert(expr1 + " yields " + eval(expr1));
+ app.alert('*** Setting properties ***');
+ for (var i = 0; i < props.length; ++i) {
+ try {
+ var expr1 = "this." + props[i] + ' = 3;'
+ app.alert(expr1 + " yields " + eval(expr1));
+ } catch (e) {
+ app.alert("ERROR: " + e.toString());
}
- } catch (e) {
- app.alert("ERROR: " + e.toString());
}
}