summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ward <patrick@endlessm.com>2014-09-16 14:09:25 -0700
committerPatrick Ward <patrick@endlessm.com>2014-09-16 14:18:09 -0700
commitf767524d59213a2aeee31295fdb58b16012cc76a (patch)
tree995c5c5c11c718407dcb7bfd732e87c8f11f0acd
parent436aed64ea44a4d7901693cc83fce4d10bf6c51e (diff)
Change test in testWebActions
When calling app.quit(), the hold count on the application is ignored, which causes undefined behavior when the application's window still thinks it has a hold on the application and control is returned to the MainLoop. This patch changes the way that applications are quit in testWebActions by calling destroy() on the application's window, which decrements the hold count on the application and implicitly causes the application to close. [endlessm/eos-sdk#1881]
-rw-r--r--test/webhelper/testWebActions.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/webhelper/testWebActions.js b/test/webhelper/testWebActions.js
index b2ddaf0..c543a43 100644
--- a/test/webhelper/testWebActions.js
+++ b/test/webhelper/testWebActions.js
@@ -48,7 +48,9 @@ describe("Web Actions Bindings", function() {
application_id: id_string
});
webActionSpy = jasmine.createSpy('quitAction').and.callFake(function() {
- app.quit();
+ // Calls destroy on the applications window, which decrements the hold count on the
+ // application and implicitly causes the application to close.
+ app.win.destroy();
});
});