From 594428b18f774dead8c5f137a97c173d6079d65c Mon Sep 17 00:00:00 2001 From: Kumar McMillan Date: Tue, 13 Dec 2011 17:28:09 -0600 Subject: [PATCH] Cleaner teardown for app runtime JS tests --- media/js/zamboni/tests/appruntime_tests.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/media/js/zamboni/tests/appruntime_tests.js b/media/js/zamboni/tests/appruntime_tests.js index 6dd3b0075b..5a815d1b62 100644 --- a/media/js/zamboni/tests/appruntime_tests.js +++ b/media/js/zamboni/tests/appruntime_tests.js @@ -4,6 +4,7 @@ var runtimePitchFixture = { this.visitor = z.Storage('visitor'); this._firefox = z.browser.firefox; this._key = 'seen_appruntime_pitch'; + this._app_runtime = z.capabilities.app_runtime; this._seen_pitch = this.visitor.get(this._key); // The style="display: none" is getting destroyed in the sandbox. WTH. @@ -25,7 +26,8 @@ var runtimePitchFixture = { initBanners(this.sandbox); }, teardown: function() { - this._firefox = z.browser.firefox; + z.browser.firefox = this._firefox; + z.capabilities.app_runtime = this._app_runtime; this.visitor.set(this._key, this._seen_pitch); this.sandbox.remove(); },