зеркало из https://github.com/mozilla/gecko-dev.git
Bug 593460 - Tests must properly close the Inspector; f=rcampbell r=sdwilsh
This commit is contained in:
Родитель
1610e7183e
Коммит
8882a778e9
|
@ -240,7 +240,7 @@
|
|||
noautohide="true"
|
||||
titlebar="normal"
|
||||
close="true"
|
||||
onpopuphiding="InspectorUI.closeInspectorUI(true);"
|
||||
onpopuphiding="InspectorUI.closeInspectorUI();"
|
||||
label="&inspectPanelTitle.label;">
|
||||
<toolbar id="inspector-toolbar"
|
||||
nowindowdrag="true">
|
||||
|
|
|
@ -347,7 +347,7 @@ var InspectorUI = {
|
|||
toggleInspectorUI: function IUI_toggleInspectorUI(aEvent)
|
||||
{
|
||||
if (this.isTreePanelOpen) {
|
||||
this.closeInspectorUI(true);
|
||||
this.closeInspectorUI();
|
||||
} else {
|
||||
this.openInspectorUI();
|
||||
}
|
||||
|
@ -738,10 +738,12 @@ var InspectorUI = {
|
|||
* Remove event listeners for document scrolling, resize,
|
||||
* tabContainer.TabSelect and others.
|
||||
*
|
||||
* @param boolean aClearStore tells if you want the store associated to the
|
||||
* current tab/window to be cleared or not.
|
||||
* @param boolean aKeepStore
|
||||
* Tells if you want the store associated to the current tab/window to
|
||||
* be cleared or not. Set this to true to not clear the store, or false
|
||||
* otherwise.
|
||||
*/
|
||||
closeInspectorUI: function IUI_closeInspectorUI(aClearStore)
|
||||
closeInspectorUI: function IUI_closeInspectorUI(aKeepStore)
|
||||
{
|
||||
if (this.closing || !this.win || !this.browser) {
|
||||
return;
|
||||
|
@ -749,7 +751,7 @@ var InspectorUI = {
|
|||
|
||||
this.closing = true;
|
||||
|
||||
if (aClearStore) {
|
||||
if (!aKeepStore) {
|
||||
InspectorStore.deleteStore(this.winID);
|
||||
this.win.removeEventListener("pagehide", this, true);
|
||||
} else {
|
||||
|
@ -1028,7 +1030,7 @@ var InspectorUI = {
|
|||
case "TabSelect":
|
||||
winID = this.getWindowID(gBrowser.selectedBrowser.contentWindow);
|
||||
if (this.isTreePanelOpen && winID != this.winID) {
|
||||
this.closeInspectorUI(false);
|
||||
this.closeInspectorUI(true);
|
||||
inspectorClosed = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ function runInspectorTests()
|
|||
ok(InspectorUI.isTreePanelOpen, "Inspector Tree Panel is open");
|
||||
ok(InspectorUI.isStylePanelOpen, "Inspector Style Panel is open");
|
||||
ok(InspectorUI.isDOMPanelOpen, "Inspector DOM Panel is open");
|
||||
InspectorUI.closeInspectorUI(true);
|
||||
InspectorUI.closeInspectorUI();
|
||||
}
|
||||
|
||||
function finishInspectorTests()
|
||||
|
|
|
@ -157,6 +157,7 @@ function inspectorTabUnload1(evt)
|
|||
ok(InspectorUI.isStylePanelOpen, "Inspector Style Panel is open");
|
||||
is(InspectorStore.length, 1, "InspectorStore.length = 1");
|
||||
|
||||
InspectorUI.closeInspectorUI();
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче