From b1cec84a27e215f474880fd1b61f14b90259cf3c Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 4 Dec 2013 19:15:40 -0800 Subject: [PATCH] Bug 943152 - Tests. r=jgriffin --- js/xpconnect/tests/chrome/test_bug361111.xul | 7 ++++++- js/xpconnect/tests/chrome/test_bug448587.xul | 6 ++++++ testing/mochitest/tests/test_SpecialPowersExtension.html | 7 ++++++- testing/mochitest/tests/test_SpecialPowersExtension2.html | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/js/xpconnect/tests/chrome/test_bug361111.xul b/js/xpconnect/tests/chrome/test_bug361111.xul index a3f25fc381c..4b790ea2d2b 100644 --- a/js/xpconnect/tests/chrome/test_bug361111.xul +++ b/js/xpconnect/tests/chrome/test_bug361111.xul @@ -22,7 +22,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=361111 SimpleTest.waitForExplicitFinish(); document.documentElement.setAttribute("onclick", "%"); is(1, 1, "Good, setting a bogus onclick did not throw."); - SimpleTest.finish(); + + // Bonus test - make sure that flushPrefEnv is appropriately + // called at the end of the test. It would be nice if there were + // somewhere in the harness that this could live, but there isn't. + SpecialPowers.pushPrefEnv({set: [['testing.some_arbitrary_pref', true]]}, + function() { SimpleTest.finish(); }); ]]> diff --git a/js/xpconnect/tests/chrome/test_bug448587.xul b/js/xpconnect/tests/chrome/test_bug448587.xul index db5487deeb5..1b173556d2a 100644 --- a/js/xpconnect/tests/chrome/test_bug448587.xul +++ b/js/xpconnect/tests/chrome/test_bug448587.xul @@ -19,6 +19,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=448587.xul diff --git a/testing/mochitest/tests/test_SpecialPowersExtension2.html b/testing/mochitest/tests/test_SpecialPowersExtension2.html index ac2a7682149..fc77aa82a5b 100644 --- a/testing/mochitest/tests/test_SpecialPowersExtension2.html +++ b/testing/mochitest/tests/test_SpecialPowersExtension2.html @@ -11,6 +11,8 @@