merge fx-team to mozilla-central a=merge

This commit is contained in:
Carsten "Tomcat" Book 2015-05-26 12:04:10 +02:00
commit 0bd5d98e47
85 changed files with 322 additions and 230 deletions

View File

@ -50,50 +50,6 @@ input[type=button] {
right: auto;
}
#newtab-intro-what {
cursor: pointer;
position: absolute;
right: 70px;
top: 20px;
display: none;
}
#newtab-intro-what:-moz-locale-dir(rtl) {
left: 70px;
right: auto;
}
#newtab-scrollbox[page-disabled] #newtab-intro-what {
display: none;
}
#newtab-intro-panel {
color: #6a7b86;
font-size: 15px;
line-height: 19px;
width: 520px;
}
#newtab-intro-panel h1 {
color: #343f48;
font-family: Open Sans, sans-serif;
font-size: 30px;
margin: 20px;
}
#newtab-intro-panel p {
margin: 10px 20px;
}
#newtab-intro-panel p:last-child {
margin-bottom: 30px;
}
#newtab-intro-what:hover,
#newtab-intro-panel a {
color: #4a90e2;
}
/* MARGINS */
#newtab-vertical-margin {
display: -moz-box;
@ -299,7 +255,6 @@ input[type=button] {
text-align: start;
}
#newtab-intro-panel input,
.sponsored-explain input,
.suggested-explain input {
background-size: 18px;

View File

@ -24,11 +24,6 @@
<div id="newtab-customize-overlay"></div>
<xul:panel id="newtab-intro-panel" orient="vertical" type="arrow"
noautohide="true" hidden="true">
<h1>&newtab.intro.header;</h1>
</xul:panel>
<xul:panel id="newtab-search-panel" orient="vertical" type="arrow"
noautohide="true" hidden="true">
<xul:hbox id="newtab-search-manage">
@ -132,8 +127,6 @@
</div>
<div id="newtab-intro-what">&newtab.customize.what;</div>
<input id="newtab-customize-button" type="button" title="&newtab.customize.title;"/>
</div>

View File

@ -1570,7 +1570,12 @@
// Attach the nsIFormFillController now that we know the browser
// will be used. If we do that before and the preloaded browser
// won't be consumed until shutdown then we leak a docShell.
if (browser && this.hasAttribute("autocompletepopup")) {
// Also, we do not need to take care of attaching nsIFormFillControllers
// in the case that the browser is remote, as remote browsers take
// care of that themselves.
if (browser &&
this.hasAttribute("autocompletepopup") &&
!browser.isRemoteBrowser) {
browser.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup"));
browser.attachFormFill();
}
@ -1601,7 +1606,9 @@
return;
}
let browser = this._createBrowser({isPreloadBrowser: true});
let remote = gMultiProcessBrowser &&
E10SUtils.canLoadURIInProcess(BROWSER_NEW_TAB_URL, Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT);
let browser = this._createBrowser({isPreloadBrowser: true, remote: remote});
this._preloadedBrowser = browser;
let notificationbox = this.getNotificationBox(browser);

View File

@ -109,9 +109,6 @@ function runTests() {
is(getData(1), null, "directory link still pushed out by pinned history link");
ok(getContentDocument().getElementById("newtab-intro-what"),
"'What is this page?' link exists");
yield unpinCell(0);

View File

@ -173,6 +173,10 @@ let SessionFileInternal = {
},
}),
// `true` once `write` has succeeded at last once.
// Used for error-reporting.
_hasWriteEverSucceeded: false,
// The ID of the latest version of Gecko for which we have an upgrade backup
// or |undefined| if no upgrade backup was ever written.
get latestUpgradeBackupID() {
@ -275,7 +279,7 @@ let SessionFileInternal = {
promise = promise.then(msg => {
// Record how long the write took.
this._recordTelemetry(msg.telemetry);
this._hasWriteEverSucceeded = true;
if (msg.result.upgradeBackup) {
// We have just completed a backup-on-upgrade, store the information
// in preferences.
@ -293,7 +297,14 @@ let SessionFileInternal = {
// Ensure that we can write sessionstore.js cleanly before the profile
// becomes unaccessible.
AsyncShutdown.profileBeforeChange.addBlocker(
"SessionFile: Finish writing Session Restore data", promise);
"SessionFile: Finish writing Session Restore data",
promise,
{
fetchState: () => ({
options,
hasEverSucceeded: this._hasWriteEverSucceeded
})
});
// This code will always be executed because |promise| can't fail anymore.
// We ensured that by having a reject handler that reports the failure but

View File

@ -15,7 +15,7 @@
%restorepageDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<title>&restorepage.tabtitle;</title>
<link rel="stylesheet" href="chrome://global/skin/in-content/info-pages.css" type="text/css" media="all"/>
@ -27,7 +27,7 @@
<body dir="&locale.dir;">
<div class="container">
<div class="container flex">
<div class="title">
<h1 class="title-text">&restorepage.errorTitle;</h1>
@ -42,43 +42,42 @@
<li>&restorepage.startNew;</li>
</ul>
</div>
<tree xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="tabList" flex="1" seltype="single" hidecolumnpicker="true"
</div>
<div class="tree-container">
<xul:tree id="tabList" seltype="single" hidecolumnpicker="true"
onclick="onListClick(event);" onkeydown="onListKeyDown(event);"
available="true" _window_label="&restorepage.windowLabel;">
<treecols>
<treecol cycler="true" id="restore" type="checkbox" label="&restorepage.restoreHeader;"/>
<splitter class="tree-splitter"/>
<treecol primary="true" id="title" label="&restorepage.listHeader;" flex="1"/>
</treecols>
<treechildren flex="1"/>
</tree>
<xul:treecols>
<xul:treecol cycler="true" id="restore" type="checkbox" label="&restorepage.restoreHeader;"/>
<xul:splitter class="tree-splitter"/>
<xul:treecol primary="true" id="title" label="&restorepage.listHeader;" flex="1"/>
</xul:treecols>
<xul:treechildren flex="1"/>
</xul:tree>
</div>
<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="button-container">
<div class="button-container">
#ifdef XP_UNIX
<button id="errorCancel"
<xul:button id="errorCancel"
label="&restorepage.closeButton;"
accesskey="&restorepage.close.access;"
oncommand="startNewSession();"/>
<button class="primary"
<xul:button class="primary"
id="errorTryAgain"
label="&restorepage.tryagainButton;"
accesskey="&restorepage.restore.access;"
oncommand="restoreSession();"/>
#else
<button class="primary"
<xul:button class="primary"
id="errorTryAgain"
label="&restorepage.tryagainButton;"
accesskey="&restorepage.restore.access;"
oncommand="restoreSession();"/>
<button id="errorCancel"
<xul:button id="errorCancel"
label="&restorepage.closeButton;"
accesskey="&restorepage.close.access;"
oncommand="startNewSession();"/>
#endif
</hbox>
</div>
<!-- holds the session data for when the tab is closed -->
<input type="text" id="sessionData" style="display: none;"/>
</div>

View File

@ -126,7 +126,7 @@ let UI = {
_getLocalIconURL: function(project, manifest) {
let icon;
if (manifest.icons) {
let size = Object.keys(manifest.icons).sort(function(a, b) b - a)[0];
let size = Object.keys(manifest.icons).sort((a, b) => b - a)[0];
if (size) {
icon = manifest.icons[size];
}

View File

@ -11,7 +11,7 @@ let gManifestWindow, gManifestEditor;
function test() {
waitForExplicitFinish();
Task.spawn(function() {
Task.spawn(function*() {
Services.prefs.setBoolPref(MANIFEST_EDITOR_ENABLED, true);
let tab = yield openAppManager();
yield selectProjectsPanel();

View File

@ -516,9 +516,12 @@ exports.items.push({
return args.invert ? !value : value;
}
const toBlackBox = [s.attachment.source
for (s of dbg._view.Sources.items)
if (shouldBlackBox(s.attachment.source))];
const toBlackBox = [];
for (let {attachment: {source}} of dbg._view.Sources.items) {
if (shouldBlackBox(source)) {
toBlackBox.push(source);
}
}
// If we aren't black boxing any sources, bail out now.

View File

@ -456,7 +456,9 @@ function ThreadState() {
}
ThreadState.prototype = {
get activeThread() DebuggerController.activeThread,
get activeThread() {
return DebuggerController.activeThread;
},
/**
* Connect to the current thread client.
@ -542,7 +544,10 @@ function StackFrames() {
}
StackFrames.prototype = {
get activeThread() DebuggerController.activeThread,
get activeThread() {
return DebuggerController.activeThread;
},
currentFrameDepth: -1,
_currentFrameDescription: FRAME_TYPE.NORMAL,
_syncedWatchExpressions: null,
@ -1114,8 +1119,14 @@ function SourceScripts() {
}
SourceScripts.prototype = {
get activeThread() DebuggerController.activeThread,
get debuggerClient() DebuggerController.client,
get activeThread() {
return DebuggerController.activeThread;
},
get debuggerClient() {
return DebuggerController.client;
},
_cache: new Map(),
/**
@ -2443,23 +2454,33 @@ DebuggerController.HitCounts = new HitCounts();
*/
Object.defineProperties(window, {
"gTarget": {
get: function() DebuggerController._target,
get: function() {
return DebuggerController._target;
},
configurable: true
},
"gHostType": {
get: function() DebuggerView._hostType,
get: function() {
return DebuggerView._hostType;
},
configurable: true
},
"gClient": {
get: function() DebuggerController.client,
get: function() {
return DebuggerController.client;
},
configurable: true
},
"gThreadClient": {
get: function() DebuggerController.activeThread,
get: function() {
return DebuggerController.activeThread;
},
configurable: true
},
"gCallStackPageSize": {
get: function() CALL_STACK_PAGE_SIZE,
get: function() {
return CALL_STACK_PAGE_SIZE;
},
configurable: true
}
});

View File

@ -515,15 +515,17 @@ let DebuggerView = {
* Gets the visibility state of the instruments pane.
* @return boolean
*/
get instrumentsPaneHidden()
this._instrumentsPane.hasAttribute("pane-collapsed"),
get instrumentsPaneHidden() {
return this._instrumentsPane.hasAttribute("pane-collapsed");
},
/**
* Gets the currently selected tab in the instruments pane.
* @return string
*/
get instrumentsPaneTab()
this._instrumentsPane.selectedTab.id,
get instrumentsPaneTab() {
return this._instrumentsPane.selectedTab.id;
},
/**
* Sets the instruments pane hidden or visible.
@ -754,9 +756,10 @@ ResultsPanelContainer.prototype = Heritage.extend(WidgetMethods, {
* Gets this container's visibility state.
* @return boolean
*/
get hidden()
this._panel.state == "closed" ||
this._panel.state == "hiding",
get hidden() {
return this._panel.state == "closed" ||
this._panel.state == "hiding";
},
/**
* Removes all items from this container and hides it.

View File

@ -68,7 +68,9 @@ DebuggerPanel.prototype = {
// DevToolPanel API
get target() this._toolbox.target,
get target() {
return this._toolbox.target;
},
destroy: function() {
// Make sure this panel is not already destroyed.

View File

@ -18,7 +18,7 @@ function getCachedMessages(webConsole) {
}
function test() {
Task.spawn(function () {
Task.spawn(function*() {
let addon = yield addAddon(ADDON_URL);
let addonDebugger = yield initAddonDebugger(ADDON_URL);

View File

@ -6,7 +6,7 @@
const ADDON_URL = EXAMPLE_URL + "addon5.xpi";
function test() {
Task.spawn(function () {
Task.spawn(function*() {
let addon = yield addAddon(ADDON_URL);
let tab1 = yield addTab("chrome://browser_dbg_addon5/content/test.xul");

View File

@ -6,7 +6,7 @@
const ADDON_URL = EXAMPLE_URL + "addon4.xpi";
function test() {
Task.spawn(function () {
Task.spawn(function*() {
let addon = yield addAddon(ADDON_URL);
let tab1 = yield addTab("chrome://browser_dbg_addon4/content/test.xul");

View File

@ -14,7 +14,7 @@ let PREFS = [
"devtools.netmonitor.enabled"
];
function test() {
Task.spawn(function () {
Task.spawn(function*() {
let addon = yield addAddon(ADDON_URL);
let addonDebugger = yield initAddonDebugger(ADDON_URL);

View File

@ -1,14 +1,14 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Ensure that the sources listed when debugging an addon are either from the
// Ensure that the sources listed when debugging an addon are either from the
// addon itself, or the SDK, with proper groups and labels.
const ADDON_URL = EXAMPLE_URL + "addon3.xpi";
let gClient;
function test() {
Task.spawn(function () {
Task.spawn(function*() {
let addon = yield addAddon(ADDON_URL);
let addonDebugger = yield initAddonDebugger(ADDON_URL);

View File

@ -47,7 +47,7 @@ function test() {
}
function checkNavigationWhileFocused() {
return Task.spawn(function() {
return Task.spawn(function*() {
yield promise.all([
waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES),
waitForSourceAndCaret(gPanel, "-01.js", 5),

View File

@ -27,7 +27,7 @@ function test() {
is(gView.instrumentsPaneTab, "variables-tab",
"The variables tab should be selected by default.");
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, ".html");
is(gEvents.itemCount, 0, "There should be no events before reloading.");

View File

@ -14,7 +14,7 @@ function test() {
let gView = gDebugger.DebuggerView;
let gEvents = gView.EventListeners;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, ".html");
yield testFetchOnFocus();
yield testFetchOnReloadWhenFocused();
@ -23,7 +23,7 @@ function test() {
});
function testFetchOnFocus() {
return Task.spawn(function() {
return Task.spawn(function*() {
let fetched = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_LISTENERS_FETCHED);
gView.toggleInstrumentsPane({ visible: true, animated: false }, 1);
@ -42,7 +42,7 @@ function test() {
}
function testFetchOnReloadWhenFocused() {
return Task.spawn(function() {
return Task.spawn(function*() {
let fetched = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_LISTENERS_FETCHED);
let reloading = once(gDebugger.gTarget, "will-navigate");
@ -73,7 +73,7 @@ function test() {
}
function testFetchOnReloadWhenNotFocused() {
return Task.spawn(function() {
return Task.spawn(function*() {
gDebugger.on(gDebugger.EVENTS.EVENT_LISTENERS_FETCHED, () => {
ok(false, "Shouldn't have fetched any event listeners.");
});

View File

@ -13,7 +13,7 @@ function test() {
let gView = gDebugger.DebuggerView;
let gEvents = gView.EventListeners;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, ".html");
let fetched = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_LISTENERS_FETCHED);

View File

@ -16,7 +16,7 @@ function test() {
let gEvents = gView.EventListeners;
let gBreakpoints = gController.Breakpoints;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, ".html");
let fetched = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_LISTENERS_FETCHED);

View File

@ -17,7 +17,7 @@ function test() {
let gEvents = gView.EventListeners;
let gBreakpoints = gController.Breakpoints;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, ".html");
let fetched = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_LISTENERS_FETCHED);

View File

@ -16,7 +16,7 @@ function test() {
let gEvents = gView.EventListeners;
let gBreakpoints = gController.Breakpoints;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, ".html");
let fetched = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_LISTENERS_FETCHED);

View File

@ -14,7 +14,7 @@ function test() {
let gView = gDebugger.DebuggerView;
let gEvents = gView.EventListeners;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, ".html");
yield callInTab(gTab, "addBodyClickEventListener");

View File

@ -16,7 +16,7 @@ function test() {
let gSources = gDebugger.DebuggerView.Sources;
let gBreakpoints = gDebugger.DebuggerController.Breakpoints;
let gBreakpointLocation;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, "-01.js");
gBreakpointLocation = { actor: getSourceActor(gSources, EXAMPLE_URL + "code_script-switching-01.js"),
line: 5 };
@ -41,7 +41,7 @@ function test() {
});
function verifyView({ disabled, visible }) {
return Task.spawn(function() {
return Task.spawn(function*() {
// It takes a tick for the checkbox in the SideMenuWidget and the
// gutter in the editor to get updated.
yield waitForTick();
@ -65,7 +65,7 @@ function test() {
// before causing the debuggee to pause, to allow functions to yield first.
function testWhenBreakpointEnabledAndFirstSourceShown() {
return Task.spawn(function() {
return Task.spawn(function*() {
yield ensureSourceIs(aPanel, "-01.js");
yield verifyView({ disabled: false, visible: true });
@ -82,7 +82,7 @@ function test() {
}
function testWhenBreakpointEnabledAndSecondSourceShown() {
return Task.spawn(function() {
return Task.spawn(function*() {
yield ensureSourceIs(aPanel, "-02.js", true);
yield verifyView({ disabled: false, visible: false });
@ -97,7 +97,7 @@ function test() {
}
function testWhenBreakpointDisabledAndSecondSourceShown() {
return Task.spawn(function() {
return Task.spawn(function*() {
yield ensureSourceIs(aPanel, "-02.js", true);
yield verifyView({ disabled: true, visible: false });

View File

@ -16,7 +16,7 @@ function test() {
return Task.spawn(spawnTest).then(finish, helpers.handleError);
}
function spawnTest() {
function* spawnTest() {
let options = yield helpers.openTab(TEST_URL);
yield helpers.openToolbar(options);

View File

@ -18,7 +18,7 @@ function test() {
};
helpers.addTabWithToolbar(TAB_URL, aOptions => {
return Task.spawn(function() {
return Task.spawn(function*() {
yield helpers.audit(aOptions, [{
setup: 'break',
check: {

View File

@ -8,7 +8,7 @@
const TEST_URI = EXAMPLE_URL + "doc_cmd-dbg.html";
function test() {
return Task.spawn(function() {
return Task.spawn(function*() {
let options = yield helpers.openTab(TEST_URI);
yield helpers.openToolbar(options);

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let frames = win.DebuggerController.StackFrames;

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let frames = win.DebuggerController.StackFrames;

View File

@ -15,7 +15,7 @@ function test() {
let gSources = gDebugger.DebuggerView.Sources;
let gControllerSources = gDebugger.DebuggerController.SourceScripts;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(aPanel, JS_URL);
is(gSources.itemCount, 1,

View File

@ -9,7 +9,7 @@
let gDefaultHostType = Services.prefs.getCharPref("devtools.toolbox.host");
function test() {
Task.spawn(function() {
Task.spawn(function*() {
yield testHosts(["bottom", "side", "window"], ["horizontal", "vertical", "horizontal"]);
yield testHosts(["side", "bottom", "side"], ["vertical", "horizontal", "vertical"]);
yield testHosts(["bottom", "side", "bottom"], ["horizontal", "vertical", "horizontal"]);
@ -25,7 +25,7 @@ function testHosts(aHostTypes, aLayoutTypes) {
Services.prefs.setCharPref("devtools.toolbox.host", firstHost);
return Task.spawn(function() {
return Task.spawn(function*() {
let [tab, debuggee, panel] = yield initDebugger("about:blank");
yield testHost(tab, panel, firstHost, firstLayout);
yield switchAndTestHost(tab, panel, secondHost, secondLayout);
@ -38,7 +38,7 @@ function switchAndTestHost(aTab, aPanel, aHostType, aLayoutType) {
let gToolbox = aPanel._toolbox;
let gDebugger = aPanel.panelWin;
return Task.spawn(function() {
return Task.spawn(function*() {
let layoutChanged = once(gDebugger, gDebugger.EVENTS.LAYOUT_CHANGED);
let hostChanged = gToolbox.switchHost(aHostType);

View File

@ -74,8 +74,8 @@ function testTabA() {
is(tabActors.size, 2, "gTabA opened: two tabs in list");
ok(tabActors.has(gFirstActor), "gTabA opened: initial tab present");
info("actors: " + [a.url for (a of tabActors)]);
gActorA = [a for (a of tabActors) if (a !== gFirstActor)][0];
info("actors: " + [...tabActors].map(a => a.url));
gActorA = [...tabActors].filter(a => a !== gFirstActor)[0];
ok(gActorA.url.match(/^data:text\/html;/), "gTabA opened: new tab URL");
is(gActorA.title, "JS Debugger BrowserTabList test page", "gTabA opened: new tab title");
});
@ -118,8 +118,8 @@ function testTabClosed() {
is(tabActors.size, 2, "gTabA closed: two tabs in list");
ok(tabActors.has(gFirstActor), "gTabA closed: initial tab present");
info("actors: " + [a.url for (a of tabActors)]);
gActorA = [a for (a of tabActors) if (a !== gFirstActor)][0];
info("actors: " + [...tabActors].map(a => a.url));
gActorA = [...tabActors].filter(a => a!== gFirstActor)[0];
ok(gActorA.url.match(/^data:text\/html;/), "gTabA closed: new tab URL");
is(gActorA.title, "JS Debugger BrowserTabList test page", "gTabA closed: new tab title");
});
@ -162,8 +162,8 @@ function testNewWindow() {
is(tabActors.size, 3, "gTabC closed: three tabs in list");
ok(tabActors.has(gFirstActor), "gTabC closed: initial tab present");
info("actors: " + [a.url for (a of tabActors)]);
gActorA = [a for (a of tabActors) if (a !== gFirstActor)][0];
info("actors: " + [...tabActors].map(a => a.url));
gActorA = [...tabActors].filter(a => a !== gFirstActor)[0];
ok(gActorA.url.match(/^data:text\/html;/), "gTabC closed: new tab URL");
is(gActorA.title, "JS Debugger BrowserTabList test page", "gTabC closed: new tab title");
});
@ -191,8 +191,8 @@ function testWindowClosed() {
is(tabActors.size, 2, "gNewWindow closed: two tabs in list");
ok(tabActors.has(gFirstActor), "gNewWindow closed: initial tab present");
info("actors: " + [a.url for (a of tabActors)]);
gActorA = [a for (a of tabActors) if (a !== gFirstActor)][0];
info("actors: " + [...tabActors].map(a => a.url));
gActorA = [...tabActors].filter(a => a !== gFirstActor)[0];
ok(gActorA.url.match(/^data:text\/html;/), "gNewWindow closed: new tab URL");
is(gActorA.title, "JS Debugger BrowserTabList test page", "gNewWindow closed: new tab title");
});

View File

@ -19,7 +19,7 @@ function test() {
gSources = gDebugger.DebuggerView.Sources;
gControllerSources = gDebugger.DebuggerController.SourceScripts;
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(gPanel, TAB_URL);
// From this point onward, the source editor's text should never change.

View File

@ -35,7 +35,7 @@ function test() {
};
}(gClient.request));
Task.spawn(function() {
Task.spawn(function*() {
yield waitForSourceShown(gPanel, JS_URL);
// From this point onward, the source editor's text should never change.

View File

@ -29,7 +29,7 @@ function test() {
}
function performTest() {
return Task.spawn(function() {
return Task.spawn(function*() {
yield selectBottomFrame();
testBottomFrame(4);

View File

@ -62,7 +62,7 @@ function performTest() {
gVariablesView.rawObject = test;
gVariablesView.scrollPageSize = 5;
return Task.spawn(function() {
return Task.spawn(function*() {
yield waitForTick();
// Part 0: Test generic focus methods on the variables view.

View File

@ -9,7 +9,7 @@
const TAB_URL = EXAMPLE_URL + "doc_scope-variable-2.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let events = win.EVENTS;

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_scope-variable-2.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let events = win.EVENTS;

View File

@ -9,7 +9,7 @@
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -9,7 +9,7 @@
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -9,7 +9,7 @@
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -10,7 +10,7 @@ const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
requestLongerTimeout(2);
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -9,7 +9,7 @@
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_scope-variable.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let events = win.EVENTS;

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_scope-variable-3.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -10,7 +10,7 @@
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let events = win.EVENTS;

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_watch-expression-button.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let events = win.EVENTS;

View File

@ -9,7 +9,7 @@
const TAB_URL = EXAMPLE_URL + "doc_watch-expression-button.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let events = win.EVENTS;

View File

@ -9,7 +9,7 @@
const TAB_URL = EXAMPLE_URL + "doc_domnode-variables.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -8,7 +8,7 @@
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;

View File

@ -9,7 +9,7 @@
const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
function test() {
Task.spawn(function() {
Task.spawn(function*() {
let [tab,, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let events = win.EVENTS;

View File

@ -170,13 +170,17 @@ FilterView.prototype = {
* Returns the current search operator.
* @return string
*/
get searchOperator() this.searchData[0],
get searchOperator() {
return this.searchData[0];
},
/**
* Returns the current search arguments.
* @return array
*/
get searchArguments() this.searchData[1],
get searchArguments() {
return this.searchData[1];
},
/**
* Clears the text from the searchbox and any changed views.

View File

@ -50,9 +50,10 @@ GlobalSearchView.prototype = Heritage.extend(WidgetMethods, {
* Gets the visibility state of the global search container.
* @return boolean
*/
get hidden()
this.widget.getAttribute("hidden") == "true" ||
this._splitter.getAttribute("hidden") == "true",
get hidden() {
return this.widget.getAttribute("hidden") == "true" ||
this._splitter.getAttribute("hidden") == "true";
},
/**
* Hides and removes all items from this search container.
@ -366,7 +367,9 @@ GlobalResults.prototype = {
/**
* Gets the number of source results in this store.
*/
get matchCount() this._store.length
get matchCount() {
return this._store.length;
}
};
/**
@ -400,7 +403,9 @@ SourceResults.prototype = {
/**
* Gets the number of line results in this store.
*/
get matchCount() this._store.length,
get matchCount() {
return this._store.length;
},
/**
* Expands the element, showing all the added details.
@ -429,21 +434,26 @@ SourceResults.prototype = {
* Gets this element's expanded state.
* @return boolean
*/
get expanded()
this._resultsContainer.getAttribute("hidden") != "true" &&
this._arrow.hasAttribute("open"),
get expanded() {
return this._resultsContainer.getAttribute("hidden") != "true" &&
this._arrow.hasAttribute("open");
},
/**
* Sets this element's expanded state.
* @param boolean aFlag
*/
set expanded(aFlag) this[aFlag ? "expand" : "collapse"](),
set expanded(aFlag) {
this[aFlag ? "expand" : "collapse"]();
},
/**
* Gets the element associated with this item.
* @return nsIDOMNode
*/
get target() this._target,
get target() {
return this._target;
},
/**
* Customization function for creating this item's UI.
@ -547,13 +557,17 @@ LineResults.prototype = {
/**
* Gets the number of word results in this store.
*/
get matchCount() this._matchCount,
get matchCount() {
return this._matchCount;
},
/**
* Gets the element associated with this item.
* @return nsIDOMNode
*/
get target() this._target,
get target() {
return this._target;
},
/**
* Customization function for creating this item's UI.

View File

@ -107,7 +107,7 @@ WatchExpressionsView.prototype = Heritage.extend(WidgetMethods, {
*/
switchExpression: function(aVar, aExpression) {
let expressionItem =
[i for (i of this) if (i.attachment.currentExpression == aVar.name)][0];
[...this].filter(i => i.attachment.currentExpression == aVar.name)[0];
// Remove the watch expression if it's going to be empty or a duplicate.
if (!aExpression || this.getAllStrings().indexOf(aExpression) != -1) {
@ -133,7 +133,7 @@ WatchExpressionsView.prototype = Heritage.extend(WidgetMethods, {
*/
deleteExpression: function(aVar) {
let expressionItem =
[i for (i of this) if (i.attachment.currentExpression == aVar.name)][0];
[...this].filter(i => i.attachment.currentExpression == aVar.name)[0];
// Remove the watch expression.
this.remove(expressionItem);

View File

@ -799,7 +799,12 @@ function whenDataAvailable(aDataStore, aMandatoryFields) {
};
const WDA_DEFAULT_VERIFY_INTERVAL = 50; // ms
const WDA_DEFAULT_GIVE_UP_TIMEOUT = 2000; // ms
// Use longer timeout during testing as the tests need this process to succeed
// and two seconds is quite short on slow debug builds. The timeout here should
// be at least equal to the general mochitest timeout of 45 seconds so that this
// never gets hit during testing.
const WDA_DEFAULT_GIVE_UP_TIMEOUT = gDevTools.testing ? 45000 : 2000; // ms
/**
* Helper method for debugging.

View File

@ -1245,10 +1245,11 @@ PropertyView.prototype = {
this._matchedSelectorResponse = matched;
this._buildMatchedSelectors();
this._buildMatchedSelectors()
.then(() => {
this.tree.inspector.emit("computed-view-property-expanded");
});
this.matchedExpander.setAttribute("open", "");
this.tree.inspector.emit("computed-view-property-expanded");
}).then(null, console.error);
} else {
this.matchedSelectorsContainer.innerHTML = "";
@ -1264,6 +1265,7 @@ PropertyView.prototype = {
},
_buildMatchedSelectors: function() {
let promises = [];
let frag = this.element.ownerDocument.createDocumentFragment();
for (let selector of this.matchedSelectorViews) {
@ -1292,9 +1294,11 @@ PropertyView.prototype = {
class: "other-property-value theme-fg-color1"
});
valueSpan.appendChild(selector.outputFragment);
promises.push(selector.ready);
}
this.matchedSelectorsContainer.appendChild(frag);
return promise.all(promises);
},
/**
@ -1391,7 +1395,7 @@ function SelectorView(aTree, aSelectorInfo)
this.openStyleEditor = this.openStyleEditor.bind(this);
this.maybeOpenStyleEditor = this.maybeOpenStyleEditor.bind(this);
this.updateSourceLink();
this.ready = this.updateSourceLink();
}
/**

View File

@ -190,7 +190,7 @@ let UI = {
}
break;
case "project":
this._updatePromise = Task.spawn(function() {
this._updatePromise = Task.spawn(function*() {
UI.updateTitle();
yield UI.destroyToolbox();
UI.updateCommands();

View File

@ -677,7 +677,7 @@ let AppManager = exports.AppManager = {
let manifest = validation.manifest;
let iconPath;
if (manifest.icons) {
let size = Object.keys(manifest.icons).sort(function(a, b) b - a)[0];
let size = Object.keys(manifest.icons).sort((a, b) => b - a)[0];
if (size) {
iconPath = manifest.icons[size];
}

View File

@ -35,7 +35,9 @@ function SimulatorProcess() {}
SimulatorProcess.prototype = {
// Check if B2G is running.
get isRunning() !!this.process,
get isRunning() {
return !!this.process;
},
// Start the process and connect the debugger client.
run() {

View File

@ -8,7 +8,7 @@ function test() {
waitForExplicitFinish();
requestCompleteLog();
Task.spawn(function() {
Task.spawn(function*() {
const { DebuggerServer } =
Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {});

View File

@ -4,7 +4,7 @@
function test() {
waitForExplicitFinish();
Task.spawn(function() {
Task.spawn(function*() {
let win = yield openWebIDE();
ok(document.querySelector("#webide-button"), "Found WebIDE button");
Services.prefs.setBoolPref("devtools.webide.widget.enabled", false);

View File

@ -8,7 +8,7 @@ function test() {
waitForExplicitFinish();
requestCompleteLog();
Task.spawn(function() {
Task.spawn(function*() {
const { DebuggerServer } =
Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {});

View File

@ -12,8 +12,6 @@
<!ENTITY newtab.customize.suggested "Show suggested and your top sites">
<!ENTITY newtab.customize.topsites "Show your top sites">
<!ENTITY newtab.customize.blank2 "Show blank page">
<!ENTITY newtab.customize.what "What is this page?">
<!ENTITY newtab.intro.header "What is this page?">
<!ENTITY newtab.undo.removedLabel "Thumbnail removed.">
<!ENTITY newtab.undo.undoButton "Undo.">
<!ENTITY newtab.undo.restoreButton "Restore All.">

View File

@ -14,7 +14,6 @@
width: 16px;
}
#newtab-intro-panel,
.newtab-title {
font-family: sans-serif;
}

View File

@ -9,7 +9,6 @@
color: rgb(20,79,174);
}
#newtab-intro-panel,
.newtab-title {
font-family: Lucida Grande;
}

View File

@ -35,4 +35,4 @@ treechildren::-moz-tree-image(partial) {
}
treechildren::-moz-tree-image(partial, selected) {
list-style-image: url("chrome://global/skin/in-content/check-partial.svg#check-partial-inverted");
}
}

View File

@ -155,7 +155,6 @@
}
/* TITLES */
#newtab-intro-what,
.newtab-sponsored,
.newtab-title,
.newtab-suggested {

View File

@ -13,7 +13,6 @@
padding: 0;
}
#newtab-intro-panel,
.newtab-title {
font-family: Segoe UI;
}

View File

@ -891,18 +891,17 @@ ManifestHelper.prototype = {
return {};
},
get biggestIconURL() {
biggestIconURL: function(predicate) {
let icons = this._localeProp("icons");
if (!icons) {
return null;
}
let iconSizes = Object.keys(icons);
let iconSizes = Object.keys(icons).sort((a, b) => a - b)
.filter(predicate || (() => true));
if (iconSizes.length == 0) {
return null;
}
iconSizes.sort((a, b) => a - b);
let biggestIconSize = iconSizes.pop();
let biggestIcon = icons[biggestIconSize];
let biggestIconURL = this._baseURI.resolve(biggestIcon);

View File

@ -114,7 +114,7 @@ function addApplication(aApp) {
container.setAttribute("title", manifest.name);
let img = document.createElement("img");
img.src = manifest.biggestIconURL || DEFAULT_ICON;
img.src = manifest.biggestIconURL() || DEFAULT_ICON;
img.onerror = function() {
// If the image failed to load, and it was not our default icon, attempt to
// use our default as a fallback.

View File

@ -80,23 +80,6 @@ PlacesWrapper.prototype = {
return deferred.promise;
},
setGuidForLocalId: function (localId, guid) {
let deferred = Promise.defer();
let stmt = "UPDATE moz_bookmarks " +
"SET guid = :guid " +
"WHERE id = :item_id";
let query = this.placesQueries.getQuery(stmt);
query.params.guid = guid;
query.params.item_id = localId;
this.asyncQuery(query)
.then(deferred.resolve, deferred.reject);
return deferred.promise;
},
getItemsById: function (ids, types) {
let deferred = Promise.defer();
let stmt = "SELECT b.id, b.type, b.parent, b.position, b.title, b.guid, b.dateAdded, b.lastModified, p.url " +

View File

@ -1154,6 +1154,7 @@ BookmarksStore.prototype = {
stmt.params.guid = guid;
stmt.params.item_id = id;
Async.querySpinningly(stmt);
PlacesUtils.invalidateCachedGuidFor(id);
return guid;
},

View File

@ -1464,7 +1464,9 @@ this.PlacesUtils = {
* @resolves to the GUID.
* @rejects if aItemId is invalid.
*/
promiseItemGuid: function (aItemId) GuidHelper.getItemGuid(aItemId),
promiseItemGuid(aItemId) {
return GuidHelper.getItemGuid(aItemId)
},
/**
* Get the item id for an item (a bookmark, a folder or a separator) given
@ -1472,11 +1474,23 @@ this.PlacesUtils = {
*
* @param aGuid
* an item GUID
* @retrun {Promise}
* @return {Promise}
* @resolves to the GUID.
* @rejects if there's no item for the given GUID.
*/
promiseItemId: function (aGuid) GuidHelper.getItemId(aGuid),
promiseItemId(aGuid) {
return GuidHelper.getItemId(aGuid)
},
/**
* Invalidate the GUID cache for the given itemId.
*
* @param aItemId
* an item id
*/
invalidateCachedGuidFor(aItemId) {
GuidHelper.invalidateCacheForItemId(aItemId)
},
/**
* Asynchronously retrieve a JS-object representation of a places bookmarks
@ -1565,7 +1579,7 @@ this.PlacesUtils = {
item.id = itemId;
// Cache it for promiseItemId consumers regardless.
GuidHelper.idsForGuids.set(item.guid, itemId);
GuidHelper.updateCache(itemId, item.guid);
let type = aRow.getResultByName("type");
if (type == Ci.nsINavBookmarksService.TYPE_BOOKMARK)
@ -2166,7 +2180,7 @@ let GuidHelper = {
this.ensureObservingRemovedItems();
let itemId = rows[0].getResultByName("id");
this.idsForGuids.set(aGuid, itemId);
this.updateCache(itemId, aGuid);
return itemId;
}),
@ -2185,10 +2199,31 @@ let GuidHelper = {
this.ensureObservingRemovedItems();
let guid = rows[0].getResultByName("guid");
this.guidsForIds.set(aItemId, guid);
this.updateCache(aItemId, guid);
return guid;
}),
/**
* Updates the cache.
*
* @note This is the only place where the cache should be populated,
* invalidation relies on both Maps being populated at the same time.
*/
updateCache(aItemId, aGuid) {
if (typeof(aItemId) != "number" || aItemId <= 0)
throw new Error("Trying to update the GUIDs cache with an invalid itemId");
if (typeof(aGuid) != "string" || !/^[a-zA-Z0-9\-_]{12}$/.test(aGuid))
throw new Error("Trying to update the GUIDs cache with an invalid GUID");
this.guidsForIds.set(aItemId, aGuid);
this.idsForGuids.set(aGuid, aItemId);
},
invalidateCacheForItemId(aItemId) {
let guid = this.guidsForIds.get(aItemId);
this.guidsForIds.delete(aItemId);
this.idsForGuids.delete(guid);
},
ensureObservingRemovedItems: function () {
if (!("observer" in this)) {
/**
@ -2201,14 +2236,14 @@ let GuidHelper = {
this.observer = {
onItemAdded: (aItemId, aParentId, aIndex, aItemType, aURI, aTitle,
aDateAdded, aGuid, aParentGuid) => {
this.guidsForIds.set(aItemId, aGuid);
this.guidsForIds.set(aParentId, aParentGuid);
this.updateCache(aItemId, aGuid);
this.updateCache(aParentId, aParentGuid);
},
onItemRemoved:
(aItemId, aParentId, aIndex, aItemTyep, aURI, aGuid, aParentGuid) => {
this.guidsForIds.delete(aItemId);
this.idsForGuids.delete(aGuid);
this.guidsForIds.set(aParentId, aParentGuid);
this.updateCache(aParentId, aParentGuid);
},
QueryInterface: XPCOMUtils.generateQI(Ci.nsINavBookmarkObserver),

View File

@ -0,0 +1,24 @@
add_task(function* () {
do_print("Add a bookmark.");
let bm = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
parentGuid: PlacesUtils.bookmarks.unfiledGuid });
let id = yield PlacesUtils.promiseItemId(bm.guid);
Assert.equal((yield PlacesUtils.promiseItemGuid(id)), bm.guid);
// Ensure invalidating a non-existent itemId doesn't throw.
PlacesUtils.invalidateCachedGuidFor(null);
PlacesUtils.invalidateCachedGuidFor(9999);
do_print("Change the GUID.");
let db = yield PlacesUtils.promiseWrappedConnection();
yield db.execute("UPDATE moz_bookmarks SET guid = :guid WHERE id = :id",
{ guid: "123456789012", id});
// The cache should still point to the wrong id.
Assert.equal((yield PlacesUtils.promiseItemGuid(id)), bm.guid);
do_print("Invalidate the cache.");
PlacesUtils.invalidateCachedGuidFor(id);
Assert.equal((yield PlacesUtils.promiseItemGuid(id)), "123456789012");
Assert.equal((yield PlacesUtils.promiseItemId("123456789012")), id);
yield Assert.rejects(PlacesUtils.promiseItemId(bm.guid), /no item found for the given GUID/);
});

View File

@ -120,6 +120,7 @@ skip-if = true
[test_placeURIs.js]
[test_PlacesSearchAutocompleteProvider.js]
[test_PlacesUtils_asyncGetBookmarkIds.js]
[test_PlacesUtils_invalidateCachedGuidFor.js]
[test_PlacesUtils_lazyobservers.js]
[test_placesTxn.js]
[test_preventive_maintenance.js]

View File

@ -704,6 +704,7 @@ xul|tree {
-moz-appearance: none;
font-size: 1em;
border: 1px solid var(--in-content-box-border-color);
margin: 0;
}
xul|tree:-moz-focusring,

View File

@ -2,6 +2,7 @@
/* Body and container */
body {
display: flex;
flex-direction: column;
box-sizing: padding-box;
min-height: 100vh;
padding-top: 0;
@ -17,6 +18,13 @@ body {
max-width: 52em;
}
.container.flex {
display: flex;
flex-direction: column;
flex-grow: 1;
margin: 10vh 0;
}
/* Typography */
.title {
background-image: url("chrome://browser/skin/aboutNetError_info.svg");
@ -82,8 +90,16 @@ ul {
}
/* Trees */
tree {
min-height: 12em;
.tree-container {
margin-top: 1.2em;
flex-grow: 1;
min-height: 12em;
}
.tree-container > tree {
height: 100%;
}
tree {
width: 100%;
}
}

View File

@ -103,8 +103,14 @@ CommonNativeApp.prototype = {
let manifest = new ManifestHelper(aManifest, aApp.origin, aApp.manifestURL);
let origin = Services.io.newURI(aApp.origin, null, null);
this.iconURI = Services.io.newURI(manifest.biggestIconURL || DEFAULT_ICON_URL,
null, null);
#ifdef XP_WIN
let biggestIconURL = manifest.biggestIconURL(v => v <= 256);
#else
let biggestIconURL = manifest.biggestIconURL();
#endif
this.iconURI = Services.io.newURI(biggestIconURL || DEFAULT_ICON_URL, null,
null);
if (manifest.developer) {
if (manifest.developer.name) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -57,6 +57,8 @@ let iconTests = [
{"32": generateDataURI(getFile(getTestFilePath("data/icon.png"))) },
// URI to a file that isn't an image
{"32": "/chrome/toolkit/webapps/tests/data/app/index.html"},
// Large icon that won't be used on Windows (bug #1152597)
{"512": "/chrome/toolkit/webapps/tests/data/512.png"},
];
// This is an array of the icon sizes associated with the elements of
@ -79,6 +81,7 @@ if (LINUX) {
[2787, 0],
[2787, 0],
[4009, 0],
[2195, 0],
];
} else if (WIN) {
iconSizes = [
@ -87,6 +90,8 @@ if (LINUX) {
[4286, 0],
[4286, 0],
[16958, 0],
// Windows ICO doesn't support 512x512 icons. The default should be chosen.
[16958, 0],
];
} else if (MAC) {
iconSizes = [
@ -95,6 +100,7 @@ if (LINUX) {
[27000, 2000],
[27000, 2000],
[14000, 2000],
[1000, 2000],
];
}

View File

@ -65,6 +65,8 @@ let iconTests = [
{"32": generateDataURI(testIconFile) },
// URI to a file that isn't an image
{"32": "/index.html"},
// Large icon that won't be used on Windows (bug #1152597)
{"512": "http://example.com/chrome/toolkit/webapps/tests/data/512.png"},
];
// This is an array of the icon sizes associated with the elements of
@ -87,6 +89,7 @@ if (LINUX) {
[2787, 0],
[2787, 0],
[4009, 0],
[2195, 0],
];
} else if (WIN) {
iconSizes = [
@ -95,6 +98,8 @@ if (LINUX) {
[4286, 0],
[4286, 0],
[16958, 0],
// Windows ICO doesn't support 512x512 icons. The default should be chosen.
[16958, 0],
];
} else if (MAC) {
iconSizes = [
@ -103,6 +108,7 @@ if (LINUX) {
[27000, 2000],
[27000, 2000],
[14000, 2000],
[1000, 2000],
];
}