Backed out changeset 92b07e6e84bf (bug 1265722) for failing test_animation_actor-lifetime.html because of undefined function InspectorFront. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 17 May 2016 13:50:21 +0200
changeset 297756 d1a574f8a643bba3ebcc5a3d46bece3765842602
parent 297755 036f62007472d4e2ada1564718b617f60cd00d43
child 297757 b4564c057f93c736521672ffa54b23d9b4c92b94
push id76883
push userkwierso@gmail.com
push dateTue, 17 May 2016 21:17:34 +0000
treeherdermozilla-inbound@8082afb19f45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1265722
milestone49.0a1
backs out92b07e6e84bf828040ac5231eafea31c843e0472
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 92b07e6e84bf (bug 1265722) for failing test_animation_actor-lifetime.html because of undefined function InspectorFront. r=backout
devtools/client/framework/toolbox.js
devtools/client/fronts/inspector.js
devtools/client/fronts/styles.js
devtools/client/sourceeditor/test/browser_css_autocompletion.js
devtools/client/sourceeditor/test/browser_editor_autocomplete_events.js
devtools/client/styleeditor/styleeditor-panel.js
devtools/server/actors/highlighters.js
devtools/server/actors/inspector.js
devtools/server/actors/styles.js
devtools/server/actors/stylesheets.js
devtools/server/tests/browser/browser_stylesheets_getTextEmpty.js
devtools/server/tests/browser/browser_stylesheets_nested-iframes.js
devtools/server/tests/browser/head.js
devtools/shared/specs/inspector.js
devtools/shared/specs/styles.js
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -52,17 +52,17 @@ loader.lazyRequireGetter(this, "CommandU
   "devtools/client/shared/developer-toolbar", true);
 loader.lazyRequireGetter(this, "getHighlighterUtils",
   "devtools/client/framework/toolbox-highlighter-utils", true);
 loader.lazyRequireGetter(this, "Hosts",
   "devtools/client/framework/toolbox-hosts", true);
 loader.lazyRequireGetter(this, "Selection",
   "devtools/client/framework/selection", true);
 loader.lazyRequireGetter(this, "InspectorFront",
-  "devtools/client/fronts/inspector", true);
+  "devtools/server/actors/inspector", true);
 loader.lazyRequireGetter(this, "DevToolsUtils",
   "devtools/shared/DevToolsUtils");
 loader.lazyRequireGetter(this, "showDoorhanger",
   "devtools/client/shared/doorhanger", true);
 loader.lazyRequireGetter(this, "createPerformanceFront",
   "devtools/server/actors/performance", true);
 loader.lazyRequireGetter(this, "system",
   "devtools/shared/system");
--- a/devtools/client/fronts/inspector.js
+++ b/devtools/client/fronts/inspector.js
@@ -1,28 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 const Services = require("Services");
 const { Ci } = require("chrome");
-require("devtools/client/fronts/styles");
-require("devtools/client/fronts/highlighters");
 const { ShortLongString } = require("devtools/server/actors/string");
 const {
   Front,
   FrontClassWithSpec,
   custom,
   preEvent,
   types
 } = require("devtools/shared/protocol.js");
 const { makeInfallible } = require("devtools/shared/DevToolsUtils");
 const {
-  inspectorSpec,
   nodeSpec,
   nodeListSpec,
   walkerSpec
 } = require("devtools/shared/specs/inspector");
 const promise = require("promise");
 const { Task } = require("resource://gre/modules/Task.jsm");
 const { Class } = require("sdk/core/heritage");
 const events = require("sdk/event/core");
@@ -923,54 +920,8 @@ const WalkerFront = FrontClassWithSpec(w
       nextSibling: nextSibling,
     };
   }), {
     impl: "_removeNode"
   }),
 });
 
 exports.WalkerFront = WalkerFront;
