зеркало из https://github.com/mozilla/gecko-dev.git
Back out ae91affad44f (bug 889944) for browser-chrome bustage
CLOSED TREE
This commit is contained in:
Родитель
ee2d964bb5
Коммит
a8337233b1
|
@ -362,18 +362,6 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
|||
this.selectedItem = newItem;
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens selected item in a new tab.
|
||||
*/
|
||||
openRequestInTab: function() {
|
||||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
let browser = win.getBrowser();
|
||||
|
||||
let selected = this.selectedItem.attachment;
|
||||
|
||||
browser.selectedTab = browser.addTab(selected.url);
|
||||
},
|
||||
|
||||
/**
|
||||
* Copy the request url from the currently selected item.
|
||||
*/
|
||||
|
|
|
@ -20,10 +20,6 @@
|
|||
<popupset id="networkPopupSet">
|
||||
<menupopup id="network-request-popup"
|
||||
onpopupshowing="NetMonitorView.RequestsMenu._onContextShowing(event);">
|
||||
<menuitem id="request-menu-context-newtab"
|
||||
label="&netmonitorUI.context.newTab;"
|
||||
accesskey="&netmonitorUI.context.newTab.accesskey;"
|
||||
oncommand="NetMonitorView.RequestsMenu.openRequestInTab();"/>
|
||||
<menuitem id="request-menu-context-copy-url"
|
||||
label="&netmonitorUI.context.copyUrl;"
|
||||
accesskey="&netmonitorUI.context.copyUrl.accesskey;"
|
||||
|
|
|
@ -45,7 +45,6 @@ MOCHITEST_BROWSER_TESTS = \
|
|||
browser_net_resend.js \
|
||||
browser_net_req-resp-bodies.js \
|
||||
browser_net_copy_url.js \
|
||||
browser_net_open_request_in_tab.js \
|
||||
head.js \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Tests if Open in new tab works.
|
||||
*/
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
initNetMonitor(CUSTOM_GET_URL).then(([aTab, aDebuggee, aMonitor]) => {
|
||||
info("Starting test...");
|
||||
|
||||
let { NetMonitorView } = aMonitor.panelWin;
|
||||
let { RequestsMenu } = NetMonitorView;
|
||||
|
||||
RequestsMenu.lazyUpdate = false;
|
||||
|
||||
waitForNetworkEvents(aMonitor, 1).then(() => {
|
||||
let requestItem = RequestsMenu.getItemAtIndex(0);
|
||||
RequestsMenu.selectedItem = requestItem;
|
||||
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", function(event) {
|
||||
ok(true, "A new tab has been opened ");
|
||||
removeTab(event.target);
|
||||
cleanUp();
|
||||
}, false);
|
||||
|
||||
RequestsMenu.openRequestInTab();
|
||||
});
|
||||
|
||||
aDebuggee.performRequests(1);
|
||||
function cleanUp(){
|
||||
teardown(aMonitor).then(finish);
|
||||
}
|
||||
});
|
||||
}
|
|
@ -177,16 +177,6 @@
|
|||
- for the Copy URL menu item displayed in the context menu for a request -->
|
||||
<!ENTITY netmonitorUI.context.copyUrl.accesskey "C">
|
||||
|
||||
<!-- LOCALIZATION NOTE (netmonitorUI.context.newTab): This is the label
|
||||
- for the Open in New Tab menu item displayed in the context menu of the
|
||||
- network container -->
|
||||
<!ENTITY netmonitorUI.context.newTab "Open in New Tab">
|
||||
|
||||
<!-- LOCALIZATION NOTE (netmonitorUI.context.newTab.accesskey): This is the access key
|
||||
- for the Open in New Tab menu item displayed in the context menu of the
|
||||
- network container -->
|
||||
<!ENTITY netmonitorUI.context.newTab.accesskey "O">
|
||||
|
||||
<!-- LOCALIZATION NOTE (debuggerUI.summary.editAndResend): This is the label displayed
|
||||
- on the button in the headers tab that opens a form to edit and resend the currently
|
||||
displayed request -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче