Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!-- Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | - http://creativecommons.org/publicdomain/zero/1.0/ --> |
michael@0 | 3 | <!DOCTYPE HTML> |
michael@0 | 4 | <html> |
michael@0 | 5 | <head> |
michael@0 | 6 | <title>SimpleTest.registerCleanupFunction test</title> |
michael@0 | 7 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 8 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 9 | </head> |
michael@0 | 10 | <body> |
michael@0 | 11 | <script class="testbody" type="text/javascript"> |
michael@0 | 12 | // Not a great example, since we have the pushPrefEnv API to cover |
michael@0 | 13 | // this use case, but I want to be able to test that the cleanup |
michael@0 | 14 | // function gets run, so setting and clearing a pref seems straightforward. |
michael@0 | 15 | function do_cleanup1() { |
michael@0 | 16 | SpecialPowers.clearUserPref("simpletest.cleanup.1"); |
michael@0 | 17 | info("do_cleanup1 run!"); |
michael@0 | 18 | } |
michael@0 | 19 | function do_cleanup2() { |
michael@0 | 20 | SpecialPowers.clearUserPref("simpletest.cleanup.2"); |
michael@0 | 21 | info("do_cleanup2 run!"); |
michael@0 | 22 | } |
michael@0 | 23 | SpecialPowers.setBoolPref("simpletest.cleanup.1", true); |
michael@0 | 24 | SpecialPowers.setBoolPref("simpletest.cleanup.2", true); |
michael@0 | 25 | SimpleTest.registerCleanupFunction(do_cleanup1); |
michael@0 | 26 | SimpleTest.registerCleanupFunction(do_cleanup2); |
michael@0 | 27 | ok(true, "dummy check"); |
michael@0 | 28 | </script> |
michael@0 | 29 | </body> |
michael@0 | 30 | </html> |