-
-/**
- * Client side of the inspector actor, which is used to create
- * inspector-related actors, including the walker.
- */
-var InspectorFront = FrontClassWithSpec(inspectorSpec, {
-  initialize: function (client, tabForm) {
-    Front.prototype.initialize.call(this, client);
-    this.actorID = tabForm.inspectorActor;
-
-    // XXX: This is the first actor type in its hierarchy to use the protocol
-    // library, so we're going to self-own on the client side for now.
-    this.manage(this);
-  },
-
-  destroy: function () {
-    delete this.walker;
-    Front.prototype.destroy.call(this);
-  },
-
-  getWalker: custom(function (options = {}) {
-    return this._getWalker(options).then(walker => {
-      this.walker = walker;
-      return walker;
-    });
-  }, {
-    impl: "_getWalker"
-  }),
-
-  getPageStyle: custom(function () {
-    return this._getPageStyle().then(pageStyle => {
-      // We need a walker to understand node references from the
-      // node style.
-      if (this.walker) {
-        return pageStyle;
-      }
-      return this.getWalker().then(() => {
-        return pageStyle;
-      });
-    });
-  }, {
-    impl: "_getPageStyle"
-  })
-});
-
-exports.InspectorFront = InspectorFront;
--- a/devtools/client/fronts/styles.js
+++ b/devtools/client/fronts/styles.js
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
-require("devtools/client/fronts/stylesheets");
 const {
   Front,
   FrontClassWithSpec,
   custom,
   preEvent
 } = require("devtools/shared/protocol.js");
 const {
   pageStyleSpec,
--- a/devtools/client/sourceeditor/test/browser_css_autocompletion.js
+++ b/devtools/client/sourceeditor/test/browser_css_autocompletion.js
@@ -1,16 +1,16 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const CSSCompleter = require("devtools/client/sourceeditor/css-autocompleter");
-const {InspectorFront} = require("devtools/client/fronts/inspector");
+const {InspectorFront} = require("devtools/server/actors/inspector");
 const {TargetFactory} = require("devtools/client/framework/target");
 const { Cc, Ci } = require("chrome");
 
 const CSS_URI = "http://mochi.test:8888/browser/devtools/client/sourceeditor" +
                 "/test/css_statemachine_testcases.css";
 const TESTS_URI = "http://mochi.test:8888/browser/devtools/client" +
                   "/sourceeditor/test/css_autocompletion_tests.json";
 
--- a/devtools/client/sourceeditor/test/browser_editor_autocomplete_events.js
+++ b/devtools/client/sourceeditor/test/browser_editor_autocomplete_events.js
@@ -1,15 +1,15 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-const {InspectorFront} = require("devtools/client/fronts/inspector");
+const {InspectorFront} = require("devtools/server/actors/inspector");
 const {TargetFactory} = require("devtools/client/framework/target");
 const AUTOCOMPLETION_PREF = "devtools.editor.autocomplete";
 const TEST_URI = "data:text/html;charset=UTF-8,<html><body><bar></bar>" +
                  "<div id='baz'></div><body></html>";
 
 const wait = (delay) => new Promise(resolve => setTimeout(resolve, delay));
 
 add_task(function*() {
--- a/devtools/client/styleeditor/styleeditor-panel.js
+++ b/devtools/client/styleeditor/styleeditor-panel.js
@@ -14,20 +14,20 @@ var {Task} = require("resource://gre/mod
 var {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
 var EventEmitter = require("devtools/shared/event-emitter");
 
 Cu.import("resource://devtools/client/styleeditor/StyleEditorUI.jsm");
 /* import-globals-from StyleEditorUtil.jsm */
 Cu.import("resource://devtools/client/styleeditor/StyleEditorUtil.jsm");
 
 loader.lazyGetter(this, "StyleSheetsFront",
-  () => require("devtools/client/fronts/stylesheets").StyleSheetsFront);
+  () => require("devtools/server/actors/stylesheets").StyleSheetsFront);
 
 loader.lazyGetter(this, "StyleEditorFront",
-  () => require("devtools/client/fronts/styleeditor").StyleEditorFront);
+  () => require("devtools/server/actors/styleeditor").StyleEditorFront);
 
 var StyleEditorPanel = function StyleEditorPanel(panelWin, toolbox) {
   EventEmitter.decorate(this);
 
   this._toolbox = toolbox;
   this._target = toolbox.target;
   this._panelWin = panelWin;
   this._panelDoc = panelWin.document;
--- a/devtools/server/actors/highlighters.js
+++ b/devtools/server/actors/highlighters.js
@@ -3,16 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { Ci } = require("chrome");
 
 const EventEmitter = require("devtools/shared/event-emitter");
 const events = require("sdk/event/core");
+const { HighlighterFront, CustomHighlighterFront } = require("devtools/client/fronts/highlighters");
 const protocol = require("devtools/shared/protocol");
 const { Arg, Option, method, RetVal } = protocol;
 const { isWindowIncluded } = require("devtools/shared/layout/utils");
 const { highlighterSpec, customHighlighterSpec } = require("devtools/shared/specs/highlighters");
 const { isXUL, isNodeValid } = require("./highlighters/utils/markup");
 const { SimpleOutlineHighlighter } = require("./highlighters/simple-outline");
 
 const HIGHLIGHTER_PICKED_TIMER = 1000;
--- a/devtools/server/actors/inspector.js
+++ b/devtools/server/actors/inspector.js
@@ -62,30 +62,31 @@ const events = require("sdk/event/core")
 const {Class} = require("sdk/core/heritage");
 const {WalkerSearch} = require("devtools/server/actors/utils/walker-search");
 const {PageStyleActor, getFontPreviewData} = require("devtools/server/actors/styles");
 const {
   HighlighterActor,
   CustomHighlighterActor,
   isTypeRegistered,
 } = require("devtools/server/actors/highlighters");
+const {NodeFront, NodeListFront, WalkerFront} = require("devtools/client/fronts/inspector");
 const {
   isAnonymous,
   isNativeAnonymous,
   isXBLAnonymous,
   isShadowAnonymous,
   getFrameElement
 } = require("devtools/shared/layout/utils");
 const {getLayoutChangesObserver, releaseLayoutChangesObserver} =
   require("devtools/server/actors/layout");
 
 loader.lazyRequireGetter(this, "CSS", "CSS");
 
 const {EventParsers} = require("devtools/shared/event-parsers");
-const {nodeSpec, nodeListSpec, walkerSpec, inspectorSpec} = require("devtools/shared/specs/inspector");
+const {nodeSpec, nodeListSpec, walkerSpec} = require("devtools/shared/specs/inspector");
 
 const FONT_FAMILY_PREVIEW_TEXT = "The quick brown fox jumps over the lazy dog";
 const FONT_FAMILY_PREVIEW_TEXT_SIZE = 20;
 const PSEUDO_CLASSES = [":hover", ":active", ":focus"];
 const HIDDEN_CLASS = "__fx-devtools-hide-shortcut__";
 const XHTML_NS = "http://www.w3.org/1999/xhtml";
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 const IMAGE_FETCHING_TIMEOUT = 500;
@@ -753,16 +754,18 @@ var NodeListActor = exports.NodeListActo
     let items = Array.prototype.slice.call(this.nodeList, start, end)
       .map(item => this.walker._ref(item));
     return this.walker.attachElements(items);
   },
 
   release: function () {}
 });
 
+exports.NodeListFront = NodeListFront;
+
 /**
  * Server side of the DOM walker.
  */
 var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
   /**
    * Create the WalkerActor
    * @param DebuggerServerConnection conn
    *    The server connection.
@@ -2539,21 +2542,25 @@ var WalkerActor = protocol.ActorClassWit
       }
       obj = obj[name];
     }
 
     return this.attachElement(obj);
   },
 });
 
+exports.WalkerFront = WalkerFront;
+
 /**
  * Server side of the inspector actor, which is used to create
  * inspector-related actors, including the walker.
  */
-var InspectorActor = exports.InspectorActor = protocol.ActorClassWithSpec(inspectorSpec, {
+var InspectorActor = exports.InspectorActor = protocol.ActorClass({
+  typeName: "inspector",
+
   initialize: function (conn, tabActor) {
     protocol.Actor.prototype.initialize.call(this, conn);
     this.tabActor = tabActor;
   },
 
   destroy: function () {
     protocol.Actor.prototype.destroy.call(this);
 
@@ -2569,17 +2576,17 @@ var InspectorActor = exports.InspectorAc
   disconnect: function () {
     this.destroy();
   },
 
   get window() {
     return this.tabActor.window;
   },
 
-  getWalker: function (options = {}) {
+  getWalker: method(function (options = {}) {
     if (this._walkerPromise) {
       return this._walkerPromise;
     }
 
     let deferred = promise.defer();
     this._walkerPromise = deferred.promise;
 
     let window = this.window;
@@ -2597,121 +2604,199 @@ var InspectorActor = exports.InspectorAc
 
     if (window.document.readyState === "loading") {
       window.addEventListener("DOMContentLoaded", domReady, true);
     } else {
       domReady();
     }
 
     return this._walkerPromise;
-  },
-
-  getPageStyle: function () {
+  }, {
+    request: {
+      options: Arg(0, "nullable:json")
+    },
+    response: {
+      walker: RetVal("domwalker")
+    }
+  }),
+
+  getPageStyle: method(function () {
     if (this._pageStylePromise) {
       return this._pageStylePromise;
     }
 
     this._pageStylePromise = this.getWalker().then(walker => {
       let pageStyle = PageStyleActor(this);
       this.manage(pageStyle);
       return pageStyle;
     });
     return this._pageStylePromise;
-  },
+  }, {
+    request: {},
+    response: {
+      pageStyle: RetVal("pagestyle")
+    }
+  }),
 
   /**
    * The most used highlighter actor is the HighlighterActor which can be
    * conveniently retrieved by this method.
    * The same instance will always be returned by this method when called
    * several times.
    * The highlighter actor returned here is used to highlighter elements's
    * box-models from the markup-view, layout-view, console, debugger, ... as
    * well as select elements with the pointer (pick).
    *
    * @param {Boolean} autohide Optionally autohide the highlighter after an
    * element has been picked
    * @return {HighlighterActor}
    */
-  getHighlighter: function (autohide) {
+  getHighlighter: method(function (autohide) {
     if (this._highlighterPromise) {
       return this._highlighterPromise;
     }
 
     this._highlighterPromise = this.getWalker().then(walker => {
       let highlighter = HighlighterActor(this, autohide);
       this.manage(highlighter);
       return highlighter;
     });
     return this._highlighterPromise;
-  },
+  }, {
+    request: {
+      autohide: Arg(0, "boolean")
+    },
+    response: {
+      highligter: RetVal("highlighter")
+    }
+  }),
 
   /**
    * If consumers need to display several highlighters at the same time or
    * different types of highlighters, then this method should be used, passing
    * the type name of the highlighter needed as argument.
    * A new instance will be created everytime the method is called, so it's up
    * to the consumer to release it when it is not needed anymore
    *
    * @param {String} type The type of highlighter to create
    * @return {Highlighter} The highlighter actor instance or null if the
    * typeName passed doesn't match any available highlighter
    */
-  getHighlighterByType: function (typeName) {
+  getHighlighterByType: method(function (typeName) {
     if (isTypeRegistered(typeName)) {
       return CustomHighlighterActor(this, typeName);
     }
     return null;
-  },
+  }, {
+    request: {
+      typeName: Arg(0)
+    },
+    response: {
+      highlighter: RetVal("nullable:customhighlighter")
+    }
+  }),
 
   /**
    * Get the node's image data if any (for canvas and img nodes).
    * Returns an imageData object with the actual data being a LongStringActor
    * and a size json object.
    * The image data is transmitted as a base64 encoded png data-uri.
    * The method rejects if the node isn't an image or if the image is missing
    *
    * Accepts a maxDim request parameter to resize images that are larger. This
    * is important as the resizing occurs server-side so that image-data being
    * transfered in the longstring back to the client will be that much smaller
    */
-  getImageDataFromURL: function(url, maxDim) {
+  getImageDataFromURL: method(function(url, maxDim) {
     let img = new this.window.Image();
     img.src = url;
 
     // imageToImageData waits for the image to load.
     return imageToImageData(img, maxDim).then(imageData => {
       return {
         data: LongStringActor(this.conn, imageData.data),
         size: imageData.size
       };
     });
-  },
+  }, {
+    request: {url: Arg(0), maxDim: Arg(1, "nullable:number")},
+    response: RetVal("imageData")
+  }),
 
   /**
    * Resolve a URL to its absolute form, in the scope of a given content window.
    * @param {String} url.
    * @param {NodeActor} node If provided, the owner window of this node will be
    * used to resolve the URL. Otherwise, the top-level content window will be
    * used instead.
    * @return {String} url.
    */
-  resolveRelativeURL: function (url, node) {
+  resolveRelativeURL: method(function (url, node) {
     let document = isNodeDead(node)
                    ? this.window.document
                    : nodeDocument(node.rawNode);
 
     if (!document) {
       return url;
     }
 
     let baseURI = Services.io.newURI(document.location.href, null, null);
     return Services.io.newURI(url, null, baseURI).spec;
-  }
+  }, {
+    request: {url: Arg(0, "string"), node: Arg(1, "nullable:domnode")},
+    response: {value: RetVal("string")}
+  })
 });
 
+/**
+ * Client side of the inspector actor, which is used to create
+ * inspector-related actors, including the walker.
+ */
+var InspectorFront = protocol.FrontClass(InspectorActor, {
+  initialize: function (client, tabForm) {
+    protocol.Front.prototype.initialize.call(this, client);
+    this.actorID = tabForm.inspectorActor;
+
+    // XXX: This is the first actor type in its hierarchy to use the protocol
+    // library, so we're going to self-own on the client side for now.
+    this.manage(this);
+  },
+
+  destroy: function () {
+    delete this.walker;
+    protocol.Front.prototype.destroy.call(this);
+  },
+
+  getWalker: protocol.custom(function (options = {}) {
+    return this._getWalker(options).then(walker => {
+      this.walker = walker;
+      return walker;
+    });
+  }, {
+    impl: "_getWalker"
+  }),
+
+  getPageStyle: protocol.custom(function () {
+    return this._getPageStyle().then(pageStyle => {
+      // We need a walker to understand node references from the
+      // node style.
+      if (this.walker) {
+        return pageStyle;
+      }
+      return this.getWalker().then(() => {
+        return pageStyle;
+      });
+    });
+  }, {
+    impl: "_getPageStyle"
+  })
+});
+
+exports.InspectorFront = InspectorFront;
+
 // Exported for test purposes.
 exports._documentWalker = DocumentWalker;
 
 function nodeDocument(node) {
   if (Cu.isDeadWrapper(node)) {
     return null;
   }
   return node.ownerDocument ||
--- a/devtools/server/actors/styles.js
+++ b/devtools/server/actors/styles.js
@@ -2,21 +2,22 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const {Cc, Ci} = require("chrome");
 const promise = require("promise");
 const protocol = require("devtools/shared/protocol");
+const events = require("sdk/event/core");
+const {PageStyleFront, StyleRuleFront} = require("devtools/client/fronts/styles"); // eslint-disable-line
 const {LongStringActor} = require("devtools/server/actors/string");
 const {getDefinedGeometryProperties} = require("devtools/server/actors/highlighters/geometry-editor");
 const {parseDeclarations} = require("devtools/client/shared/css-parsing-utils");
 const {Task} = require("resource://gre/modules/Task.jsm");
-const events = require("sdk/event/core");
 
 // This will also add the "stylesheet" actor type for protocol.js to recognize
 const {UPDATE_PRESERVING_RULES, UPDATE_GENERAL} = require("devtools/server/actors/stylesheets");
 const {pageStyleSpec, styleRuleSpec} = require("devtools/shared/specs/styles");
 
 loader.lazyRequireGetter(this, "CSS", "CSS");
 loader.lazyGetter(this, "CssLogic", () => require("devtools/shared/inspector/css-logic").CssLogic);
 loader.lazyGetter(this, "DOMUtils", () => Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils));
--- a/devtools/server/actors/stylesheets.js
+++ b/devtools/server/actors/stylesheets.js
@@ -9,16 +9,18 @@ var Services = require("Services");
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/NetUtil.jsm");
 Cu.import("resource://gre/modules/FileUtils.jsm");
 Cu.import("resource://gre/modules/Task.jsm");
 
 const promise = require("promise");
 const events = require("sdk/event/core");
+const {OriginalSourceFront, MediaRuleFront, StyleSheetFront,
+       StyleSheetsFront} = require("devtools/client/fronts/stylesheets");
 const protocol = require("devtools/shared/protocol");
 const {Arg, Option, method, RetVal, types} = protocol;
 const {LongStringActor, ShortLongString} = require("devtools/server/actors/string");
 const {fetch} = require("devtools/shared/DevToolsUtils");
 const {listenOnce} = require("devtools/shared/async-utils");
 const {originalSourceSpec, mediaRuleSpec, styleSheetSpec,
        styleSheetsSpec} = require("devtools/shared/specs/stylesheets");
 const {SourceMapConsumer} = require("source-map");
@@ -753,16 +755,18 @@ var StyleSheetActor = protocol.ActorClas
     }
 
     events.emit(this, "style-applied", kind, this);
   }
 })
 
 exports.StyleSheetActor = StyleSheetActor;
 
