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

Side by Side Diff: testing/resources/javascript/consts.in

Issue 1761923002: Add JS tests for global const equality. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typos. Created 4 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | testing/resources/javascript/consts_expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {{header}} 1 {{header}}
2 {{object 1 0}} << 2 {{object 1 0}} <<
3 /Type /Catalog 3 /Type /Catalog
4 /Pages 2 0 R 4 /Pages 2 0 R
5 /OpenAction 10 0 R 5 /OpenAction 10 0 R
6 >> 6 >>
7 endobj 7 endobj
8 {{object 2 0}} << 8 {{object 2 0}} <<
9 /Type /Pages 9 /Type /Pages
10 /Count 1 10 /Count 1
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 function doGlobalArrayTest(props) { 59 function doGlobalArrayTest(props) {
60 try { 60 try {
61 for (var i = 0; i < props.length; ++i) { 61 for (var i = 0; i < props.length; ++i) {
62 app.alert(props[i] + " is\n " + eval(props[i]).join(",\n ")); 62 app.alert(props[i] + " is\n " + eval(props[i]).join(",\n "));
63 } 63 }
64 } catch (e) { 64 } catch (e) {
65 app.alert("ERROR: " + e.toString()); 65 app.alert("ERROR: " + e.toString());
66 } 66 }
67 } 67 }
68 68
69 function doEqualityTests() {
70 app.alert("String equality test (==): " +
71 (IDS_GREATER_THAN == IDS_GREATER_THAN));
72 app.alert("String equality test (===): " +
73 (IDS_GREATER_THAN === IDS_GREATER_THAN));
74 app.alert("Array equality test (==): " +
75 (RE_PHONE_COMMIT == RE_PHONE_COMMIT));
76 app.alert("Array equality test (===): " +
77 (RE_PHONE_COMMIT === RE_PHONE_COMMIT));
78 }
69 79
70 try { 80 try {
71 doTest("border", ["s", "b", "d", "i", "u", "nonesuch"]); 81 doTest("border", ["s", "b", "d", "i", "u", "nonesuch"]);
72 doTest("display", ["visible", "hidden", "noPrint", "noView", "nonesuch"]); 82 doTest("display", ["visible", "hidden", "noPrint", "noView", "nonesuch"]);
73 doTest("font", ["Times", "TimesB", "TimesI", "TimesBI", "Helv", "HelvB", 83 doTest("font", ["Times", "TimesB", "TimesI", "TimesBI", "Helv", "HelvB",
74 "HelvI", "HelvBI", "Cour", "CourB", "CourI", "CourBI", 84 "HelvI", "HelvBI", "Cour", "CourB", "CourI", "CourBI",
75 "Symbol", "ZapfD", "Nonesuch"]); 85 "Symbol", "ZapfD", "Nonesuch"]);
76 86
77 doTest("highlight", ["n", "i", "p", "o", "nonesuch"]); 87 doTest("highlight", ["n", "i", "p", "o", "nonesuch"]);
78 doTest("position", ["textOnly", "iconOnly", "iconTextV", "textIconV", 88 doTest("position", ["textOnly", "iconOnly", "iconTextV", "textIconV",
(...skipping 26 matching lines...) Expand all
105 "RE_ZIP_ENTRY", 115 "RE_ZIP_ENTRY",
106 "RE_ZIP_COMMIT", 116 "RE_ZIP_COMMIT",
107 "RE_ZIP4_ENTRY", 117 "RE_ZIP4_ENTRY",
108 "RE_ZIP4_COMMIT", 118 "RE_ZIP4_COMMIT",
109 "RE_PHONE_ENTRY", 119 "RE_PHONE_ENTRY",
110 "RE_PHONE_COMMIT", 120 "RE_PHONE_COMMIT",
111 "RE_SSN_ENTRY", 121 "RE_SSN_ENTRY",
112 "RE_SSN_COMMIT" 122 "RE_SSN_COMMIT"
113 ]); 123 ]);
114 124
125 doEqualityTests();
115 } catch (e) { 126 } catch (e) {
116 app.alert("ERROR: " + e.toString()); 127 app.alert("ERROR: " + e.toString());
117 } 128 }
118 endstream 129 endstream
119 endobj 130 endobj
120 {{xref}} 131 {{xref}}
121 trailer << 132 trailer <<
122 /Root 1 0 R 133 /Root 1 0 R
123 >> 134 >>
124 {{startxref}} 135 {{startxref}}
125 %%EOF 136 %%EOF
126 137
OLDNEW
« no previous file with comments | « no previous file | testing/resources/javascript/consts_expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698