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

Unified Diff: testing/resources/bug_620428.pdf

Issue 2218473002: Beef up timer cancellation tests (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nothing is not a good expected result Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/resources/bug_620428.in ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/resources/bug_620428.pdf
diff --git a/testing/resources/bug_620428.pdf b/testing/resources/bug_620428.pdf
index ff625b7a2e387d4a2d67b1b14a2667bc18466075..e53ed50e24bf811c8b476c964b0249ae9473a0e5 100644
--- a/testing/resources/bug_620428.pdf
+++ b/testing/resources/bug_620428.pdf
@@ -74,8 +74,22 @@ function fireInterval() {
}
var timer = app.setTimeOut("fireTimeOut()", 3000);
var interval = app.setInterval("fireInterval()", 1000);
+// Clear timers before they fire.
app.clearTimeOut(timer);
app.clearInterval(interval);
+// Check that clearing a cleared timer is ok.
+app.clearTimeOut(timer);
+app.clearInterval(interval);
+// Check that invoking the wrong clear method is ok
+var timer = app.setTimeOut("fireTimeOut()", 3000);
+var interval = app.setInterval("fireInterval()", 1000);
+app.clearTimeOut(interval);
+app.clearInterval(timer);
+// Check that clearing a non-timer is ok.
+app.clearTimeOut({"size": 42});
+app.clearInterval({"size": 42});
+// Be sure all of this code ran to completion.
+app.alert("done");
endstream
endobj
xref
@@ -135,5 +149,5 @@ trailer <<
/Root 1 0 R
>>
startxref
-1135
+1655
%%EOF
« no previous file with comments | « testing/resources/bug_620428.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698