+exports.StyleSheetFront = StyleSheetFront;
+
 /**
  * Creates a StyleSheetsActor. StyleSheetsActor provides remote access to the
  * stylesheets of a document.
  */
 var StyleSheetsActor = protocol.ActorClassWithSpec(styleSheetsSpec, {
   /**
    * The window we work with, taken from the parent actor.
    */
@@ -944,16 +948,18 @@ var StyleSheetsActor = protocol.ActorCla
 
     let actor = this.parentActor.createStyleSheetActor(style.sheet);
     return actor;
   }
 });
 
 exports.StyleSheetsActor = StyleSheetsActor;
 
+exports.StyleSheetsFront = StyleSheetsFront;
+
 /**
  * Normalize multiple relative paths towards the base paths on the right.
  */
 function normalize(...aURLs) {
   let base = Services.io.newURI(aURLs.pop(), null, null);
   let url;
   while ((url = aURLs.pop())) {
     base = Services.io.newURI(url, null, base);
--- a/devtools/server/tests/browser/browser_stylesheets_getTextEmpty.js
+++ b/devtools/server/tests/browser/browser_stylesheets_getTextEmpty.js
@@ -1,17 +1,17 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test that StyleSheetActor.getText handles empty text correctly.
 
-const {StyleSheetsFront} = require("devtools/client/fronts/stylesheets");
+const {StyleSheetsFront} = require("devtools/server/actors/stylesheets");
 
 const CONTENT = "<style>body { background-color: #f0c; }</style>";
 const TEST_URI = "data:text/html;charset=utf-8," + encodeURIComponent(CONTENT);
 
 add_task(function*() {
   yield addTab(TEST_URI);
 
   info("Initialising the debugger server and client.");
--- a/devtools/server/tests/browser/browser_stylesheets_nested-iframes.js
+++ b/devtools/server/tests/browser/browser_stylesheets_nested-iframes.js
@@ -2,17 +2,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test that StyleSheetsActor.getStyleSheets() works if an iframe does not have
 // a content document.
 
-const {StyleSheetsFront} = require("devtools/client/fronts/stylesheets");
+const {StyleSheetsFront} = require("devtools/server/actors/stylesheets");
 
 add_task(function*() {
   let browser = yield addTab(MAIN_DOMAIN + "stylesheets-nested-iframes.html");
   let doc = browser.contentDocument;
 
   info("Initialising the debugger server and client.");
   initDebuggerServer();
   let client = new DebuggerClient(DebuggerServer.connectPipe());
--- a/devtools/server/tests/browser/head.js
+++ b/devtools/server/tests/browser/head.js
@@ -45,17 +45,17 @@ var addTab = Task.async(function* (url) 
     waitForFocus(resolve, content, isBlank);
   });
 
   return tab.linkedBrowser;
 });
 
 function* initAnimationsFrontForUrl(url) {
   const {AnimationsFront} = require("devtools/server/actors/animation");
-  const {InspectorFront} = require("devtools/client/fronts/inspector");
+  const {InspectorFront} = require("devtools/server/actors/inspector");
 
   yield addTab(url);
 
   initDebuggerServer();
   let client = new DebuggerClient(DebuggerServer.connectPipe());
   let form = yield connectDebuggerClient(client);
   let inspector = InspectorFront(client, form);
   let walker = yield inspector.getWalker();
--- a/devtools/shared/specs/inspector.js
+++ b/devtools/shared/specs/inspector.js
@@ -5,18 +5,16 @@
 
 const {
   Arg,
   Option,
   RetVal,
   generateActorSpec,
   types
 } = require("devtools/shared/protocol");
-require("devtools/shared/specs/styles");
-require("devtools/shared/specs/highlighters");
 
 types.addDictType("imageData", {
   // The image data
   data: "nullable:longstring",
   // The original image dimensions
   size: "json"
 });
 
@@ -415,55 +413,8 @@ const walkerSpec = generateActorSpec({
       response: {
         node: RetVal("nullable:disconnectedNode")
       }
     }
   }
 });
 
 exports.walkerSpec = walkerSpec;
-
-const inspectorSpec = generateActorSpec({
-  typeName: "inspector",
-
-  methods: {
-    getWalker: {
-      request: {
-        options: Arg(0, "nullable:json")
-      },
-      response: {
-        walker: RetVal("domwalker")
-      }
-    },
-    getPageStyle: {
-      request: {},
-      response: {
-        pageStyle: RetVal("pagestyle")
-      }
-    },
-    getHighlighter: {
-      request: {
-        autohide: Arg(0, "boolean")
-      },
-      response: {
-        highligter: RetVal("highlighter")
-      }
-    },
-    getHighlighterByType: {
-      request: {
-        typeName: Arg(0)
-      },
-      response: {
-        highlighter: RetVal("nullable:customhighlighter")
-      }
-    },
-    getImageDataFromURL: {
-      request: {url: Arg(0), maxDim: Arg(1, "nullable:number")},
-      response: RetVal("imageData")
-    },
-    resolveRelativeURL: {
-      request: {url: Arg(0, "string"), node: Arg(1, "nullable:domnode")},
-      response: {value: RetVal("string")}
-    }
-  }
-});
-
-exports.inspectorSpec = inspectorSpec;
--- a/devtools/shared/specs/styles.js
+++ b/devtools/shared/specs/styles.js
@@ -5,17 +5,17 @@
 
 const {
   Arg,
   Option,
   RetVal,
   generateActorSpec,
   types
 } = require("devtools/shared/protocol.js");
-require("devtools/shared/specs/stylesheets");
+require("devtools/shared/specs/stylesheets.js");
 
 // Predeclare the domnode actor type for use in requests.
 types.addActorType("domnode");
 
 // Predeclare the domstylerule actor type
 types.addActorType("domstylerule");
 
 /**