mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Backed out changeset 7e53a3cf73b5
This commit is contained in:
parent
4c0ab0af9b
commit
28b18e8b1f
@ -791,12 +791,6 @@ var InspectorUI = {
|
||||
*/
|
||||
openInspectorUI: function IUI_openInspectorUI(aNode)
|
||||
{
|
||||
// InspectorUI is already up and running. Lock a node if asked (via context).
|
||||
if (this.treeLoaded && this.highlighter && aNode) {
|
||||
this.inspectNode(aNode);
|
||||
this.stopInspecting();
|
||||
return;
|
||||
}
|
||||
// Observer used to inspect the specified element from content after the
|
||||
// inspector UI has been opened.
|
||||
function inspectObserver(aElement) {
|
||||
|
@ -38,7 +38,6 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
let doc;
|
||||
let salutation;
|
||||
let closing;
|
||||
|
||||
function createDocument()
|
||||
{
|
||||
@ -107,59 +106,20 @@ function runContextMenuTest()
|
||||
function inspectNodesFromContextTest()
|
||||
{
|
||||
Services.obs.removeObserver(inspectNodesFromContextTest, INSPECTOR_NOTIFICATIONS.OPENED, false);
|
||||
Services.obs.addObserver(openInspectorForContextTest, INSPECTOR_NOTIFICATIONS.CLOSED, false);
|
||||
Services.obs.addObserver(finishInspectorTests, INSPECTOR_NOTIFICATIONS.CLOSED, false);
|
||||
ok(!InspectorUI.inspecting, "Inspector is not actively highlighting");
|
||||
is(InspectorUI.selection, salutation, "Inspector is highlighting salutation");
|
||||
ok(InspectorUI.isTreePanelOpen, "Inspector Tree Panel is open");
|
||||
// TODO: These tests depend on the style inspector patches.
|
||||
todo(InspectorUI.isStylePanelOpen, "Inspector Style Panel is open");
|
||||
executeSoon(function() {
|
||||
InspectorUI.closeInspectorUI(true);
|
||||
});
|
||||
}
|
||||
|
||||
function openInspectorForContextTest()
|
||||
{
|
||||
Services.obs.removeObserver(openInspectorForContextTest, INSPECTOR_NOTIFICATIONS.CLOSED);
|
||||
Services.obs.addObserver(inspectNodesFromContextTestWhileOpen, INSPECTOR_NOTIFICATIONS.OPENED, false);
|
||||
executeSoon(function() {
|
||||
InspectorUI.openInspectorUI(salutation);
|
||||
});
|
||||
}
|
||||
|
||||
function inspectNodesFromContextTestWhileOpen()
|
||||
{
|
||||
Services.obs.removeObserver(inspectNodesFromContextTestWhileOpen, INSPECTOR_NOTIFICATIONS.OPENED);
|
||||
Services.obs.addObserver(inspectNodesFromContextTestTrap, INSPECTOR_NOTIFICATIONS.OPENED, false);
|
||||
Services.obs.addObserver(inspectNodesFromContextTestHighlight, INSPECTOR_NOTIFICATIONS.HIGHLIGHTING, false);
|
||||
is(InspectorUI.selection, salutation, "Inspector is highlighting salutation");
|
||||
closing = doc.getElementById("closing");
|
||||
ok(closing, "we have the closing statement");
|
||||
executeSoon(function() {
|
||||
InspectorUI.openInspectorUI(closing);
|
||||
});
|
||||
}
|
||||
|
||||
function inspectNodesFromContextTestHighlight()
|
||||
{
|
||||
Services.obs.removeObserver(inspectNodesFromContextTestHighlight, INSPECTOR_NOTIFICATIONS.HIGHLIGHTING);
|
||||
Services.obs.addObserver(finishInspectorTests, INSPECTOR_NOTIFICATIONS.CLOSED, false);
|
||||
is(InspectorUI.selection, closing, "InspectorUI.selection is header");
|
||||
executeSoon(function() {
|
||||
InspectorUI.closeInspectorUI(true);
|
||||
});
|
||||
}
|
||||
|
||||
function inspectNodesFromContextTestTrap()
|
||||
{
|
||||
Services.obs.removeObserver(inspectNodesFromContextTestTrap, INSPECTOR_NOTIFICATIONS.OPENED);
|
||||
ok(false, "Inspector UI has been opened again. We Should Not Be Here!");
|
||||
todo(InspectorUI.isDOMPanelOpen, "Inspector DOM Panel is open");
|
||||
InspectorUI.closeInspectorUI(true);
|
||||
}
|
||||
|
||||
function finishInspectorTests()
|
||||
{
|
||||
Services.obs.removeObserver(finishInspectorTests,
|
||||
INSPECTOR_NOTIFICATIONS.CLOSED);
|
||||
INSPECTOR_NOTIFICATIONS.CLOSED, false);
|
||||
|
||||
ok(!InspectorUI.highlighter, "Highlighter is gone");
|
||||
ok(!InspectorUI.isTreePanelOpen, "Inspector Tree Panel is closed");
|
||||
|
Loading…
Reference in New Issue
Block a user