Bug 1034512 - Part 11: Simplify the browser_theme.js test. r=jwalker
authorPatrick Brosset <pbrosset@mozilla.com>
Mon, 26 Jan 2015 02:37:00 -0500
changeset 239156 9ad5627c881dc4228641d9575aabaf51ccf31d09
parent 239155 dc0d932d2ecf5367cf6414adee767efa236c12f7
child 239157 9201029f4d4862aac596cfc7f93ef41e3800621e
push id487
push userbcampen@mozilla.com
push dateMon, 26 Jan 2015 23:32:56 +0000
reviewersjwalker
bugs1034512
milestone38.0a1
Bug 1034512 - Part 11: Simplify the browser_theme.js test. r=jwalker
browser/devtools/shared/test/browser_theme.js
--- a/browser/devtools/shared/test/browser_theme.js
+++ b/browser/devtools/shared/test/browser_theme.js
@@ -1,31 +1,21 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that theme utilities work
 
-let { Cu } = devtools.require("chrome");
-let { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
-let { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
-let { getColor, getTheme, setTheme } = devtools.require("devtools/shared/theme");
+let {getColor, getTheme, setTheme} = devtools.require("devtools/shared/theme");
 
 function test() {
-  waitForExplicitFinish();
   testGetTheme();
   testSetTheme();
   testGetColor();
   testColorExistence();
-  endTests();
-}
-
-function endTests() {
-  gDevTools = Services = null;
-  finish();
 }
 
 function testGetTheme () {
   let originalTheme = getTheme();
   ok(originalTheme, "has some theme to start with.");
   Services.prefs.setCharPref("devtools.theme", "light");
   is(getTheme(), "light", "getTheme() correctly returns light theme");
   Services.prefs.setCharPref("devtools.theme", "dark");