Merge mozilla-central to mozilla-inbound

This commit is contained in:
Carsten "Tomcat" Book 2014-07-24 15:37:02 +02:00
Родитель a8abed619a cc1073a524
Коммит 602f051355
88 изменённых файлов: 763 добавлений и 254 удалений

Просмотреть файл

@ -273,7 +273,7 @@ let AdbController = {
// disconnected, if the user happens to be using logcat.
dump("AdbController: ADB timer expired - disabling ADB\n");
navigator.mozSettings.createLock().set(
{'devtools.debugger.remote-enabled': false});
{'debugger.remote-mode': 'disabled'});
}
},
@ -460,7 +460,7 @@ SettingsListener.observe("lockscreen.enabled", false,
#endif
});
SettingsListener.observe('debugger.remote-mode', false, function(value) {
SettingsListener.observe('debugger.remote-mode', 'disabled', function(value) {
if (['disabled', 'adb-only', 'adb-devtools'].indexOf(value) == -1) {
dump('Illegal value for debugger.remote-mode: ' + value + '\n');
return;

Просмотреть файл

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

Просмотреть файл

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="11f01789444d4ebe97581c31d8756d773e18356f"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="999e945b85c578c503ad445c2285940f16aacdae">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

Просмотреть файл

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

Просмотреть файл

@ -17,7 +17,7 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="11f01789444d4ebe97581c31d8756d773e18356f"/>

Просмотреть файл

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "2a39622b30294c36997f9b8260230182344184de",
"revision": "fd60711c229532be57fd8164ecf29540276f6acd",
"repo_path": "/integration/gaia-central"
}

Просмотреть файл

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

Просмотреть файл

@ -15,7 +15,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

Просмотреть файл

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="11f01789444d4ebe97581c31d8756d773e18356f"/>

Просмотреть файл

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5458f73e319759543fddf7e96d7ece4d78318e32"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

Просмотреть файл

@ -809,6 +809,33 @@ pref("plugin.state.f5 ssl vpn plugin", 2);
pref("plugin.state.f5 sam inspection host plugin", 2);
#endif
// Roblox Launcher Plugin, bug 1024073
#ifdef XP_WIN
pref("plugin.state.nprobloxproxy", 2);
#endif
#ifdef XP_MACOSX
pref("plugins.state.nproblox", 2);
#endif
// Box Edit, bug 1029654
#ifdef XP_WIN
pref("plugins.state.npboxedit", 2);
#endif
#ifdef XP_MACOSX
pref("plugins.state.box edit", 2);
#endif
// Nexus Personal, bug 1024965
#ifdef XP_WIN
pref("plugins.state.np_prsnl", 2);
#endif
#ifdef XP_MACOSX
pref("plugins.state.personalplugin", 2);
#endif
#ifdef UNIX_BUT_NOT_MAC
pref("plugins.state.libplugins", 2);
#endif
// display door hanger if flash not installed
pref("plugins.notifyMissingFlash", true);
@ -1356,6 +1383,7 @@ pref("devtools.styleeditor.autocompletion-enabled", true);
pref("devtools.styleeditor.showMediaSidebar", true);
pref("devtools.styleeditor.mediaSidebarWidth", 238);
pref("devtools.styleeditor.navSidebarWidth", 245);
pref("devtools.styleeditor.transitions", true);
// Enable the Shader Editor.
pref("devtools.shadereditor.enabled", false);
@ -1479,6 +1507,9 @@ pref("browser.newtab.preload", true);
// Toggles the content of 'about:newtab'. Shows the grid when enabled.
pref("browser.newtabpage.enabled", true);
// Toggles the enhancement of history content of 'about:newtab'
pref("browser.newtabpage.enhanced", false);
// number of rows of newtab grid
pref("browser.newtabpage.rows", 3);

Просмотреть файл

@ -161,6 +161,7 @@ let gGrid = {
site.innerHTML =
'<a class="newtab-link">' +
' <span class="newtab-thumbnail"/>' +
' <span class="newtab-thumbnail enhanced-content"/>' +
' <span class="newtab-title"/>' +
'</a>' +
'<input type="button" title="' + newTabString("pin") + '"' +

Просмотреть файл

@ -51,6 +51,11 @@ let gPage = {
let enabled = gAllPages.enabled;
this._updateAttributes(enabled);
// Update thumbnails to the new enhanced setting
if (aData == "browser.newtabpage.enhanced") {
this.update();
}
// Initialize the whole page if we haven't done that, yet.
if (enabled) {
this._init();

Просмотреть файл

@ -153,12 +153,26 @@ Site.prototype = {
* Refreshes the thumbnail for the site.
*/
refreshThumbnail: function Site_refreshThumbnail() {
// Only enhance tiles if that feature is turned on
let link = gAllPages.enhanced && DirectoryLinksProvider.getEnhancedLink(this.link) ||
this.link;
let thumbnail = this._querySelector(".newtab-thumbnail");
if (this.link.bgColor) {
thumbnail.style.backgroundColor = this.link.bgColor;
if (link.bgColor) {
thumbnail.style.backgroundColor = link.bgColor;
}
let uri = this.link.imageURI || PageThumbs.getThumbnailURL(this.url);
let uri = link.imageURI || PageThumbs.getThumbnailURL(this.url);
thumbnail.style.backgroundImage = 'url("' + uri + '")';
if (link.enhancedImageURI) {
let enhanced = this._querySelector(".enhanced-content");
enhanced.style.backgroundImage = 'url("' + link.enhancedImageURI + '")';
if (this.link.type != link.type) {
this.node.setAttribute("type", "enhanced");
}
}
},
/**

Просмотреть файл

@ -23,6 +23,7 @@ skip-if = os == "mac" # Intermittent failures, bug 898317
[browser_newtab_drag_drop.js]
[browser_newtab_drag_drop_ext.js]
[browser_newtab_drop_preview.js]
[browser_newtab_enhanced.js]
[browser_newtab_focus.js]
[browser_newtab_perwindow_private_browsing.js]
[browser_newtab_reportLinkAction.js]

Просмотреть файл

@ -0,0 +1,55 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const PRELOAD_PREF = "browser.newtab.preload";
gDirectorySource = "data:application/json," + JSON.stringify({
"en-US": [{
url: "http://example.com/",
enhancedImageURI: "data:image/png;base64,helloWORLD",
type: "organic"
}]
});
function runTests() {
let origEnhanced = NewTabUtils.allPages.enhanced;
registerCleanupFunction(() => {
Services.prefs.clearUserPref(PRELOAD_PREF);
NewTabUtils.allPages.enhanced = origEnhanced;
});
Services.prefs.setBoolPref(PRELOAD_PREF, false);
function getData(cellNum) {
let siteNode = getCell(cellNum).site.node;
return {
type: siteNode.getAttribute("type"),
enhanced: siteNode.querySelector(".enhanced-content").style.backgroundImage,
};
}
// Make the page have a directory link followed by a history link
yield setLinks("1");
// Test with enhanced = false
NewTabUtils.allPages.enhanced = false;
yield addNewTabPageTab();
let {type, enhanced} = getData(0);
is(type, "organic", "directory link is organic");
isnot(enhanced, "", "directory link has enhanced image");
let {type, enhanced} = getData(1);
is(type, "history", "history link is history");
is(enhanced, "", "history link has no enhanced image");
// Test with enhanced = true
NewTabUtils.allPages.enhanced = true;
yield addNewTabPageTab();
let {type, enhanced} = getData(0);
is(type, "organic", "directory link is still organic");
isnot(enhanced, "", "directory link still has enhanced image");
let {type, enhanced} = getData(1);
is(type, "enhanced", "history link now is enhanced");
isnot(enhanced, "", "history link now has enhanced image");
}

Просмотреть файл

@ -608,6 +608,7 @@ function createDragEvent(aEventType, aData) {
*/
function whenPagesUpdated(aCallback, aOnlyIfHidden=false) {
let page = {
observe: _ => _,
update: function (onlyIfHidden=false) {
if (onlyIfHidden == aOnlyIfHidden) {
NewTabUtils.allPages.unregister(this);

Просмотреть файл

@ -135,7 +135,6 @@
class="header"
hidden="true"
data-category="paneAdvanced">
<image class="header-icon"/>
<label class="header-name">&paneAdvanced.title;</label>
</hbox>

Просмотреть файл

@ -61,7 +61,6 @@
class="header"
hidden="true"
data-category="paneApplications">
<image class="header-icon"/>
<label class="header-name">&paneApplications.title;</label>
</hbox>

Просмотреть файл

@ -32,7 +32,6 @@
class="header"
hidden="true"
data-category="paneContent">
<image class="header-icon"/>
<label class="header-name">&paneContent.title;</label>
</hbox>

Просмотреть файл

@ -91,7 +91,6 @@
class="header"
hidden="true"
data-category="paneGeneral">
<image class="header-icon"/>
<label class="header-name">&paneGeneral.title;</label>
</hbox>

Просмотреть файл

@ -71,7 +71,6 @@
class="header"
hidden="true"
data-category="panePrivacy">
<image class="header-icon"/>
<label class="header-name">&panePrivacy.title;</label>
</hbox>

Просмотреть файл

@ -36,7 +36,6 @@
class="header"
hidden="true"
data-category="paneSecurity">
<image class="header-icon"/>
<label class="header-name">&paneSecurity.title;</label>
</hbox>

Просмотреть файл

@ -34,7 +34,6 @@
class="header"
hidden="true"
data-category="paneSync">
<image class="header-icon"/>
<label class="header-name">&paneSync.title;</label>
</hbox>

Просмотреть файл

@ -2287,7 +2287,7 @@ NetworkDetailsView.prototype = {
// information available, then nothing else is to be displayed.
let cookieProps = Object.keys(cookie);
if (cookieProps.length == 2) {
return;
continue;
}
// Display any other information other than the cookie name and value

Просмотреть файл

@ -86,7 +86,7 @@ function test() {
ok(requestItem.attachment.requestHeaders,
"There should be a requestHeaders attachment available.");
is(requestItem.attachment.requestHeaders.headers.length, 8,
is(requestItem.attachment.requestHeaders.headers.length, 9,
"The requestHeaders attachment has an incorrect |headers| property.");
isnot(requestItem.attachment.requestHeaders.headersSize, 0,
"The requestHeaders attachment has an incorrect |headersSize| property.");
@ -101,7 +101,7 @@ function test() {
ok(requestItem.attachment.requestCookies,
"There should be a requestCookies attachment available.");
is(requestItem.attachment.requestCookies.cookies.length, 0,
is(requestItem.attachment.requestCookies.cookies.length, 2,
"The requestCookies attachment has an incorrect |cookies| property.");
verifyRequestItemTarget(requestItem, "GET", SIMPLE_SJS);
@ -116,9 +116,9 @@ function test() {
ok(requestItem.attachment.responseHeaders,
"There should be a responseHeaders attachment available.");
is(requestItem.attachment.responseHeaders.headers.length, 9,
is(requestItem.attachment.responseHeaders.headers.length, 10,
"The responseHeaders attachment has an incorrect |headers| property.");
is(requestItem.attachment.responseHeaders.headersSize, 255,
is(requestItem.attachment.responseHeaders.headersSize, 330,
"The responseHeaders attachment has an incorrect |headersSize| property.");
verifyRequestItemTarget(requestItem, "GET", SIMPLE_SJS);
@ -129,7 +129,7 @@ function test() {
ok(requestItem.attachment.responseCookies,
"There should be a responseCookies attachment available.");
is(requestItem.attachment.responseCookies.cookies.length, 0,
is(requestItem.attachment.responseCookies.cookies.length, 2,
"The responseCookies attachment has an incorrect |cookies| property.");
verifyRequestItemTarget(requestItem, "GET", SIMPLE_SJS);
@ -144,7 +144,7 @@ function test() {
"The status attachment has an incorrect value.");
is(requestItem.attachment.statusText, "Och Aye",
"The statusText attachment has an incorrect value.");
is(requestItem.attachment.headersSize, 255,
is(requestItem.attachment.headersSize, 330,
"The headersSize attachment has an incorrect value.");
verifyRequestItemTarget(requestItem, "GET", SIMPLE_SJS, {

Просмотреть файл

@ -35,7 +35,7 @@ function test() {
yield waitFor(aMonitor.panelWin, TAB_UPDATED)
testHeadersTab();
testCookiesTab();
yield testCookiesTab();
testParamsTab();
yield testResponseTab();
testTimingsTab();
@ -63,8 +63,8 @@ function test() {
is(tabpanel.querySelectorAll(".variables-view-scope").length, 2,
"There should be 2 header scopes displayed in this tabpanel.");
is(tabpanel.querySelectorAll(".variable-or-property").length, 17,
"There should be 17 header values displayed in this tabpanel.");
is(tabpanel.querySelectorAll(".variable-or-property").length, 19,
"There should be 19 header values displayed in this tabpanel.");
is(tabpanel.querySelectorAll(".variables-view-empty-notice").length, 0,
"The empty notice should not be displayed in this tabpanel.");
@ -74,7 +74,7 @@ function test() {
is(responseScope.querySelector(".name").getAttribute("value"),
L10N.getStr("responseHeaders") + " (" +
L10N.getFormatStr("networkMenu.sizeKB", L10N.numberWithDecimals(255/1024, 3)) + ")",
L10N.getFormatStr("networkMenu.sizeKB", L10N.numberWithDecimals(330/1024, 3)) + ")",
"The response headers scope doesn't have the correct title.");
ok(requestScope.querySelector(".name").getAttribute("value").contains(
@ -100,26 +100,26 @@ function test() {
"Content-Type", "The fourth response header name was incorrect.");
is(responseScope.querySelectorAll(".variables-view-variable .value")[3].getAttribute("value"),
"\"text/plain; charset=utf-8\"", "The fourth response header value was incorrect.");
is(responseScope.querySelectorAll(".variables-view-variable .name")[8].getAttribute("value"),
is(responseScope.querySelectorAll(".variables-view-variable .name")[9].getAttribute("value"),
"foo-bar", "The last response header name was incorrect.");
is(responseScope.querySelectorAll(".variables-view-variable .value")[8].getAttribute("value"),
is(responseScope.querySelectorAll(".variables-view-variable .value")[9].getAttribute("value"),
"\"baz\"", "The last response header value was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .name")[0].getAttribute("value"),
"Host", "The first request header name was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .value")[0].getAttribute("value"),
"\"example.com\"", "The first request header value was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .name")[5].getAttribute("value"),
"Connection", "The ante-penultimate request header name was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .value")[5].getAttribute("value"),
"\"keep-alive\"", "The ante-penultimate request header value was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .name")[6].getAttribute("value"),
"Pragma", "The penultimate request header name was incorrect.");
"Connection", "The ante-penultimate request header name was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .value")[6].getAttribute("value"),
"\"no-cache\"", "The penultimate request header value was incorrect.");
"\"keep-alive\"", "The ante-penultimate request header value was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .name")[7].getAttribute("value"),
"Cache-Control", "The last request header name was incorrect.");
"Pragma", "The penultimate request header name was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .value")[7].getAttribute("value"),
"\"no-cache\"", "The penultimate request header value was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .name")[8].getAttribute("value"),
"Cache-Control", "The last request header name was incorrect.");
is(requestScope.querySelectorAll(".variables-view-variable .value")[8].getAttribute("value"),
"\"no-cache\"", "The last request header value was incorrect.");
}
@ -127,18 +127,20 @@ function test() {
EventUtils.sendMouseEvent({ type: "mousedown" },
document.querySelectorAll("#details-pane tab")[1]);
let tab = document.querySelectorAll("#details-pane tab")[1];
let tabpanel = document.querySelectorAll("#details-pane tabpanel")[1];
return Task.spawn(function*() {
yield waitFor(aMonitor.panelWin, TAB_UPDATED);
is(tab.getAttribute("selected"), "true",
"The cookies tab in the network details pane should be selected.");
let tab = document.querySelectorAll("#details-pane tab")[1];
let tabpanel = document.querySelectorAll("#details-pane tabpanel")[1];
is(tabpanel.querySelectorAll(".variables-view-scope").length, 0,
"There should be no cookie scopes displayed in this tabpanel.");
is(tabpanel.querySelectorAll(".variable-or-property").length, 0,
"There should be no cookie values displayed in this tabpanel.");
is(tabpanel.querySelectorAll(".variables-view-empty-notice").length, 1,
"The empty notice should be displayed in this tabpanel.");
is(tab.getAttribute("selected"), "true",
"The cookies tab in the network details pane should be selected.");
is(tabpanel.querySelectorAll(".variables-view-scope").length, 2,
"There should be 2 cookie scopes displayed in this tabpanel.");
is(tabpanel.querySelectorAll(".variable-or-property").length, 6,
"There should be 6 cookie values displayed in this tabpanel.");
});
}
function testParamsTab() {

Просмотреть файл

@ -8,6 +8,9 @@ function handleRequest(request, response) {
response.setHeader("Pragma", "no-cache");
response.setHeader("Expires", "0");
response.setHeader("Set-Cookie", "bob=true; Max-Age=10; HttpOnly", true);
response.setHeader("Set-Cookie", "tom=cool; Max-Age=10; HttpOnly", true);
response.setHeader("Content-Type", "text/plain; charset=utf-8", false);
response.setHeader("Foo-Bar", "baz", false);
response.write("Hello world!");

Просмотреть файл

@ -168,13 +168,16 @@ var TextEditor = Class({
autocomplete: true
});
// Trigger editor specific events on `this`
// Trigger a few editor specific events on `this`.
this.editor.on("change", (...args) => {
this.emit("change", ...args);
});
this.editor.on("cursorActivity", (...args) => {
this.emit("cursorActivity", ...args);
});
this.editor.on("focus", (...args) => {
this.emit("focus", ...args);
});
this.appended = this.editor.appendTo(this.elt);
},

Просмотреть файл

@ -386,8 +386,9 @@ var ProjectEditor = Class({
* The file to be opened.
*/
openResource: function(resource) {
this.shells.open(resource);
let shell = this.shells.open(resource);
this.projectTree.selectResource(resource);
shell.editor.focus();
},
/**
@ -546,6 +547,10 @@ var ProjectEditor = Class({
this._editorListenAndDispatch(editor, "cursorActivity", "onEditorCursorActivity");
this._editorListenAndDispatch(editor, "load", "onEditorLoad");
this._editorListenAndDispatch(editor, "save", "onEditorSave");
editor.on("focus", () => {
this.projectTree.selectResource(this.resourceFor(editor));
});
},
/**
@ -584,8 +589,6 @@ var ProjectEditor = Class({
* All remaining parameters are passed into the handler.
*/
pluginDispatch: function(handler, ...args) {
// XXX: Memory leak when console.log an Editor here
// console.log("DISPATCHING EVENT TO PLUGIN", handler, args);
emit(this, handler, ...args);
this.plugins.forEach(plugin => {
try {
@ -608,8 +611,6 @@ var ProjectEditor = Class({
* Which plugin method to call
*/
_editorListenAndDispatch: function(editor, event, handler) {
/// XXX: Uncommenting this line also causes memory leak.
// console.log("Binding listen and dispatch", editor);
editor.on(event, (...args) => {
this.pluginDispatch(handler, editor, this.resourceFor(editor), ...args);
});

Просмотреть файл

@ -19,4 +19,5 @@ skip-if = buildapp == 'mulet'
[browser_projecteditor_menubar_02.js]
[browser_projecteditor_new_file.js]
[browser_projecteditor_stores.js]
[browser_projecteditor_tree_selection.js]
[browser_projecteditor_tree_selection_01.js]
[browser_projecteditor_tree_selection_02.js]

Просмотреть файл

@ -59,6 +59,12 @@ function selectFileSubsequentLoad(projecteditor, resource) {
return;
}
// Make sure text editors are focused immediately when selected.
let focusPromise = promise.resolve();
if (projecteditor.currentEditor.editor) {
focusPromise = onEditorFocus(projecteditor.currentEditor);
}
// Only activated should fire the next time
// (may add load() if we begin checking for changes from disk)
let [editorActivated] = yield promise.all([
@ -66,4 +72,15 @@ function selectFileSubsequentLoad(projecteditor, resource) {
]);
is (editorActivated, projecteditor.currentEditor, "Editor has been activated for " + resource.path);
yield focusPromise;
}
function onEditorFocus(editor) {
let def = promise.defer();
editor.on("focus", function focus() {
editor.off("focus", focus);
def.resolve();
});
return def.promise;
}

Просмотреть файл

@ -0,0 +1,70 @@
/* 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";
// Test that files get reselected in the tree when their editor
// is focused. https://bugzilla.mozilla.org/show_bug.cgi?id=1011116.
let test = asyncTest(function*() {
let projecteditor = yield addProjectEditorTabForTempDirectory();
let TEMP_PATH = projecteditor.project.allPaths()[0];
is (getTempFile("").path, TEMP_PATH, "Temp path is set correctly.");
ok (projecteditor.currentEditor, "There is an editor for projecteditor");
let resources = projecteditor.project.allResources();
is (
resources.map(r=>r.basename).join("|"),
"ProjectEditor|css|styles.css|data|img|icons|128x128.png|16x16.png|32x32.png|vector.svg|fake.png|js|script.js|index.html|LICENSE|README.md",
"Resources came through in proper order"
);
for (let i = 0; i < resources.length; i++){
yield selectAndRefocusFile(projecteditor, resources[i]);
}
});
function selectAndRefocusFile(projecteditor, resource) {
ok (resource && resource.path, "A valid resource has been passed in for selection " + (resource && resource.path));
projecteditor.projectTree.selectResource(resource);
if (resource.isDir) {
return;
}
let [editorCreated, editorLoaded, editorActivated] = yield promise.all([
onceEditorCreated(projecteditor),
onceEditorLoad(projecteditor),
onceEditorActivated(projecteditor)
]);
if (projecteditor.currentEditor.editor) {
// This is a text editor. Go ahead and select a directory then refocus
// the editor to make sure it is reselected in tree.
let treeContainer = projecteditor.projectTree.getViewContainer(getDirectoryInStore(resource));
treeContainer.line.click();
EventUtils.synthesizeMouseAtCenter(treeContainer.elt, {}, treeContainer.elt.ownerDocument.defaultView);
let waitForTreeSelect = onTreeSelection(projecteditor);
projecteditor.currentEditor.focus();
yield waitForTreeSelect;
is (projecteditor.projectTree.getSelectedResource(), resource, "The resource gets reselected in the tree");
}
}
// Return a directory to select in the tree.
function getDirectoryInStore(resource) {
return resource.store.root.childrenSorted.filter(r=>r.isDir)[0];
}
function onTreeSelection(projecteditor) {
let def = promise.defer();
projecteditor.projectTree.on("selection", function selection() {
projecteditor.projectTree.off("focus", selection);
def.resolve();
});
return def.promise;
}

Просмотреть файл

@ -33,6 +33,9 @@ const UPDATE_STYLESHEET_THROTTLE_DELAY = 500;
// Pref which decides if CSS autocompletion is enabled in Style Editor or not.
const AUTOCOMPLETION_PREF = "devtools.styleeditor.autocompletion-enabled";
// Pref which decides whether updates to the stylesheet use transitions
const TRANSITION_PREF = "devtools.styleeditor.transitions";
// How long to wait to update linked CSS file after original source was saved
// to disk. Time in ms.
const CHECK_LINKED_SHEET_DELAY=500;
@ -461,7 +464,9 @@ StyleSheetEditor.prototype = {
this._state.text = this.sourceEditor.getText();
}
this.styleSheet.update(this._state.text, true);
let transitionsEnabled = Services.prefs.getBoolPref(TRANSITION_PREF);
this.styleSheet.update(this._state.text, transitionsEnabled);
},
/**

Просмотреть файл

@ -11,6 +11,7 @@ loader.lazyImporter(this, "VariablesView", "resource:///modules/devtools/Variabl
loader.lazyImporter(this, "escapeHTML", "resource:///modules/devtools/VariablesView.jsm");
loader.lazyImporter(this, "gDevTools", "resource:///modules/devtools/gDevTools.jsm");
loader.lazyImporter(this, "Task","resource://gre/modules/Task.jsm");
loader.lazyImporter(this, "PluralForm", "resource://gre/modules/PluralForm.jsm");
const Heritage = require("sdk/core/heritage");
const URI = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
@ -2178,22 +2179,34 @@ Widgets.ObjectRenderers.add({
this._text(" [ ");
let shown = 0;
for (let item of items) {
if (shown > 0) {
this._text(", ");
}
let isFirst = true;
let emptySlots = 0;
// A helper that renders a comma between items if isFirst == false.
let renderSeparator = () => !isFirst && this._text(", ");
if (item !== null) {
for (let item of items) {
if (item === null) {
emptySlots++;
}
else {
renderSeparator();
isFirst = false;
if (emptySlots) {
this._renderEmptySlots(emptySlots);
emptySlots = 0;
}
let elem = this.message._renderValueGrip(item, { concise: true });
this.element.appendChild(elem);
} else if (shown == (items.length - 1)) {
this._text(", ");
}
shown++;
}
if (emptySlots) {
renderSeparator();
this._renderEmptySlots(emptySlots, false);
}
let shown = items.length;
if (shown < preview.length) {
this._text(", ");
@ -2204,6 +2217,16 @@ Widgets.ObjectRenderers.add({
this._text(" ]");
},
_renderEmptySlots: function(aNumSlots, aAppendComma=true) {
let slotLabel = l10n.getStr("emptySlotLabel");
let slotText = PluralForm.get(aNumSlots, slotLabel);
this._text("<" + slotText.replace("#1", aNumSlots) + ">");
if (aAppendComma) {
this._text(", ");
}
},
}); // Widgets.ObjectRenderers.byKind.ArrayLike
/**

Просмотреть файл

@ -294,6 +294,7 @@ skip-if = buildapp == 'mulet'
[browser_webconsole_output_03.js]
[browser_webconsole_output_04.js]
[browser_webconsole_output_05.js]
[browser_webconsole_output_06.js]
[browser_webconsole_output_dom_elements_01.js]
[browser_webconsole_output_dom_elements_02.js]
[browser_webconsole_output_dom_elements_03.js]

Просмотреть файл

@ -86,7 +86,7 @@ let inputTests = [
// 8 - array with holes and a cyclic reference
{
input: "window.array4",
output: 'Array [ , , , , , "test", Array[7] ]',
output: 'Array [ <5 empty slots>, "test", Array[7] ]',
printOutput: '",,,,,test,"',
inspectable: true,
variablesViewLabel: "Array[7]",

Просмотреть файл

@ -0,0 +1,114 @@
/* 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 the webconsole output for various arrays.
const TEST_URI = "data:text/html;charset=utf8,test for console output - 06";
let inputTests = [
// 1 - array with empty slots only
{
input: 'Array(5)',
output: 'Array [ <5 empty slots> ]',
printOutput: ',,,,',
inspectable: true,
variablesViewLabel: "Array[5]",
},
// 2 - array with one empty slot at the beginning
{
input: '[,1,2,3]',
output: 'Array [ <1 empty slot>, 1, 2, 3 ]',
printOutput: ",1,2,3",
inspectable: true,
variablesViewLabel: "Array[4]",
},
// 3 - array with multiple consecutive empty slots at the beginning
{
input: '[,,,3,4,5]',
output: 'Array [ <3 empty slots>, 3, 4, 5 ]',
printOutput: ",,,3,4,5",
inspectable: true,
variablesViewLabel: "Array[6]",
},
// 4 - array with one empty slot at the middle
{
input: '[0,1,,3,4,5]',
output: 'Array [ 0, 1, <1 empty slot>, 3, 4, 5 ]',
printOutput: "0,1,,3,4,5",
inspectable: true,
variablesViewLabel: "Array[6]",
},
// 5 - array with multiple successive empty slots at the middle
{
input: '[0,1,,,,5]',
output: 'Array [ 0, 1, <3 empty slots>, 5 ]',
printOutput: "0,1,,,,5",
inspectable: true,
variablesViewLabel: "Array[6]",
},
// 6 - array with multiple non successive single empty slots
{
input: '[0,,2,,4,5]',
output: 'Array [ 0, <1 empty slot>, 2, <1 empty slot>, 4, 5 ]',
printOutput: "0,,2,,4,5",
inspectable: true,
variablesViewLabel: "Array[6]",
},
// 7 - array with multiple multi-slot holes
{
input: '[0,,,3,,,,7,8]',
output: 'Array [ 0, <2 empty slots>, 3, <3 empty slots>, 7, 8 ]',
printOutput: "0,,,3,,,,7,8",
inspectable: true,
variablesViewLabel: "Array[9]",
},
// 8 - array with a single slot hole at the end
{
input: '[0,1,2,3,4,,]',
output: 'Array [ 0, 1, 2, 3, 4, <1 empty slot> ]',
printOutput: "0,1,2,3,4,",
inspectable: true,
variablesViewLabel: "Array[6]",
},
// 9 - array with multiple consecutive empty slots at the end
{
input: '[0,1,2,,,,]',
output: 'Array [ 0, 1, 2, <3 empty slots> ]',
printOutput: "0,1,2,,,",
inspectable: true,
variablesViewLabel: "Array[6]",
},
// 10 - array with members explicitly set to null
{
input: '[0,null,null,3,4,5]',
output: 'Array [ 0, null, null, 3, 4, 5 ]',
printOutput: "0,,,3,4,5",
inspectable: true,
variablesViewLabel: "Array[6]"
},
// 11 - array with members explicitly set to undefined
{
input: '[0,undefined,undefined,3,4,5]',
output: 'Array [ 0, undefined, undefined, 3, 4, 5 ]',
printOutput: "0,,,3,4,5",
inspectable: true,
variablesViewLabel: "Array[6]"
}
];
function test() {
Task.spawn(function*() {
let {tab} = yield loadTab(TEST_URI);
let hud = yield openConsole(tab);
return checkOutputForInputs(hud, inputTests);
}).then(finishUp);
}
function finishUp() {
inputTests = null;
finishTest();
}

Просмотреть файл

@ -241,3 +241,12 @@ selfxss.okstring=allow pasting
# you hover the arrow for expanding/collapsing the message details. For
# console.error() and other messages we show the stacktrace.
messageToggleDetails=Show/hide message details.
# LOCALIZATION NOTE (emptySlotLabel): the text is displayed when an Array
# with empty slots is printed to the console.
# This is a semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 number of empty slots
# example: 1 empty slot
# example: 5 empty slots
emptySlotLabel=#1 empty slot;#1 empty slots

Просмотреть файл

@ -151,8 +151,6 @@ browser.jar:
skin/classic/browser/preferences/in-content/check@2x.png (../shared/incontentprefs/check@2x.png)
skin/classic/browser/preferences/in-content/icons.png (../shared/incontentprefs/icons.png)
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
skin/classic/browser/preferences/in-content/help-glyph.png (../shared/incontentprefs/help-glyph.png)
skin/classic/browser/preferences/in-content/help-glyph@2x.png (../shared/incontentprefs/help-glyph@2x.png)
skin/classic/browser/preferences/in-content/dropdown.png (../shared/incontentprefs/dropdown.png)

Просмотреть файл

@ -12,6 +12,12 @@ tab[selected] {
border-bottom-right-radius: 0;
}
button,
colorpicker[type="button"],
menulist {
margin: 2px 4px;
}
button > .button-box,
menulist > .menulist-label-box {
-moz-appearance: none;
@ -25,6 +31,10 @@ button[type="menu"] > .button-box > .button-menu-dropmarker {
-moz-margin-end: 0;
}
menulist {
font-size: inherit;
}
menulist:not([editable="true"]) > .menulist-dropmarker {
display: -moz-box;
margin-top: 6px;
@ -80,3 +90,17 @@ menulist.actionsMenu > .menulist-dropmarker {
margin-top: 11px;
margin-bottom: 11px;
}
textbox + button,
filefield + button {
-moz-margin-start: -4px;
}
#dialogTitle {
-moz-margin-start: 12px !important;
}
.actionButtons {
margin-right: 8px !important;
margin-left: 8px !important;
}

Просмотреть файл

@ -243,8 +243,6 @@ browser.jar:
skin/classic/browser/preferences/in-content/check@2x.png (../shared/incontentprefs/check@2x.png)
skin/classic/browser/preferences/in-content/icons.png (../shared/incontentprefs/icons.png)
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
skin/classic/browser/preferences/in-content/help-glyph.png (../shared/incontentprefs/help-glyph.png)
skin/classic/browser/preferences/in-content/help-glyph@2x.png (../shared/incontentprefs/help-glyph@2x.png)
skin/classic/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)

Просмотреть файл

@ -18,6 +18,12 @@ tab[selected] {
text-shadow: none;
}
button,
colorpicker[type="button"],
menulist {
margin-top: 3px;
}
menulist:not([editable="true"]) > menupopup > menuitem[checked="true"]::before,
menulist:not([editable="true"]) > menupopup > menuitem[selected="true"]::before {
display: none;
@ -87,6 +93,22 @@ description {
line-height: 22px;
}
#downloadFolder > .fileFieldContentBox {
-moz-padding-start: 3px;
}
textbox + button {
-moz-margin-start: -4px;
}
filefield + button {
-moz-margin-start: -8px;
}
#dialogTitle {
-moz-margin-start: 6px !important;
}
#popupPolicyRow {
/* Override styles from
browser/themes/osx/preferences/preferences.css */

Двоичные данные
browser/themes/shared/incontentprefs/header.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 7.5 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 15 KiB

Просмотреть файл

@ -12,7 +12,7 @@ prefwindow,
.windowDialog,
page {
-moz-appearance: none;
background-color: white;
background-color: #f1f1f1;
color: #424E5A;
}
@ -61,7 +61,6 @@ groupbox {
border: none;
margin-top: 15px;
margin-bottom: 15px;
-moz-margin-start: 60px;
-moz-margin-end: 0;
-moz-padding-start: 0;
-moz-padding-end: 0;
@ -86,7 +85,6 @@ tabpanels {
}
tabs {
-moz-margin-start: 60px;
margin-bottom: 15px;
border-top: 1px solid #c1c1c1;
border-bottom: 1px solid #c1c1c1;
@ -583,14 +581,14 @@ radio[disabled="true"] > .radio-check {
/* header */
.header {
border-bottom: 1px solid #c8c8c8;
margin-bottom: 15px;
padding-bottom: 15px;
}
.header-icon {
width: 40px;
max-height: 40px;
-moz-margin-end: 20px;
list-style-image: url("chrome://browser/skin/preferences/in-content/header.png");
#header-advanced {
border-bottom: none;
padding-bottom: 0;
}
.header-name {
@ -600,68 +598,6 @@ radio[disabled="true"] > .radio-check {
margin: 0;
}
#header-general > .header-icon {
-moz-image-region: rect(0, 40px, 40px, 0);
}
#header-content > .header-icon {
-moz-image-region: rect(0, 80px, 40px, 40px);
}
#header-application > .header-icon {
-moz-image-region: rect(0, 120px, 40px, 80px);
}
#header-privacy > .header-icon {
-moz-image-region: rect(0, 160px, 40px, 120px);
}
#header-security > .header-icon {
-moz-image-region: rect(0, 200px, 40px, 160px);
}
#header-sync > .header-icon {
-moz-image-region: rect(0, 240px, 40px, 200px);
}
#header-advanced > .header-icon {
-moz-image-region: rect(0, 280px, 40px, 240px);
}
@media (min-resolution: 2dppx) {
.header-icon {
list-style-image: url("chrome://browser/skin/preferences/in-content/header@2x.png");
}
#header-general > .header-icon {
-moz-image-region: rect(0, 80px, 80px, 0);
}
#header-content > .header-icon {
-moz-image-region: rect(0, 160px, 80px, 80px);
}
#header-application > .header-icon {
-moz-image-region: rect(0, 240px, 80px, 160px);
}
#header-privacy > .header-icon {
-moz-image-region: rect(0, 320px, 80px, 240px);
}
#header-security > .header-icon {
-moz-image-region: rect(0, 400px, 80px, 320px);
}
#header-sync > .header-icon {
-moz-image-region: rect(0, 480px, 80px, 400px);
}
#header-advanced > .header-icon {
-moz-image-region: rect(0, 560px, 80px, 480px);
}
}
/* General Pane */
filefield {
@ -685,10 +621,34 @@ filefield {
-moz-padding-start: 36px;
}
textbox:-moz-locale-dir(rtl),
.fileFieldLabel:-moz-locale-dir(rtl),
textbox + button:-moz-locale-dir(ltr),
filefield + button:-moz-locale-dir(ltr) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
textbox:-moz-locale-dir(ltr),
.fileFieldLabel:-moz-locale-dir(ltr),
textbox + button:-moz-locale-dir(rtl),
filefield + button:-moz-locale-dir(rtl) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
textbox + button,
filefield + button {
-moz-border-start: none;
}
#downloadFolder {
-moz-margin-start: 0;
}
/* Applications Pane Styles */
#applicationsContent {
-moz-margin-start: 60px;
padding: 15px 0;
}
@ -811,10 +771,6 @@ description > html|a {
background-color: #FBFBFB;
}
#weavePrefsDeck {
-moz-margin-start: 60px;
}
#noFxaAccount {
/* Overriding the margins from the base preferences.css theme file.
These overrides can be simplified by fixing bug 1027174 */
@ -837,7 +793,6 @@ description > html|a {
#encryptionPanel {
margin-top: 15px;
-moz-margin-start: 60px;
}
#telemetryLearnMore,
@ -876,10 +831,6 @@ description > html|a {
min-width: 66ch;
}
#dialogTitle {
-moz-margin-start: 5px !important;
}
.close-icon {
background-color: transparent !important;
border: none;

Просмотреть файл

@ -124,7 +124,12 @@
transition: opacity 100ms ease-out;
}
.newtab-thumbnail.enhanced-content:hover {
opacity: 0;
}
.newtab-site[type=affiliate] .newtab-thumbnail,
.newtab-site[type=enhanced] .newtab-thumbnail,
.newtab-site[type=organic] .newtab-thumbnail,
.newtab-site[type=sponsored] .newtab-thumbnail {
background-position: center center;

Просмотреть файл

@ -177,8 +177,6 @@ browser.jar:
skin/classic/browser/preferences/in-content/check@2x.png (../shared/incontentprefs/check@2x.png)
skin/classic/browser/preferences/in-content/icons.png (../shared/incontentprefs/icons.png)
skin/classic/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
skin/classic/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
skin/classic/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
skin/classic/browser/preferences/in-content/help-glyph.png (../shared/incontentprefs/help-glyph.png)
skin/classic/browser/preferences/in-content/help-glyph@2x.png (../shared/incontentprefs/help-glyph@2x.png)
skin/classic/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)
@ -596,8 +594,6 @@ browser.jar:
skin/classic/aero/browser/preferences/in-content/check@2x.png (../shared/incontentprefs/check@2x.png)
skin/classic/aero/browser/preferences/in-content/icons.png (../shared/incontentprefs/icons.png)
skin/classic/aero/browser/preferences/in-content/icons@2x.png (../shared/incontentprefs/icons@2x.png)
skin/classic/aero/browser/preferences/in-content/header.png (../shared/incontentprefs/header.png)
skin/classic/aero/browser/preferences/in-content/header@2x.png (../shared/incontentprefs/header@2x.png)
skin/classic/aero/browser/preferences/in-content/help-glyph.png (../shared/incontentprefs/help-glyph.png)
skin/classic/aero/browser/preferences/in-content/help-glyph@2x.png (../shared/incontentprefs/help-glyph@2x.png)
skin/classic/aero/browser/preferences/in-content/sorter.png (../shared/incontentprefs/sorter.png)

Просмотреть файл

@ -8,6 +8,12 @@ caption {
background-color: transparent;
}
button,
colorpicker[type="button"],
menulist {
margin: 2px 4px;
}
menulist:not([editable="true"]) > .menulist-dropmarker {
margin-top: 1px;
margin-bottom: 1px;
@ -31,3 +37,17 @@ radio {
.actionsMenu > .menulist-label-box > .menulist-icon {
-moz-margin-end: 9px;
}
textbox + button,
filefield + button {
-moz-margin-start: -4px;
}
#dialogTitle {
-moz-margin-start: 13px !important;
}
.actionButtons {
margin-right: 8px !important;
margin-left: 8px !important;
}

Просмотреть файл

@ -80,7 +80,9 @@
<item name="android:background">@drawable/ab_stacked_transparent_light_holo</item>
</style>
<style name="GeckoActionBar.Title" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<style name="TextAppearance.Widget.ActionBar.Title" parent="@android:style/TextAppearance.Medium"/>
<style name="GeckoActionBar.Title" parent="TextAppearance.Widget.ActionBar.Title">
<item name="android:drawableLeft">@drawable/ab_done</item>
<item name="android:background">@android:color/transparent</item>
<item name="android:paddingLeft">15dp</item>

Просмотреть файл

@ -4,10 +4,12 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="GeckoDialogTitle">
<!-- Override this to use a Holo theme on v14+ -->
<!-- Override this to use a Holo theme on v13+ -->
<item name="android:textAppearance">@android:style/TextAppearance.Holo.DialogWindowTitle</item>
</style>
<style name="TextAppearance.Widget.ActionBar.Title" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"/>
</resources>

Просмотреть файл

@ -386,7 +386,6 @@ Snippets.prototype = {
observe: function(subject, topic, data) {
switch(topic) {
case "browser-delayed-startup-finished":
Services.obs.removeObserver(this, "browser-delayed-startup-finished", false);
if (Services.prefs.getBoolPref("browser.snippets.syncPromo.enabled")) {
loadSyncPromoBanner();
}

Просмотреть файл

@ -231,7 +231,7 @@ FireflyApp.prototype = {
},
_handle_meta_response: function(data) {
switch(data.cmd) {
switch (data.cmd) {
case "create-session":
case "~create-session":
// if we get a response form start-app, assume we have a connection already
@ -303,11 +303,6 @@ FireflyApp.prototype = {
},
shutdown: function() {
if (this._info_timer) {
this._info_timer.clear();
this._info_timer = null;
}
this.stop(function() {
this._send_meta_cmd(PROTO_CMD_VALUE_END_SESSION);
if (this._mediaListener) {

Просмотреть файл

@ -5,7 +5,6 @@
package org.mozilla.search.autocomplete;
import android.content.Context;
import android.text.SpannableString;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

Просмотреть файл

@ -14,9 +14,9 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.TextView;
import org.mozilla.search.R;
@ -24,7 +24,7 @@ import org.mozilla.search.R;
public class ClearableEditText extends FrameLayout {
private EditText editText;
private Button clearButton;
private ImageButton clearButton;
private InputMethodManager inputMethodManager;
private TextListener listener;
@ -71,7 +71,7 @@ public class ClearableEditText extends FrameLayout {
}
});
clearButton = (Button) findViewById(R.id.clear_button);
clearButton = (ImageButton) findViewById(R.id.clear_button);
clearButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
@ -100,6 +100,9 @@ public class ClearableEditText extends FrameLayout {
editText.setFocusable(active);
editText.setFocusableInTouchMode(active);
final int leftDrawable = active ? R.drawable.search_icon_active : R.drawable.search_icon_inactive;
editText.setCompoundDrawablesWithIntrinsicBounds(leftDrawable, 0, 0, 0);
if (active) {
editText.requestFocus();
inputMethodManager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.0 KiB

После

Ширина:  |  Высота:  |  Размер: 3.0 KiB

Двоичные данные
mobile/android/search/res/drawable-hdpi/search_icon_active.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.4 KiB

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.9 KiB

После

Ширина:  |  Высота:  |  Размер: 2.9 KiB

Двоичные данные
mobile/android/search/res/drawable-mdpi/search_icon_active.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.1 KiB

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.2 KiB

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Двоичные данные
mobile/android/search/res/drawable-xhdpi/search_icon_active.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.7 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.8 KiB

После

Ширина:  |  Высота:  |  Размер: 3.8 KiB

Двоичные данные
mobile/android/search/res/drawable-xxhdpi/search_clear.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.3 KiB

Двоичные данные
mobile/android/search/res/drawable-xxhdpi/search_icon_active.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.3 KiB

Двоичные данные
mobile/android/search/res/drawable-xxhdpi/search_icon_inactive.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.4 KiB

Просмотреть файл

@ -0,0 +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/. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_focused="true"
android:drawable="@drawable/edit_text_focused"/>
<item android:drawable="@android:color/transparent"/>
</selector>

Просмотреть файл

@ -0,0 +1,20 @@
<!-- 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/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="-2dp"
android:right="-2dp"
android:left="-2dp">
<shape>
<padding
android:top="10dp"
android:bottom="10dp"/>
<solid android:color="@android:color/transparent"/>
<stroke android:width="2dp" android:color="@color/highlight_orange"/>
</shape>
</item>
</layer-list>

Просмотреть файл

@ -3,46 +3,23 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<padding
android:bottom="5dp"
android:left="10dp"
android:right="10dp"
android:top="10dp"/>
<solid android:color="@color/transparent"/>
android:bottom="@dimen/card_background_padding_y"
android:top="@dimen/card_background_padding_y"
android:left="@dimen/card_background_padding_x"
android:right="@dimen/card_background_padding_x"/>
<solid android:color="@android:color/transparent"/>
</shape>
</item>
<item>
<shape>
<padding
android:bottom="1dp"
android:left="0dp"
android:right="0dp"
android:top="0dp"/>
<solid android:color="@color/card_shadow_1"/>
<corners android:radius="2dp"/>
</shape>
</item>
<item>
<shape>
<padding
android:bottom="1dp"
android:left="0dp"
android:right="0dp"
android:top="0dp"/>
<solid android:color="@color/card_shadow_2"/>
<corners android:radius="2dp"/>
</shape>
</item>
<!-- Background -->
<item>
<shape>
<solid android:color="@color/card_background"/>
<corners android:radius="2dp"/>
<corners android:radius="5dp"/>
<stroke android:width="1dp" android:color="@color/card_border" />
</shape>
</item>
</layer-list>

Просмотреть файл

@ -8,21 +8,27 @@
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:imeOptions="actionSearch"
android:inputType="textNoSuggestions|textVisiblePassword"
android:drawableLeft="@drawable/search_icon"
android:drawablePadding="10dp"
android:drawableLeft="@drawable/search_icon_inactive"
android:drawablePadding="5dp"
android:textSize="16sp"
android:background="@drawable/edit_text_background"
android:focusable="false"
android:focusableInTouchMode="false"
android:hint="@string/search_bar_hint"/>
android:textColorHighlight="@color/highlight_orange"
android:hint="@string/search_for_something" />
<Button
<ImageButton
android:id="@+id/clear_button"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_width="30dp"
android:layout_height="30dp"
android:paddingLeft="10dp"
android:layout_gravity="right|center_vertical"
android:layout_marginRight="10dp"
android:background="@drawable/search_clear"
android:background="@android:color/transparent"
android:src="@drawable/search_clear"
android:scaleType="centerInside"
android:visibility="gone"/>
</merge>

Просмотреть файл

@ -13,14 +13,19 @@
<org.mozilla.search.autocomplete.ClearableEditText
android:id="@+id/auto_complete_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"/>
android:layout_height="@dimen/search_bar_height"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingLeft="@dimen/card_background_padding_x"
android:paddingRight="@dimen/card_background_padding_x"/>
<ListView
android:id="@+id/auto_complete_dropdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:background="@color/global_background_color"
android:divider="@null"
android:dividerHeight="0dp"
android:visibility="gone"/>
</LinearLayout>

Просмотреть файл

@ -2,26 +2,33 @@
- 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/. -->
<LinearLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/search_card_background"
android:paddingLeft="@dimen/card_padding_x"
android:paddingRight="@dimen/card_padding_x"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:descendantFocusability="blocksDescendants"
android:orientation="horizontal">
<TextView
android:id="@+id/auto_complete_row_text"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"/>
android:paddingTop="@dimen/card_padding_y"
android:paddingBottom="@dimen/card_padding_y"
android:textSize="16sp"/>
<Button
android:id="@+id/auto_complete_row_jump_button"
style="@style/BorderLessButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_jump_arrow"/>
android:layout_gravity="right|center_vertical"
android:text="@string/search_jump_arrow"
android:background="@android:color/transparent"
android:padding="0dp" />
</LinearLayout>
</FrameLayout>

Просмотреть файл

@ -7,11 +7,9 @@
android:id="@+id/site_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="20dp"
android:padding="25dp"
android:background="@drawable/search_card_background"
android:fontFamily="sans-serif-thin"
android:paddingTop="@dimen/card_padding_y"
android:paddingBottom="@dimen/card_padding_y"
android:paddingLeft="@dimen/card_padding_x"
android:paddingRight="@dimen/card_padding_x"
android:textSize="16sp"/>

Просмотреть файл

@ -4,10 +4,10 @@
<resources>
<style name="AppTheme" parent="@android:style/Theme.Holo.Light.NoActionBar"/>
<style name="BorderLessButton">
<item name="android:background">?android:attr/selectableItemBackground</item>
<!-- Base application theme. -->
<style name="AppTheme" parent="@android:style/Theme.Holo.Light.NoActionBar">
<item name="android:windowBackground">@color/global_background_color</item>
<item name="android:colorBackground">@color/global_background_color</item>
</style>
</resources>

Просмотреть файл

@ -4,14 +4,13 @@
<resources>
<color name="transparent">#00FFFFFF</color>
<color name="global_background_color">#EBEBF0</color>
<color name="highlight_orange">#FF9500</color>
<!-- card colors -->
<color name="card_background">#ffffff</color>
<color name="card_shadow_1">#d4d4d4</color>
<color name="card_shadow_2">#dddddd</color>
<color name="card_border">#BFBFBF</color>
<!-- Search suggestion highlight color is defined in SearchFragment.java -->
</resources>

Просмотреть файл

@ -3,8 +3,17 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<resources>
<!--This is used to offset the webview so that it is not covered-->
<!--by the search bar. If we change the height of the search bar-->
<!--then this will need to be updated.-->
<dimen name="search_bar_height">55dp</dimen>
<!-- The height of the search bar is also used to offset the PreSearchFragment
and PostSearchFragment contents -->
<dimen name="search_bar_height">65dp</dimen>
<!-- We use background padding to create space around the cards -->
<dimen name="card_background_padding_x">15dp</dimen>
<dimen name="card_background_padding_y">3dp</dimen>
<!-- To create the padding we see around the content of each
card, we need to account for the padding of the background -->
<dimen name="card_padding_x">38dp</dimen>
<dimen name="card_padding_y">23dp</dimen>
</resources>

Просмотреть файл

@ -5,12 +5,9 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="@android:style/Theme.Light.NoTitleBar">
</style>
<style name="BorderLessButton">
<item name="android:windowBackground">@color/global_background_color</item>
<item name="android:colorBackground">@color/global_background_color</item>
</style>
</resources>

Просмотреть файл

@ -5,4 +5,4 @@
<!ENTITY search_jump_arrow '&#8598;'>
<!ENTITY search_app_name 'Firefox Search'>
<!ENTITY search_header_image_content_description 'Firefox Search Header Image'>
<!ENTITY search_bar_hint 'Search for anything'>
<!ENTITY search_for_something 'Search for something'>

Просмотреть файл

@ -1,4 +1,4 @@
<string name="search_app_name">&search_app_name;</string>
<string name="search_jump_arrow">&search_jump_arrow;</string>
<string name="search_header_image_content_description">&search_header_image_content_description;</string>
<string name="search_bar_hint">&search_bar_hint;</string>
<string name="search_for_something">&search_for_something;</string>

Просмотреть файл

@ -52,7 +52,7 @@ nsParentalControlsService::Log(int16_t aEntryType,
NS_IMETHODIMP
nsParentalControlsService::RequestURIOverride(nsIURI *aTarget,
nsIInterfaceRequestor *aCocoadowContext,
nsIInterfaceRequestor *aWindowContext,
bool *_retval)
{
return NS_ERROR_NOT_AVAILABLE;
@ -60,7 +60,7 @@ nsParentalControlsService::RequestURIOverride(nsIURI *aTarget,
NS_IMETHODIMP
nsParentalControlsService::RequestURIOverrides(nsIArray *aTargets,
nsIInterfaceRequestor *aCocoadowContext,
nsIInterfaceRequestor *aWindowContext,
bool *_retval)
{
return NS_ERROR_NOT_AVAILABLE;

Просмотреть файл

@ -47,7 +47,7 @@ nsParentalControlsService::Log(int16_t aEntryType,
NS_IMETHODIMP
nsParentalControlsService::RequestURIOverride(nsIURI *aTarget,
nsIInterfaceRequestor *aCocoadowContext,
nsIInterfaceRequestor *aWindowContext,
bool *_retval)
{
return NS_ERROR_NOT_AVAILABLE;
@ -55,7 +55,7 @@ nsParentalControlsService::RequestURIOverride(nsIURI *aTarget,
NS_IMETHODIMP
nsParentalControlsService::RequestURIOverrides(nsIArray *aTargets,
nsIInterfaceRequestor *aCocoadowContext,
nsIInterfaceRequestor *aWindowContext,
bool *_retval)
{
return NS_ERROR_NOT_AVAILABLE;

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -888,7 +888,7 @@ let StyleSheetActor = protocol.ActorClass({
this._insertTransistionRule();
}
else {
this._notifyStyleApplied();
events.emit(this, "style-applied");
}
this._getMediaRules().then((rules) => {

Просмотреть файл

@ -70,6 +70,11 @@ let DirectoryLinksProvider = {
// download default interval is 24 hours in milliseconds
_downloadIntervalMS: 86400000,
/**
* A mapping from eTLD+1 to an enhanced link objects
*/
_enhancedLinks: new Map(),
get _observedPrefs() Object.freeze({
linksURL: PREF_DIRECTORY_SOURCE,
matchOSLocale: PREF_MATCH_OS_LOCALE,
@ -146,6 +151,14 @@ let DirectoryLinksProvider = {
}
},
/**
* Get the eTLD+1 / base domain from a url spec
*/
_extractSite: function DirectoryLinksProvider_extractSite(url) {
let linkURI = Services.io.newURI(url, null, null);
return Services.eTLD.getBaseDomain(linkURI);
},
_fetchAndCacheLinks: function DirectoryLinksProvider_fetchAndCacheLinks(uri) {
let deferred = Promise.defer();
let xmlHttp = new XMLHttpRequest();
@ -305,14 +318,31 @@ let DirectoryLinksProvider = {
return Promise.resolve();
},
/**
* Get the enhanced link object for a link (whether history or directory)
*/
getEnhancedLink: function DirectoryLinksProvider_getEnhancedLink(link) {
// Use the provided link if it's already enhanced
return link.enhancedImageURI && link ||
this._enhancedLinks.get(this._extractSite(link.url));
},
/**
* Gets the current set of directory links.
* @param aCallback The function that the array of links is passed to.
*/
getLinks: function DirectoryLinksProvider_getLinks(aCallback) {
this._readDirectoryLinksFile().then(rawLinks => {
// Reset the cache of enhanced images for this new set of links
this._enhancedLinks.clear();
// all directory links have a frecency of DIRECTORY_FRECENCY
aCallback(rawLinks.map((link, position) => {
// Stash the enhanced image for the site
if (link.enhancedImageURI) {
this._enhancedLinks.set(this._extractSite(link.url), link);
}
link.directoryIndex = position;
link.frecency = DIRECTORY_FRECENCY;
link.lastVisitDate = rawLinks.length - position;

Просмотреть файл

@ -42,8 +42,9 @@ XPCOMUtils.defineLazyGetter(this, "gUnicodeConverter", function () {
return converter;
});
// The preference that tells whether this feature is enabled.
// Boolean preferences that control newtab content
const PREF_NEWTAB_ENABLED = "browser.newtabpage.enabled";
const PREF_NEWTAB_ENHANCED = "browser.newtabpage.enhanced";
// The preference that tells the number of rows of the newtab grid.
const PREF_NEWTAB_ROWS = "browser.newtabpage.rows";
@ -209,6 +210,11 @@ let AllPages = {
*/
_enabled: null,
/**
* Cached value that tells whether the New Tab Page feature is enhanced.
*/
_enhanced: null,
/**
* Adds a page to the internal list of pages.
* @param aPage The page to register.
@ -246,6 +252,24 @@ let AllPages = {
Services.prefs.setBoolPref(PREF_NEWTAB_ENABLED, !!aEnabled);
},
/**
* Returns whether the history tiles are enhanced.
*/
get enhanced() {
if (this._enhanced === null)
this._enhanced = Services.prefs.getBoolPref(PREF_NEWTAB_ENHANCED);
return this._enhanced;
},
/**
* Enables or disables the enhancement of history tiles feature.
*/
set enhanced(aEnhanced) {
if (this.enhanced != aEnhanced)
Services.prefs.setBoolPref(PREF_NEWTAB_ENHANCED, !!aEnhanced);
},
/**
* Returns the number of registered New Tab Pages (i.e. the number of open
* about:newtab instances).
@ -288,7 +312,14 @@ let AllPages = {
observe: function AllPages_observe(aSubject, aTopic, aData) {
if (aTopic == "nsPref:changed") {
// Clear the cached value.
this._enabled = null;
switch (aData) {
case PREF_NEWTAB_ENABLED:
this._enabled = null;
break;
case PREF_NEWTAB_ENHANCED:
this._enhanced = null;
break;
}
}
// and all notifications get forwarded to each page.
this._pages.forEach(function (aPage) {
@ -302,6 +333,7 @@ let AllPages = {
*/
_addObserver: function AllPages_addObserver() {
Services.prefs.addObserver(PREF_NEWTAB_ENABLED, this, true);
Services.prefs.addObserver(PREF_NEWTAB_ENHANCED, this, true);
Services.obs.addObserver(this, "page-thumbnail:create", true);
this._addObserver = function () {};
},

Просмотреть файл

@ -466,3 +466,52 @@ add_task(function test_DirectoryLinksProvider_getLinksFromCorruptedFile() {
yield promiseCleanDirectoryLinksProvider();
});
add_task(function test_DirectoryLinksProvider_getEnhancedLink() {
let data = {"en-US": [
{url: "http://example.net", enhancedImageURI: "net1"},
{url: "http://example.com", enhancedImageURI: "com1"},
{url: "http://example.com", enhancedImageURI: "com2"},
]};
let dataURI = 'data:application/json,' + JSON.stringify(data);
yield promiseSetupDirectoryLinksProvider({linksURL: dataURI});
let links = yield fetchData();
do_check_eq(links.length, 3);
function checkEnhanced(url, image) {
let enhanced = DirectoryLinksProvider.getEnhancedLink({url: url});
do_check_eq(enhanced && enhanced.enhancedImageURI, image);
}
// Get the expected image for the same site
checkEnhanced("http://example.net/", "net1");
checkEnhanced("http://sub.example.net/", "net1");
checkEnhanced("http://example.net/path", "net1");
checkEnhanced("https://www.example.net/", "net1");
// Get the image of the last entry
checkEnhanced("http://example.com", "com2");
// Get the inline enhanced image
let inline = DirectoryLinksProvider.getEnhancedLink({
url: "http://example.com/echo",
enhancedImageURI: "echo",
});
do_check_eq(inline.enhancedImageURI, "echo");
do_check_eq(inline.url, "http://example.com/echo");
// Undefined for not enhanced
checkEnhanced("http://example.org", undefined);
// Make sure old data is not cached
data = {"en-US": [
{url: "http://example.com", enhancedImageURI: "fresh"},
]};
dataURI = 'data:application/json,' + JSON.stringify(data);
yield promiseSetupDirectoryLinksProvider({linksURL: dataURI});
links = yield fetchData();
do_check_eq(links.length, 1);
checkEnhanced("http://example.net", undefined);
checkEnhanced("http://example.com", "fresh");
});