summaryrefslogtreecommitdiff
path: root/testing/resources/javascript/consts.in
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-03 10:15:30 -0800
committerTom Sepez <tsepez@chromium.org>2016-03-03 10:15:30 -0800
commitd8741afa1c3f31723ec62131d1bb8a78081cd1e4 (patch)
tree7100066c660ebc01a86b1d8c372d1c6419427c12 /testing/resources/javascript/consts.in
parentf3e3af606958855c9345dd3aba13e75f0b879193 (diff)
downloadpdfium-d8741afa1c3f31723ec62131d1bb8a78081cd1e4.tar.xz
Add JS tests for global const equality.
Add these tests before fixing bug 419. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1761923002 .
Diffstat (limited to 'testing/resources/javascript/consts.in')
-rw-r--r--testing/resources/javascript/consts.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/resources/javascript/consts.in b/testing/resources/javascript/consts.in
index a717ec873a..6fb82158e3 100644
--- a/testing/resources/javascript/consts.in
+++ b/testing/resources/javascript/consts.in
@@ -66,6 +66,16 @@ function doGlobalArrayTest(props) {
}
}
+function doEqualityTests() {
+ app.alert("String equality test (==): " +
+ (IDS_GREATER_THAN == IDS_GREATER_THAN));
+ app.alert("String equality test (===): " +
+ (IDS_GREATER_THAN === IDS_GREATER_THAN));
+ app.alert("Array equality test (==): " +
+ (RE_PHONE_COMMIT == RE_PHONE_COMMIT));
+ app.alert("Array equality test (===): " +
+ (RE_PHONE_COMMIT === RE_PHONE_COMMIT));
+}
try {
doTest("border", ["s", "b", "d", "i", "u", "nonesuch"]);
@@ -112,6 +122,7 @@ try {
"RE_SSN_COMMIT"
]);
+ doEqualityTests();
} catch (e) {
app.alert("ERROR: " + e.toString());
}