Merge mozilla-central to b2g-inbound

This commit is contained in:
Carsten "Tomcat" Book 2014-07-24 15:44:44 +02:00
commit 01722066f7
350 changed files with 4866 additions and 3468 deletions

View File

@ -9,6 +9,7 @@
[test_keys_menu.xul]
[test_link.html]
[test_media.html]
skip-if = buildapp == 'mulet'
[test_select.html]
[test_tree.xul]
[test_treegrid.xul]

View File

@ -1,9 +1,11 @@
[DEFAULT]
[test_HTMLSpec.html]
skip-if = buildapp == 'mulet'
[test_figure.html]
[test_listbox.xul]
[test_nsApplicationAcc.html]
[test_plugin.html]
skip-if = buildapp == 'mulet'
[test_canvas.html]
[test_shadowroot.html]

View File

@ -16,6 +16,7 @@ support-files =
[test_descrchange.html]
[test_docload.html]
[test_docload.xul]
skip-if = buildapp == 'mulet'
[test_docload_aria.html]
[test_dragndrop.html]
[test_flush.html]
@ -46,6 +47,7 @@ skip-if = os == 'win' || os == 'linux'
[test_namechange.html]
[test_scroll.xul]
[test_selection.html]
skip-if = buildapp == 'mulet'
[test_selection.xul]
[test_selection_aria.html]
[test_statechange.html]

View File

@ -2,4 +2,5 @@
[test_focusedChild.html]
[test_takeFocus.html]
skip-if = buildapp == 'mulet'
[test_takeFocus.xul]

View File

@ -10,7 +10,9 @@ support-files =
[test_alive.html]
[test_content_integration.html]
skip-if = buildapp == 'mulet'
[test_content_text.html]
skip-if = buildapp == 'mulet'
[test_explicit_names.html]
[test_gesture_tracker.html]
[test_landmarks.html]

View File

@ -29,3 +29,4 @@ support-files =
[test_tree.xul]
[test_visibility.html]
[test_visibility.xul]
skip-if = buildapp == "mulet"

View File

@ -20,6 +20,7 @@ skip-if = true # Bug 561508
[test_dockids.html]
[test_filectrl.html]
[test_formctrl.html]
skip-if = buildapp == "mulet"
[test_formctrl.xul]
[test_gencontent.html]
[test_groupbox.xul]
@ -30,6 +31,7 @@ skip-if = true # Bug 561508
[test_list.html]
[test_map.html]
[test_media.html]
skip-if = buildapp == "mulet"
[test_select.html]
[test_tabbox.xul]
[test_tabbrowser.xul]

View File

@ -14,6 +14,7 @@
[test_gencontent.html]
[test_hidden.html]
[test_imagemap.html]
skip-if = buildapp == "mulet"
[test_list.html]
[test_list_editabledoc.html]
[test_listbox.xul]

View File

@ -1,5 +1,5 @@
[DEFAULT]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #require OOP support for mochitest-b2g-desktop, Bug 957554
skip-if = ((buildapp == 'mulet' || buildapp == 'b2g') && toolkit != 'gonk') #require OOP support for mochitest-b2g-desktop, Bug 957554
support-files =
RecordingStatusChromeScript.js
RecordingStatusHelper.js

View File

@ -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);

View File

@ -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") + '"' +

View File

@ -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();

View File

@ -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");
}
}
},
/**

View File

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'mulet'
support-files =
head.js
chat.html

View File

@ -101,7 +101,7 @@ skip-if = os == "linux" || e10s # Linux: Intermittent failures, bug 951680; e10s
skip-if = os != "win" || e10s # The Fitts Law back button is only supported on Windows (bug 571454) / e10s - Bug ?????? test touches content (attempts to add an event listener directly to the contentWindow)
[browser_blob-channelname.js]
[browser_bookmark_titles.js]
skip-if = toolkit == "windows" || e10s # Disabled on Windows due to frequent failures (bugs 825739, 841341) / e10s - Bug ?????? test checks event.target on load event, which our e10s utils don't support
skip-if = buildapp == 'mulet' || toolkit == "windows" || e10s # Disabled on Windows due to frequent failures (bugs 825739, 841341) / e10s - Bug ?????? test checks event.target on load event, which our e10s utils don't support
[browser_bug304198.js]
[browser_bug321000.js]
skip-if = true # browser_bug321000.js is disabled because newline handling is shaky (bug 592528)
@ -135,9 +135,9 @@ skip-if = e10s # Bug ?????? - test directly manipulates content (eg, var expertD
[browser_bug432599.js]
[browser_bug435035.js]
[browser_bug435325.js]
skip-if = e10s # Bug ?????? - test directly manipulates content
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - test directly manipulates content
[browser_bug441778.js]
skip-if = e10s # Bug 691614 - no e10s zoom support yet
skip-if = buildapp == 'mulet' || e10s # Bug 691614 - no e10s zoom support yet
[browser_bug455852.js]
[browser_bug460146.js]
skip-if = e10s # Bug 866413 - PageInfo doesn't work in e10s
@ -148,12 +148,12 @@ skip-if = e10s # Bug 924260 - "Window is closed"
[browser_bug477014.js]
skip-if = e10s # Bug 918634 - swapFrameLoaders not implemented for e10s
[browser_bug479408.js]
skip-if = e10s # Bug 918663 - DOMLinkAdded events don't make their way to chrome
skip-if = buildapp == 'mulet' || e10s # Bug 918663 - DOMLinkAdded events don't make their way to chrome
[browser_bug481560.js]
skip-if = e10s # Bug ????? - This bug attached an event listener directly to the content
[browser_bug484315.js]
[browser_bug491431.js]
skip-if = e10s # Bug 918634 - swapFrameLoaders (and thus replaceTabWithWindow) not implemented for e10s
skip-if = buildapp == 'mulet' || e10s # Bug 918634 - swapFrameLoaders (and thus replaceTabWithWindow) not implemented for e10s
[browser_bug495058.js]
skip-if = e10s # Bug 918634 - swapFrameLoaders (and thus replaceTabWithWindow) not implemented for e10s
[browser_bug517902.js]
@ -165,13 +165,13 @@ skip-if = e10s # Bug ?????? - some weird timing issue with progress listeners th
skip-if = e10s # Bug 918663 - DOMLinkAdded events don't make their way to chrome
[browser_bug533232.js]
[browser_bug537013.js]
skip-if = e10s # Bug 918634 - swapFrameLoaders not implemented for e10s (test calls replaceTabWithWindow)
skip-if = buildapp == 'mulet' || e10s # Bug 918634 - swapFrameLoaders not implemented for e10s (test calls replaceTabWithWindow)
[browser_bug537474.js]
skip-if = e10s # Bug ?????? - test doesn't wait for document to be created before it checks it
[browser_bug550565.js]
skip-if = e10s # Bug 918663 - DOMLinkAdded events don't make their way to chrome (which is how gBrowser.getIcon works)
[browser_bug553455.js]
skip-if = e10s # Bug ????? - I don't think either popup notifications nor addon install stuff works?
skip-if = buildapp == 'mulet' || e10s # Bug ????? - I don't think either popup notifications nor addon install stuff works?
[browser_bug555224.js]
skip-if = e10s # Bug 691614 - no e10s zoom support yet
[browser_bug555767.js]
@ -233,11 +233,11 @@ skip-if = e10s # Bug 916974 - Session history doesn't work in e10s
[browser_bug633691.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (eg, var expertDiv = gBrowser.contentDocument.getElementById("expertContent");)
[browser_bug647886.js]
skip-if = e10s # Bug 916974 - Session history doesn't work in e10s
skip-if = buildapp == 'mulet' || e10s # Bug 916974 - Session history doesn't work in e10s
[browser_bug655584.js]
[browser_bug664672.js]
[browser_bug676619.js]
skip-if = os == "mac" || e10s # mac: Intermittent failures, bug 925225; e10s: Bug ?????? - test directly manipulates content (event.target.location)
skip-if = buildapp == 'mulet' || os == "mac" || e10s # mac: Intermittent failures, bug 925225; e10s: Bug ?????? - test directly manipulates content (event.target.location)
[browser_bug678392.js]
skip-if = e10s # Bug ?????? - Obscure non-windows failures ("Snapshot array has correct length of 1 after loading one page. - Got 0, expected 1" and more)
[browser_bug710878.js]
@ -269,7 +269,7 @@ skip-if = e10s # Bug 921959 - reload with LOAD_FLAGS_ALLOW_MIXED_CONTENT fails i
[browser_bug902156.js]
skip-if = e10s # Bug 921959 - reload with LOAD_FLAGS_ALLOW_MIXED_CONTENT fails in e10s
[browser_bug906190.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (strange - gets an element from a child which it tries to treat as a string, but that fails)
skip-if = buildapp == "mulet" || e10s # Bug ?????? - test directly manipulates content (strange - gets an element from a child which it tries to treat as a string, but that fails)
[browser_bug970746.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (directly gets elements from the content)
[browser_canonizeURL.js]
@ -283,7 +283,7 @@ skip-if = e10s # Bug ????? - thumbnail captures need e10s love (tabPreviews_capt
[browser_datareporting_notification.js]
run-if = datareporting
[browser_devices_get_user_media.js]
skip-if = (os == "linux" && debug) || e10s # linux: bug 976544; e10s: Bug 973001 - appears user media notifications only happen in the child and don't make their way to the parent?
skip-if = buildapp == 'mulet' || (os == "linux" && debug) || e10s # linux: bug 976544; e10s: Bug 973001 - appears user media notifications only happen in the child and don't make their way to the parent?
[browser_devices_get_user_media_about_urls.js]
skip-if = e10s # Bug 973001 - appears user media notifications only happen in the child and don't make their way to the parent?
[browser_discovery.js]
@ -295,12 +295,13 @@ skip-if = true # browser_drag.js is disabled, as it needs to be updated for the
[browser_findbarClose.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (tries to grab an iframe directly from content)
[browser_fullscreen-window-open.js]
skip-if = e10s || os == "linux" # Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly. Linux: Intermittent failures - bug 941575.
skip-if = buildapp == 'mulet' || e10s || os == "linux" # Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly. Linux: Intermittent failures - bug 941575.
[browser_gestureSupport.js]
skip-if = e10s # Bug 863514 - no gesture support.
[browser_getshortcutoruri.js]
[browser_hide_removing.js]
[browser_homeDrop.js]
skip-if = buildapp == 'mulet'
[browser_identity_UI.js]
skip-if = e10s # Bug ?????? - this test fails for obscure reasons on non-windows builds only.
[browser_keywordBookmarklets.js]
@ -323,13 +324,13 @@ skip-if = e10s # Bug ?????? - test directly manipulates content (TypeError: gBro
[browser_mixedcontent_securityflags.js]
skip-if = e10s # Bug ?????? - test directly manipulates content ("cannot ipc non-cpow object")
[browser_notification_tab_switching.js]
skip-if = e10s # Bug ?????? - uncaught exception - Error: cannot ipc non-cpow object at chrome://mochitests/content/browser/browser/base/content/test/general/browser_notification_tab_switching.js:32
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - uncaught exception - Error: cannot ipc non-cpow object at chrome://mochitests/content/browser/browser/base/content/test/general/browser_notification_tab_switching.js:32
[browser_offlineQuotaNotification.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (gBrowser.selectedBrowser.contentWindow.applicationCache.oncached = function() {...})
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - test directly manipulates content (gBrowser.selectedBrowser.contentWindow.applicationCache.oncached = function() {...})
[browser_overflowScroll.js]
skip-if = e10s # Bug 921905 - pinTab/unpinTab fail in e10s
[browser_pageInfo.js]
skip-if = e10s # Bug 866413 - PageInfo doesn't work in e10s
skip-if = buildapp == 'mulet' || e10s # Bug 866413 - PageInfo doesn't work in e10s
[browser_page_style_menu.js]
skip-if = e10s # Bug ?????? - test directly manipulates content
@ -340,11 +341,13 @@ skip-if = e10s # Bug 921905 - pinTab/unpinTab fail in e10s
[browser_plainTextLinks.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (creates and fetches elements directly from content document)
[browser_popupUI.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (tries to get a popup element directly from content)
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - test directly manipulates content (tries to get a popup element directly from content)
[browser_printpreview.js]
skip-if = e10s # Bug ?????? - timeout after logging "Error: Channel closing: too late to send/recv, messages will be lost"
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - timeout after logging "Error: Channel closing: too late to send/recv, messages will be lost"
[browser_private_browsing_window.js]
skip-if = buildapp == 'mulet'
[browser_private_no_prompt.js]
skip-if = buildapp == 'mulet'
[browser_relatedTabs.js]
[browser_removeTabsToTheEnd.js]
skip-if = e10s # Bug 921905 - pinTab/unpinTab fail in e10s
@ -354,17 +357,19 @@ skip-if = true # bug 432425
[browser_sanitize-passwordDisabledHosts.js]
[browser_sanitize-sitepermissions.js]
[browser_sanitize-timespans.js]
skip-if = buildapp == 'mulet'
[browser_sanitizeDialog.js]
skip-if = buildapp == 'mulet'
[browser_sanitizeDialog_treeView.js]
skip-if = true # disabled until the tree view is added
# back to the clear recent history dialog (sanitize.xul), if
# it ever is (bug 480169)
[browser_save_link-perwindowpb.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (event.target)
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - test directly manipulates content (event.target)
[browser_save_private_link_perwindowpb.js]
skip-if = e10s # e10s: Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly
skip-if = buildapp == 'mulet' || e10s # e10s: Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly
[browser_save_video.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (event.target)
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - test directly manipulates content (event.target)
[browser_scope.js]
[browser_selectTabAtIndex.js]
skip-if = e10s # Bug ?????? - no idea! "Accel+9 selects expected tab - Got 0, expected 9"
@ -372,12 +377,15 @@ skip-if = e10s # Bug ?????? - no idea! "Accel+9 selects expected tab - Got 0, ex
skip-if = e10s # Bug ?????? - timeout after logging "Error: Channel closing: too late to send/recv, messages will be lost"
[browser_subframe_favicons_not_used.js]
[browser_tabDrop.js]
skip-if = buildapp == 'mulet'
[browser_tabMatchesInAwesomebar_perwindowpb.js]
skip-if = e10s # Bug 918634 - swapFrameLoaders not implemented for e10s (test uses gBrowser.swapBrowsersAndCloseOther)
[browser_tab_drag_drop_perwindow.js]
skip-if = buildapp == 'mulet'
[browser_tab_dragdrop.js]
skip-if = e10s # Bug 918634 - swapFrameLoaders not implemented for e10s (test uses gBrowser.swapBrowsersAndCloseOther)
skip-if = buildapp == 'mulet' || e10s # Bug 918634 - swapFrameLoaders not implemented for e10s (test uses gBrowser.swapBrowsersAndCloseOther)
[browser_tab_dragdrop2.js]
skip-if = buildapp == 'mulet'
[browser_tabbar_big_widgets.js]
skip-if = os == "linux" || os == "mac" # No tabs in titlebar on linux
# Disabled on OS X because of bug 967917
@ -390,7 +398,7 @@ skip-if = e10s # Bug ?????? - test needs to be updated for e10s (captures a stac
skip-if = e10s # Bug ?????? - test directly manipulates content (tries to get/set attributes directly on content docshell)
[browser_tabs_owner.js]
[browser_typeAheadFind.js]
skip-if = e10s # Bug 921935 - focusmanager issues with e10s (test calls waitForFocus)
skip-if = buildapp == 'mulet' || e10s # Bug 921935 - focusmanager issues with e10s (test calls waitForFocus)
[browser_unloaddialogs.js]
skip-if = e10s # Bug ?????? - test uses chrome windowMediator to try and see alert() from content
[browser_urlHighlight.js]
@ -422,6 +430,7 @@ skip-if = e10s # Bug 921905 - pinTab/unpinTab fail in e10s
[browser_visibleTabs_tabPreview.js]
skip-if = (os == "win" && !debug) || e10s # Bug 1007418 / Bug 698371 - thumbnail captures need e10s love (tabPreviews_capture fails with Argument 1 of CanvasRenderingContext2D.drawWindow does not implement interface Window.)
[browser_windowopen_reflows.js]
skip-if = buildapp == 'mulet'
[browser_wyciwyg_urlbarCopying.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (content.document.getElementById)
[browser_zbug569342.js]

View File

@ -1,5 +1,5 @@
[DEFAULT]
skip-if = e10s # Bug ?????? - about:newtab tests don't work in e10s
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - about:newtab tests don't work in e10s
support-files =
head.js
@ -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]

View File

@ -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");
}

View File

@ -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);

View File

@ -5,7 +5,7 @@
# * Bug XXXXX - no plugins in content processes ("Error: You cannot use the AddonManager in child processes!")
# * Bug 866413 - PageInfo doesn't work in e10s [browser_pageInfo_plugins.js]
# * Bug 921957 - remote webprogress doesn't supply originalURI attribute on the request object [browser_clearplugindata.js]
skip-if = e10s
skip-if = buildapp == "mulet" || e10s
support-files =
blockNoPlugins.xml
blockPluginHard.xml

View File

@ -1,5 +1,5 @@
[DEFAULT]
skip-if = e10s # Bug 915547 (social providers don't install)
skip-if = buildapp == "mulet" || e10s # Bug 915547 (social providers don't install)
support-files =
blocklist.xml
checked.jpg

View File

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == "mulet"
support-files =
head.js
support/test_967000_charEncoding_page.html
@ -75,7 +76,7 @@ skip-if = e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s f
[browser_967000_button_charEncoding.js]
skip-if = e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s friendly.
[browser_967000_button_feeds.js]
skip-if = e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s friendly.
skip-if = buildapp == 'mulet' || e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s friendly.
[browser_967000_button_sync.js]
skip-if = e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s friendly.
[browser_967000_button_tabView.js]

View File

@ -2,6 +2,7 @@
support-files = head.js
[browser_basic_functionality.js]
skip-if = buildapp == "mulet"
[browser_first_download_panel.js]
skip-if = os == "linux" # Bug 949434
[browser_overflow_anchor.js]

View File

@ -4,4 +4,5 @@ support-files = sample_feed.atom
[test_423060.xul]
[test_bug368464.html]
[test_bug408328.html]
skip-if= buildapp == 'mulet'
[test_maxSniffing.html]

View File

@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g' || e10s
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || e10s
support-files =
bug368464-data.xml
bug408328-data.xml

View File

@ -4,3 +4,4 @@ support-files =
[browser_mozLoop_charPref.js]
[browser_mozLoop_doNotDisturb.js]
skip-if = buildapp == 'mulet'

View File

@ -3,6 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
[DEFAULT]
skip-if = buildapp == "mulet"
support-files =
head.js
framedPage.html

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == "mulet"
support-files =
head.js
privacypane_tests_perwindow.js

View File

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == "mulet"
support-files =
head.js
privacypane_tests_perwindow.js

View File

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == "mulet"
support-files =
browser_privatebrowsing_concurrent_page.html
browser_privatebrowsing_cookieacceptdialog.html

View File

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'mulet'
support-files =
426329.xml
483086-1.xml

View File

@ -68,6 +68,7 @@ support-files =
[browser_dynamic_frames.js]
[browser_form_restore_events.js]
[browser_formdata.js]
skip-if = buildapp == 'mulet'
[browser_formdata_format.js]
[browser_formdata_xpath.js]
[browser_frametree.js]

View File

@ -16,6 +16,7 @@ support-files =
[browser_tabview_bug586553.js]
[browser_tabview_bug587043.js]
[browser_tabview_bug587231.js]
skip-if = buildapp == 'mulet'
[browser_tabview_bug587276.js]
[browser_tabview_bug587351.js]
[browser_tabview_bug587503.js]
@ -69,6 +70,7 @@ skip-if = os == "win" # Bug 951477
[browser_tabview_bug616967.js]
[browser_tabview_bug618816.js]
[browser_tabview_bug618828.js]
skip-if = buildapp == 'mulet'
[browser_tabview_bug619937.js]
[browser_tabview_bug622835.js]
[browser_tabview_bug623768.js]
@ -76,6 +78,7 @@ skip-if = os == "win" # Bug 951477
skip-if = true # Bug 921984, hopefully fixed by bug 930202
[browser_tabview_bug624692.js]
[browser_tabview_bug624727_perwindowpb.js]
skip-if = buildapp == 'mulet'
[browser_tabview_bug624847.js]
[browser_tabview_bug624931.js]
[browser_tabview_bug624953.js]
@ -87,6 +90,7 @@ skip-if = true # Bug 921984, hopefully fixed by bug 930202
[browser_tabview_bug626455.js]
[browser_tabview_bug626525.js]
[browser_tabview_bug626791.js]
skip-if = buildapp == 'mulet'
[browser_tabview_bug627736.js]
[browser_tabview_bug628061.js]
[browser_tabview_bug628165.js]
@ -107,6 +111,7 @@ skip-if = true # Bug 922422
[browser_tabview_bug634672.js]
[browser_tabview_bug635696.js]
[browser_tabview_bug637840.js]
skip-if = buildapp == 'mulet'
[browser_tabview_bug640765.js]
[browser_tabview_bug641802.js]
[browser_tabview_bug642793.js]
@ -133,6 +138,7 @@ skip-if = os == "mac" || e10s # mac: Bug 939617; e10s - Bug ?????? - "leaked unt
[browser_tabview_bug662266.js]
[browser_tabview_bug663421.js]
[browser_tabview_bug665502.js]
skip-if = buildapp == 'mulet'
[browser_tabview_bug669694.js]
[browser_tabview_bug673196.js]
[browser_tabview_bug673729.js]
@ -149,6 +155,7 @@ skip-if = true # Bug 736425
[browser_tabview_bug705621.js]
[browser_tabview_bug706430.js]
[browser_tabview_bug706736.js]
skip-if = buildapp == 'mulet'
[browser_tabview_bug707466.js]
[browser_tabview_bug712203.js]
[browser_tabview_bug715454.js]

View File

@ -7,6 +7,7 @@ support-files =
mockCommands.js
[browser_cmd_addon.js]
skip-if = buildapp == 'mulet'
[browser_cmd_calllog.js]
skip-if = true || e10s # Bug 845831
[browser_cmd_calllog_chrome.js]

View File

@ -288,6 +288,7 @@ skip-if = (os == 'mac' || os == 'win') && (debug == false) # Bug 986166
[browser_dbg_variables-view-frame-parameters-03.js]
[browser_dbg_variables-view-frame-with.js]
[browser_dbg_variables-view-frozen-sealed-nonext.js]
skip-if = buildapp == 'mulet'
[browser_dbg_variables-view-hide-non-enums.js]
[browser_dbg_variables-view-large-array-buffer.js]
[browser_dbg_variables-view-override-01.js]

View File

@ -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

View File

@ -39,6 +39,7 @@ support-files =
[browser_net_charts-01.js]
[browser_net_charts-02.js]
[browser_net_charts-03.js]
skip-if= buildapp == 'mulet'
[browser_net_charts-04.js]
[browser_net_charts-05.js]
[browser_net_charts-06.js]

View File

@ -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, {

View File

@ -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() {

View File

@ -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!");

View File

@ -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);
},

View File

@ -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);
});

View File

@ -6,8 +6,11 @@ support-files =
helper_edits.js
[browser_projecteditor_app_options.js]
skip-if = buildapp == 'mulet'
[browser_projecteditor_delete_file.js]
skip-if = buildapp == 'mulet'
[browser_projecteditor_editing_01.js]
skip-if = buildapp == 'mulet'
[browser_projecteditor_editors_image.js]
[browser_projecteditor_external_change.js]
[browser_projecteditor_immediate_destroy.js]
@ -16,4 +19,5 @@ support-files =
[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]

View File

@ -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;
}

View File

@ -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;
}

View File

@ -8,6 +8,7 @@ support-files = head.js
[browser_scratchpad_reset_undo.js]
[browser_scratchpad_display_outputs_errors.js]
[browser_scratchpad_eval_func.js]
skip-if = buildapp == 'mulet'
[browser_scratchpad_goto_line_ui.js]
[browser_scratchpad_reload_and_run.js]
[browser_scratchpad_display_non_error_exceptions.js]

View File

@ -42,6 +42,7 @@ support-files =
[browser_tableWidget_basic.js]
[browser_tableWidget_keyboard_interaction.js]
[browser_tableWidget_mouse_interaction.js]
skip-if = buildapp == 'mulet'
[browser_telemetry_button_paintflashing.js]
[browser_telemetry_button_responsive.js]
[browser_telemetry_button_scratchpad.js]
@ -62,6 +63,7 @@ support-files =
[browser_toolbar_basic.js]
[browser_toolbar_tooltip.js]
[browser_toolbar_webconsole_errors_count.js]
skip-if = buildapp == 'mulet'
[browser_treeWidget_basic.js]
[browser_treeWidget_keyboard_interaction.js]
[browser_treeWidget_mouse_interaction.js]

View File

@ -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);
},
/**

View File

@ -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
/**

View File

@ -122,6 +122,7 @@ support-files =
[browser_bug_869003_inspect_cross_domain_object.js]
[browser_bug_871156_ctrlw_close_tab.js]
[browser_cached_messages.js]
skip-if = buildapp == 'mulet'
[browser_console.js]
[browser_console_addonsdk_loader_exception.js]
[browser_console_clear_on_reload.js]
@ -129,18 +130,23 @@ support-files =
[browser_console_consolejsm_output.js]
[browser_console_dead_objects.js]
[browser_console_error_source_click.js]
skip-if = buildapp == 'mulet'
[browser_console_filters.js]
[browser_console_iframe_messages.js]
skip-if = buildapp == 'mulet'
[browser_console_keyboard_accessibility.js]
[browser_console_log_inspectable_object.js]
[browser_console_native_getters.js]
[browser_console_navigation_marker.js]
[browser_console_nsiconsolemessage.js]
skip-if = buildapp == 'mulet'
[browser_console_optimized_out_vars.js]
[browser_console_private_browsing.js]
skip-if = buildapp == 'mulet'
[browser_console_variables_view.js]
[browser_console_variables_view_dom_nodes.js]
[browser_console_variables_view_dont_sort_non_sortable_classes_properties.js]
skip-if = buildapp == 'mulet'
[browser_console_variables_view_while_debugging.js]
[browser_console_variables_view_while_debugging_and_inspecting.js]
[browser_eval_in_debugger_stackframe.js]
@ -150,13 +156,16 @@ support-files =
[browser_output_breaks_after_console_dir_uninspectable.js]
[browser_output_longstring_expand.js]
[browser_repeated_messages_accuracy.js]
skip-if = buildapp == 'mulet'
[browser_result_format_as_string.js]
[browser_warn_user_about_replaced_api.js]
[browser_webconsole_abbreviate_source_url.js]
[browser_webconsole_allow_mixedcontent_securityerrors.js]
skip-if = buildapp == 'mulet'
[browser_webconsole_assert.js]
[browser_webconsole_basic_net_logging.js]
[browser_webconsole_block_mixedcontent_securityerrors.js]
skip-if = buildapp == 'mulet'
[browser_webconsole_bug_579412_input_focus.js]
[browser_webconsole_bug_580001_closing_after_completion.js]
[browser_webconsole_bug_580030_errors_after_page_reload.js]
@ -223,16 +232,22 @@ run-if = os == "win"
[browser_webconsole_bug_734061_No_input_change_and_Tab_key_pressed.js]
[browser_webconsole_bug_737873_mixedcontent.js]
[browser_webconsole_bug_762593_insecure_passwords_about_blank_web_console_warning.js]
skip-if = buildapp == 'mulet'
[browser_webconsole_bug_762593_insecure_passwords_web_console_warning.js]
skip-if = buildapp == 'mulet'
[browser_webconsole_bug_764572_output_open_url.js]
[browser_webconsole_bug_766001_JS_Console_in_Debugger.js]
skip-if = buildapp == 'mulet'
[browser_webconsole_bug_770099_violation.js]
[browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js]
skip-if = buildapp == 'mulet'
[browser_webconsole_bug_804845_ctrl_key_nav.js]
run-if = os == "mac"
[browser_webconsole_bug_817834_add_edited_input_to_history.js]
[browser_webconsole_bug_837351_securityerrors.js]
skip-if = buildapp == 'mulet'
[browser_webconsole_bug_846918_hsts_invalid-headers.js]
skip-if = buildapp == 'mulet'
[browser_webconsole_bug_915141_toggle_response_logging_with_keyboard.js]
[browser_webconsole_bug_1006027_message_timestamps_incorrect.js]
[browser_webconsole_bug_1010953_cspro.js]
@ -279,6 +294,7 @@ run-if = os == "mac"
[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]

View File

@ -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]",

View File

@ -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();
}

View File

@ -2181,7 +2181,11 @@ this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({
shutdown: function () {
this._log.trace("shutdown()");
Services.obs.removeObserver(this, EXPERIMENTS_CHANGED_TOPIC);
try {
Services.obs.removeObserver(this, EXPERIMENTS_CHANGED_TOPIC);
} catch(e) {
// Prevent crash in mochitest-browser3 on Mulet
}
},
observe: function (subject, topic, data) {

View File

@ -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

View File

@ -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)

View File

@ -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;
}

View File

@ -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)

View File

@ -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 */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;
}

View File

@ -797,6 +797,7 @@ endif
ifdef DTRACE_PROBE_OBJ
EXTRA_DEPS += $(DTRACE_PROBE_OBJ)
OBJS += $(DTRACE_PROBE_OBJ)
EXCLUDED_OBJS += $(DTRACE_PROBE_OBJ)
endif
$(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(EXTRA_DEPS) $(GLOBAL_DEPS)

View File

@ -3,3 +3,4 @@
[test_bug357450.js]
[test_copypaste.xul]
[test_messagemanager_principal.html]
skip-if = buildapp == 'mulet'

View File

@ -33,6 +33,7 @@ support-files =
[test_bug549682.xul]
[test_bug571390.xul]
[test_bug574596.html]
skip-if = buildapp == 'mulet'
[test_bug599295.html]
[test_bug616841.xul]
[test_bug635835.xul]
@ -52,7 +53,7 @@ support-files =
[test_bug914381.html]
[test_bug990812.xul]
[test_cpows.xul]
skip-if = toolkit == "cocoa"
skip-if = buildapp == 'mulet' || toolkit == "cocoa"
[test_document_register.xul]
[test_domparsing.xul]
[test_fileconstructor.xul]

View File

@ -1,4 +1,4 @@
[test_messagemanager_assertpermission.html]
skip-if = buildapp == 'b2g' #b2g(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE) b2g-debug(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE) b2g-desktop(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' #b2g(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE) b2g-debug(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE) b2g-desktop(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE)
[test_child_process_shutdown_message.html]
skip-if = buildapp == 'b2g' #b2g(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE) b2g-debug(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE) b2g-desktop(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' #b2g(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE) b2g-debug(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE) b2g-desktop(specialpowers.wrap issue, NS_ERROR_XPC_GS_RETURNED_FAILURE)

View File

@ -536,7 +536,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #bug 901343, specialpowers.wr
[test_bug819051.html]
[test_bug820909.html]
[test_bug827160.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #needs plugin support # b2g(needs plugin support) b2g-debug(debug-only failure) b2g-desktop(needs plugin support)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #needs plugin support # b2g(needs plugin support) b2g-debug(debug-only failure) b2g-desktop(needs plugin support)
[test_bug840098.html]
[test_bug864595.html]
[test_bug868999.html]
@ -592,20 +592,20 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 775227
[test_meta_viewport5.html]
[test_meta_viewport6.html]
[test_mixed_content_blocker.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
[test_mixed_content_blocker_bug803225.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
[test_mixed_content_blocker_frameNavigation.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
[test_mozfiledataurl.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT
[test_mutationobservers.html]
skip-if = buildapp == 'b2g' || e10s # b2g(bug 901385, showmodaldialog) b2g-debug(bug 901385, showmodaldialog) b2g-desktop(bug 901385, showmodaldialog)
[test_nodelist_holes.html]
[test_object.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(needs plugin support) b2g-debug(needs plugin support) b2g-desktop(needs plugin support)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(needs plugin support) b2g-debug(needs plugin support) b2g-desktop(needs plugin support)
[test_plugin_freezing.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #CLICK_TO_PLAY
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #CLICK_TO_PLAY
[test_processing_instruction_update_stylesheet.xhtml]
[test_range_bounds.html]
skip-if = toolkit == 'android' || e10s

View File

@ -202,7 +202,7 @@ skip-if = os == "android" || appname == "b2g"
[test_drawImage_edge_cases.html]
[test_drawWindow.html]
support-files = file_drawWindow_source.html file_drawWindow_common.js
skip-if = (buildapp == 'b2g' && toolkit != 'gonk')
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk')
[test_ImageData_ctor.html]
[test_isPointInStroke.html]
[test_mozDashOffset.html]

View File

@ -18,4 +18,4 @@ support-files =
skipped_tests_winxp.txt
[test_webgl_conformance_test_suite.html]
skip-if = (buildapp == 'b2g') # bug 865443- separate suite - the non_conf* tests pass except for one on armv6 tests
skip-if = buildapp == 'mulet' || buildapp == 'b2g' # bug 865443- separate suite - the non_conf* tests pass except for one on armv6 tests

View File

@ -15,7 +15,7 @@ support-files =
[test_webgl_available.html]
skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
[test_webgl_conformance.html]
skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
skip-if = buildapp == 'mulet' || toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
[test_webgl_request_context.html]
skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
[test_webgl_request_mismatch.html]

View File

@ -7,7 +7,7 @@ support-files =
[test_button_attributes_reflection.html]
[test_input_radio_radiogroup.html]
[test_change_event.html]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_datalist_element.html]
[test_experimental_forms_pref.html]
[test_form_attribute-1.html]
@ -17,42 +17,49 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec
[test_form_attributes_reflection.html]
[test_form_named_getter_dynamic.html]
[test_formaction_attribute.html]
skip-if = buildapp == 'mulet'
[test_formnovalidate_attribute.html]
skip-if = buildapp == 'mulet'
[test_input_attributes_reflection.html]
[test_input_autocomplete.html]
[test_input_color_input_change_events.html]
skip-if = buildapp == 'mulet'
[test_input_color_picker_initial.html]
skip-if = buildapp == 'mulet'
[test_input_color_picker_popup.html]
skip-if = buildapp == 'mulet'
[test_input_color_picker_update.html]
skip-if = buildapp == 'mulet'
[test_input_defaultValue.html]
[test_input_email.html]
[test_input_event.html]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop and mulet specific, initial triage
[test_input_file_picker.html]
skip-if = buildapp == 'b2g' # b2g(5 failures out of 139 and timing out, bug 901581) b2g-debug(5 failures out of 139 and timing out, bug 901581) b2g-desktop(5 failures out of 139 and timing out, bug 901581)
[test_input_list_attribute.html]
[test_input_number_l10n.html]
# We don't build ICU for Firefox for Android or Firefox OS:
skip-if = os == "android" || appname == "b2g"
skip-if = buildapp == 'mulet' || os == "android" || appname == "b2g"
[test_input_number_key_events.html]
[test_input_number_mouse_events.html]
# Not run on Firefox OS and Firefox for Android where the spin buttons are hidden:
skip-if = os == "android" || appname == "b2g"
skip-if = os == "android" || appname == "b2g" || buildapp == "mulet"
[test_input_number_rounding.html]
skip-if = os == "android"
skip-if = os == "android" || buildapp == "mulet"
[test_input_number_validation.html]
# We don't build ICU for Firefox for Android or Firefox OS:
skip-if = os == "android" || appname == "b2g"
skip-if = buildapp == 'mulet' || os == "android" || appname == "b2g"
[test_input_range_attr_order.html]
[test_input_range_key_events.html]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_input_range_mouse_and_touch_events.html]
skip-if = (toolkit == 'gonk' && debug) #debug-only failure; bug 926546
[test_input_range_rounding.html]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_input_sanitization.html]
[test_input_textarea_set_value_no_scroll.html]
[test_input_typing_sanitization.html]
skip-if = buildapp == 'mulet'
[test_input_untrusted_key_events.html]
[test_input_url.html]
[test_label_control_attribute.html]

View File

@ -324,14 +324,14 @@ skip-if = e10s
[test_bug610687.html]
[test_bug611189.html]
[test_bug612730.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-debug(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-desktop(form control not selected/checked with synthesizeMouse, also fails on Android)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' # b2g(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-debug(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-desktop(form control not selected/checked with synthesizeMouse, also fails on Android)
[test_bug613113.html]
skip-if = buildapp == 'b2g' || e10s # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer)
[test_bug613722.html]
[test_bug613979.html]
[test_bug615595.html]
[test_bug615833.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-debug(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-desktop(form control not selected/checked with synthesizeMouse, also fails on Android)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-debug(form control not selected/checked with synthesizeMouse, also fails on Android) b2g-desktop(form control not selected/checked with synthesizeMouse, also fails on Android)
[test_bug617528.html]
[test_bug618948.html]
skip-if = buildapp == 'b2g' || e10s # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer)
@ -432,7 +432,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(NS_
skip-if = toolkit == 'android'
[test_formelements.html]
[test_fullscreen-api.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(time out, some kind of focus issue) b2g-debug(time out, some kind of focus issue) b2g-desktop(time out, some kind of focus issue)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(time out, some kind of focus issue) b2g-debug(time out, some kind of focus issue) b2g-desktop(time out, some kind of focus issue)
[test_hidden.html]
[test_html_attributes_reflection.html]
[test_htmlcollection.html]
@ -440,13 +440,13 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(tim
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_iframe_sandbox_inheritance.html]
[test_iframe_sandbox_modal.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #modal tests fail on android # b2g(modal tests fail on B2G) b2g-debug(modal tests fail on B2G) b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #modal tests fail on android # b2g(modal tests fail on B2G) b2g-debug(modal tests fail on B2G) b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
[test_iframe_sandbox_navigation.html]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #time out on b2g desktop specific
[test_iframe_sandbox_navigation2.html]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #time out on b2g desktop specific
[test_iframe_sandbox_plugins.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
[test_iframe_sandbox_popups.html]
skip-if = buildapp == 'b2g' # b2g(multiple concurrent window.open()s fail on B2G) b2g-debug(multiple concurrent window.open()s fail on B2G) b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
[test_iframe_sandbox_popups_inheritance.html]
@ -466,12 +466,12 @@ skip-if = buildapp == 'b2g' || e10s # b2g(multiple concurrent window.open()s fai
[test_meta_attributes_reflection.html]
[test_mod_attributes_reflection.html]
[test_mozaudiochannel.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Perma-orange on debug emulator) b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Perma-orange on debug emulator) b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
[test_named_options.html]
[test_nested_invalid_fieldsets.html]
[test_object_attributes_reflection.html]
[test_object_plugin_nav.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
[test_ol_attributes_reflection.html]
[test_option_defaultSelected.html]
[test_option_selected_state.html]

View File

@ -38,10 +38,10 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' || e1
[test_bug340017.xhtml]
[test_bug359657.html]
[test_bug369370.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s
[test_bug380383.html]
[test_bug391777.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog)
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog)
[test_bug402680.html]
[test_bug403868.html]
[test_bug403868.xhtml]

View File

@ -1405,7 +1405,9 @@ void MediaDecoderStateMachine::Play()
void MediaDecoderStateMachine::ResetPlayback()
{
MOZ_ASSERT(mState == DECODER_STATE_SEEKING || mState == DECODER_STATE_SHUTDOWN);
MOZ_ASSERT(mState == DECODER_STATE_SEEKING ||
mState == DECODER_STATE_SHUTDOWN ||
mState == DECODER_STATE_DORMANT);
mVideoFrameEndTime = -1;
mAudioStartTime = -1;
mAudioEndTime = -1;

View File

@ -96,6 +96,14 @@ GMPVideoDecoderChild::ResetComplete()
SendResetComplete();
}
void
GMPVideoDecoderChild::Error(GMPErr aError)
{
MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
SendError(aError);
}
void
GMPVideoDecoderChild::CheckThread()
{

View File

@ -36,6 +36,7 @@ public:
virtual void InputDataExhausted() MOZ_OVERRIDE;
virtual void DrainComplete() MOZ_OVERRIDE;
virtual void ResetComplete() MOZ_OVERRIDE;
virtual void Error(GMPErr aError) MOZ_OVERRIDE;
// GMPSharedMemManager
virtual void CheckThread();

View File

@ -266,6 +266,19 @@ GMPVideoDecoderParent::RecvResetComplete()
return true;
}
bool
GMPVideoDecoderParent::RecvError(const GMPErr& aError)
{
if (!mCallback) {
return false;
}
// Ignore any return code. It is OK for this to fail without killing the process.
mCallback->Error(aError);
return true;
}
bool
GMPVideoDecoderParent::RecvParentShmemForPool(Shmem& aEncodedBuffer)
{

View File

@ -70,6 +70,7 @@ private:
virtual bool RecvInputDataExhausted() MOZ_OVERRIDE;
virtual bool RecvDrainComplete() MOZ_OVERRIDE;
virtual bool RecvResetComplete() MOZ_OVERRIDE;
virtual bool RecvError(const GMPErr& aError) MOZ_OVERRIDE;
virtual bool RecvParentShmemForPool(Shmem& aEncodedBuffer) MOZ_OVERRIDE;
virtual bool AnswerNeedShmem(const uint32_t& aFrameBufferSize,
Shmem* aMem) MOZ_OVERRIDE;

View File

@ -51,7 +51,7 @@ GMPVideoEncodedFrameImpl::~GMPVideoEncodedFrameImpl()
}
}
const GMPEncryptedBufferData*
const GMPEncryptedBufferMetadata*
GMPVideoEncodedFrameImpl::GetDecryptionData() const
{
return nullptr;

View File

@ -91,7 +91,7 @@ public:
virtual uint8_t* Buffer() MOZ_OVERRIDE;
virtual GMPBufferType BufferType() const MOZ_OVERRIDE;
virtual void SetBufferType(GMPBufferType aBufferType) MOZ_OVERRIDE;
virtual const GMPEncryptedBufferData* GetDecryptionData() const MOZ_OVERRIDE;
virtual const GMPEncryptedBufferMetadata* GetDecryptionData() const MOZ_OVERRIDE;
private:
void DestroyBuffer();

View File

@ -57,6 +57,14 @@ GMPVideoEncoderChild::Encoded(GMPVideoEncodedFrame* aEncodedFrame,
aEncodedFrame->Destroy();
}
void
GMPVideoEncoderChild::Error(GMPErr aError)
{
MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
SendError(aError);
}
void
GMPVideoEncoderChild::CheckThread()
{

View File

@ -32,6 +32,7 @@ public:
virtual void Encoded(GMPVideoEncodedFrame* aEncodedFrame,
const uint8_t* aCodecSpecificInfo,
uint32_t aCodecSpecificInfoLength) MOZ_OVERRIDE;
virtual void Error(GMPErr aError) MOZ_OVERRIDE;
// GMPSharedMemManager
virtual void CheckThread();

View File

@ -219,6 +219,19 @@ GMPVideoEncoderParent::RecvEncoded(const GMPVideoEncodedFrameData& aEncodedFrame
return true;
}
bool
GMPVideoEncoderParent::RecvError(const GMPErr& aError)
{
if (!mCallback) {
return false;
}
// Ignore any return code. It is OK for this to fail without killing the process.
mCallback->Error(aError);
return true;
}
bool
GMPVideoEncoderParent::RecvParentShmemForPool(Shmem& aFrameBuffer)
{

View File

@ -67,6 +67,7 @@ private:
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
virtual bool RecvEncoded(const GMPVideoEncodedFrameData& aEncodedFrame,
const nsTArray<uint8_t>& aCodecSpecificInfo) MOZ_OVERRIDE;
virtual bool RecvError(const GMPErr& aError) MOZ_OVERRIDE;
virtual bool RecvParentShmemForPool(Shmem& aFrameBuffer) MOZ_OVERRIDE;
virtual bool AnswerNeedShmem(const uint32_t& aEncodedBufferSize,
Shmem* aMem) MOZ_OVERRIDE;

View File

@ -15,6 +15,7 @@ class GMPVideoEncoderCallbackProxy {
public:
virtual void Encoded(GMPVideoEncodedFrame* aEncodedFrame,
const nsTArray<uint8_t>& aCodecSpecificInfo) = 0;
virtual void Error(GMPErr aError) = 0;
};
// A proxy to GMPVideoEncoder in the child process.

View File

@ -7,6 +7,7 @@ include protocol PGMP;
include GMPTypes;
using GMPVideoCodec from "gmp-video-codec.h";
using GMPErr from "gmp-errors.h";
include "GMPMessageUtils.h";
@ -37,6 +38,7 @@ parent:
async InputDataExhausted();
async DrainComplete();
async ResetComplete();
async Error(GMPErr aErr);
async ParentShmemForPool(Shmem aEncodedBuffer);
// MUST be intr - if sync and we create a new Shmem, when the returned
// Shmem is received in the Child it will fail to Deserialize

View File

@ -8,6 +8,7 @@ include GMPTypes;
using GMPVideoCodec from "gmp-video-codec.h";
using GMPVideoFrameType from "gmp-video-frame-encoded.h";
using GMPErr from "gmp-errors.h";
include "GMPMessageUtils.h";
@ -35,6 +36,7 @@ parent:
async __delete__();
async Encoded(GMPVideoEncodedFrameData aEncodedFrame,
uint8_t[] aCodecSpecificInfo);
async Error(GMPErr aErr);
async ParentShmemForPool(Shmem aFrameBuffer);
// MUST be intr - if sync and we create a new Shmem, when the returned
// Shmem is received in the Child it will fail to Deserialize

View File

@ -35,6 +35,10 @@ public:
virtual void DrainComplete() = 0;
virtual void ResetComplete() = 0;
// Called when the decoder encounters a catestrophic error and cannot
// continue. Gecko will not send any more input for decoding.
virtual void Error(GMPErr aError) = 0;
};
// ALL METHODS MUST BE CALLED ON THE MAIN THREAD
@ -46,24 +50,24 @@ public:
// aCallback: Subclass should retain reference to it until DecodingComplete
// is called. Do not attempt to delete it, host retains ownership.
// TODO: Pass AudioHost so decoder can create GMPAudioEncodedFrame objects?
virtual GMPErr InitDecode(const GMPAudioCodec& aCodecSettings,
GMPAudioDecoderCallback* aCallback) = 0;
virtual void InitDecode(const GMPAudioCodec& aCodecSettings,
GMPAudioDecoderCallback* aCallback) = 0;
// Decode encoded audio frames (as a part of an audio stream). The decoded
// frames must be returned to the user through the decode complete callback.
virtual GMPErr Decode(GMPAudioSamples* aEncodedSamples) = 0;
virtual void Decode(GMPAudioSamples* aEncodedSamples) = 0;
// Reset decoder state and prepare for a new call to Decode(...).
// Flushes the decoder pipeline.
// The decoder should enqueue a task to run ResetComplete() on the main
// thread once the reset has finished.
virtual GMPErr Reset() = 0;
virtual void Reset() = 0;
// Output decoded frames for any data in the pipeline, regardless of ordering.
// All remaining decoded frames should be immediately returned via callback.
// The decoder should enqueue a task to run DrainComplete() on the main
// thread once the reset has finished.
virtual GMPErr Drain() = 0;
virtual void Drain() = 0;
// May free decoder memory.
virtual void DecodingComplete() = 0;

View File

@ -49,9 +49,9 @@ public:
virtual const uint8_t* Buffer() const = 0;
virtual uint8_t* Buffer() = 0;
// Get data describing how this frame is encrypted, or nullptr if the
// Get metadata describing how this frame is encrypted, or nullptr if the
// buffer is not encrypted.
virtual const GMPEncryptedBufferData* GetDecryptionData() const = 0;
virtual const GMPEncryptedBufferMetadata* GetDecryptionData() const = 0;
};
#endif // GMP_AUDIO_FRAME_h_

View File

@ -19,7 +19,7 @@
#include "gmp-platform.h"
class GMPEncryptedBufferData {
class GMPEncryptedBufferMetadata {
public:
// Key ID to identify the decryption key.
virtual const uint8_t* KeyId() const = 0;
@ -33,14 +33,23 @@ public:
// Size (in bytes) of |IV|.
virtual uint32_t IVSize() const = 0;
// Number of enties returned by ClearBytes and CipherBytes().
// Number of entries returned by ClearBytes() and CipherBytes().
virtual uint32_t NumSubsamples() const = 0;
virtual const uint32_t* ClearBytes() const = 0;
virtual const uint16_t* ClearBytes() const = 0;
virtual const uint32_t* CipherBytes() const = 0;
};
class GMPBuffer {
public:
virtual uint32_t Id() const = 0;
virtual uint8_t* Data() = 0;
virtual uint32_t Size() const = 0;
virtual void Resize(uint32_t aSize) = 0;
virtual ~GMPBuffer() {}
};
// These match to the DOMException codes as per:
// http://www.w3.org/TR/dom/#domexception
enum GMPDOMException {
@ -60,71 +69,106 @@ enum GMPDOMException {
// Time in milliseconds, as offset from epoch, 1 Jan 1970.
typedef int64_t GMPTimestamp;
// Capability definitions. The capabilities of the EME GMP are reported
// to Gecko by calling the GMPDecryptorCallback::SetCapabilities()
// callback and specifying the logical OR of the GMP_EME_CAP_* flags below.
//
// Note the DECRYPT and the DECRYPT_AND_DECODE are mutually exclusive;
// only one mode should be reported for each stream type, but different
// modes can be reported for different stream types.
//
// Note: Gecko does not currently support the caps changing at runtime.
// Set them once per plugin initialization, during the startup of
// the GMPdecryptor.
// Capability; CDM can decrypt encrypted buffers and return still
// compressed buffers back to Gecko for decompression there.
#define GMP_EME_CAP_DECRYPT_AUDIO (uint64_t(1) << 0)
#define GMP_EME_CAP_DECRYPT_VIDEO (uint64_t(1) << 1)
// Capability; CDM can decrypt and then decode encrypted buffers,
// and return decompressed samples to Gecko for playback.
#define GMP_EME_CAP_DECRYPT_AND_DECODE_AUDIO (uint64_t(1) << 2)
#define GMP_EME_CAP_DECRYPT_AND_DECODE_VIDEO (uint64_t(1) << 3)
class GMPDecryptorCallback {
public:
// Resolves a promise for a session created or loaded.
// Passes the session id to be exposed to JavaScript.
// Must be called before OnSessionMessage().
// Must be called before SessionMessage().
// aSessionId must be null terminated.
virtual void OnResolveNewSessionPromise(uint32_t aPromiseId,
const char* aSessionId,
uint32_t aSessionIdLength) = 0;
virtual void ResolveNewSessionPromise(uint32_t aPromiseId,
const char* aSessionId,
uint32_t aSessionIdLength) = 0;
// Called to resolve a specified promise with "undefined".
virtual void OnResolvePromise(uint32_t aPromiseId) = 0;
virtual void ResolvePromise(uint32_t aPromiseId) = 0;
// Called to reject a promise with a DOMException.
// aMessage is logged to the WebConsole.
// aMessage is optional, but if present must be null terminated.
virtual void OnRejectPromise(uint32_t aPromiseId,
GMPDOMException aException,
const char* aMessage,
uint32_t aMessageLength) = 0;
virtual void RejectPromise(uint32_t aPromiseId,
GMPDOMException aException,
const char* aMessage,
uint32_t aMessageLength) = 0;
// Called by the CDM when it has a message for session |session_id|.
// Length parameters should not include null termination.
// aSessionId must be null terminated.
virtual void OnSessionMessage(const char* aSessionId,
uint32_t aSessionIdLength,
const uint8_t* aMessage,
uint32_t aMessageLength,
const char* aDestinationURL,
uint32_t aDestinationURLLength) = 0;
virtual void SessionMessage(const char* aSessionId,
uint32_t aSessionIdLength,
const uint8_t* aMessage,
uint32_t aMessageLength,
const char* aDestinationURL,
uint32_t aDestinationURLLength) = 0;
// aSessionId must be null terminated.
virtual void OnExpirationChange(const char* aSessionId,
uint32_t aSessionIdLength,
GMPTimestamp aExpiryTime) = 0;
virtual void ExpirationChange(const char* aSessionId,
uint32_t aSessionIdLength,
GMPTimestamp aExpiryTime) = 0;
// Called by the GMP when a session is closed. All file IO
// that a session requires should be complete before calling this.
// aSessionId must be null terminated.
virtual void OnSessionClosed(const char* aSessionId,
uint32_t aSessionIdLength) = 0;
virtual void SessionClosed(const char* aSessionId,
uint32_t aSessionIdLength) = 0;
// Called by the GMP when an error occurs in a session.
// aSessionId must be null terminated.
// aMessage is logged to the WebConsole.
// aMessage is optional, but if present must be null terminated.
virtual void OnSessionError(const char* aSessionId,
uint32_t aSessionIdLength,
GMPDOMException aException,
uint32_t aSystemCode,
const char* aMessage,
uint32_t aMessageLength) = 0;
virtual void SessionError(const char* aSessionId,
uint32_t aSessionIdLength,
GMPDOMException aException,
uint32_t aSystemCode,
const char* aMessage,
uint32_t aMessageLength) = 0;
virtual void OnKeyIdUsable(const char* aSessionId,
uint32_t aSessionIdLength,
const uint8_t* aKeyId,
uint32_t aKeyIdLength) = 0;
// Marks a key as usable. Gecko will not call into the CDM to decrypt
// or decode content encrypted with a key unless the CDM has marked it
// usable first. So a CDM *MUST* mark its usable keys as usable!
virtual void KeyIdUsable(const char* aSessionId,
uint32_t aSessionIdLength,
const uint8_t* aKeyId,
uint32_t aKeyIdLength) = 0;
// Marks a key as no longer usable.
// Note: Keys are assumed to be not usable when a session is closed or removed.
virtual void OnKeyIdNotUsable(const char* aSessionId,
uint32_t aSessionIdLength,
const uint8_t* aKeyId,
uint32_t aKeyIdLength) = 0;
virtual void KeyIdNotUsable(const char* aSessionId,
uint32_t aSessionIdLength,
const uint8_t* aKeyId,
uint32_t aKeyIdLength) = 0;
// The CDM must report its capabilites of this CDM. aCaps should be a
// logical OR of the GMP_EME_CAP_* flags. The CDM *MUST* call this
// function and report whether it can decrypt and/or decode. Without
// this, Gecko does not know how to use the CDM and will not send
// samples to the CDM to decrypt or decrypt-and-decode mode. Note a
// CDM cannot change modes once playback has begun.
virtual void SetCapabilities(uint64_t aCaps) = 0;
// Returns decrypted buffer to Gecko, or reports failure.
virtual void Decrypted(GMPBuffer* aBuffer, GMPErr aResult) = 0;
};
// Host interface, passed to GetAPIFunc(), with "decrypt".
@ -166,10 +210,14 @@ public:
virtual void Init(GMPDecryptorCallback* aCallback) = 0;
// Requests the creation of a session given |aType| and |aInitData|.
// Decryptor should callback GMPDecryptorCallback::OnSessionCreated()
// with the web session ID on success, or OnSessionError() on failure,
// and then call OnSessionReady() once all keys for that session are
// available.
// Decryptor should callback GMPDecryptorCallback::SessionCreated()
// with the web session ID on success, or SessionError() on failure,
// and then call KeyIdUsable() as keys for that session become
// usable.
//
// The CDM must also call GMPDecryptorCallback::SetCapabilities()
// exactly once during start up, to inform Gecko whether to use the CDM
// in decrypt or decrypt-and-decode mode.
virtual void CreateSession(uint32_t aPromiseId,
const char* aInitDataType,
uint32_t aInitDataTypeSize,
@ -203,6 +251,19 @@ public:
virtual void SetServerCertificate(uint32_t aPromiseId,
const uint8_t* aServerCert,
uint32_t aServerCertSize) = 0;
// Asynchronously decrypts aBuffer in place. When the decryption is
// complete, GMPDecryptor should write the decrypted data back into the
// same GMPBuffer object and return it to Gecko by calling Decrypted(),
// with the GMPNoErr successcode. If decryption fails, call Decrypted()
// with a failure code, and an error event will fire on the media element.
virtual void Decrypt(GMPBuffer* aBuffer,
GMPEncryptedBufferMetadata* aMetadata) = 0;
// Called when the decryption operations are complete.
// Do not call the GMPDecryptorCallback's functions after this is called.
virtual void DecryptingComplete() = 0;
};
#endif // GMP_DECRYPTION_h_

View File

@ -39,8 +39,12 @@ typedef enum {
GMPClosedErr = 2,
GMPAllocErr = 3,
GMPNotImplementedErr = 4,
GMPNotClosedErr = 5,
GMPRecordInUse = 5,
GMPQuotaExceededErr = 6,
GMPDecodeErr = 7,
GMPEncodeErr = 8,
GMPNoKeyErr = 9,
GMPCryptoErr = 10,
GMPLastErr // Placeholder, must be last. This enum's values must remain consecutive!
} GMPErr;

View File

@ -21,30 +21,31 @@
#include <stdint.h>
// Provides basic per-origin storage for CDMs. GMPRecord instances can be
// retrieved by calling GMPPlatformAPI->openstorage. Multiple GMPRecord
// can be open at once. This interface is asynchronous, with results
// being returned via callbacks to the GMPRecordClient pointer provided
// to the GMPPlatformAPI->openstorage call, on the main thread.
// retrieved by calling GMPPlatformAPI->openstorage. Multiple GMPRecords
// with different names can be open at once, but a single record can only
// be opened by one client at a time. This interface is asynchronous, with
// results being returned via callbacks to the GMPRecordClient pointer
// provided to the GMPPlatformAPI->openstorage call, on the main thread.
class GMPRecord {
public:
// Opens the record. Calls OnOpenComplete() once the record is open.
// Note: OnReadComplete() is only called if this returns GMPNoErr.
// Opens the record. Calls OpenComplete() once the record is open.
// Note: OpenComplete() is only called if this returns GMPNoErr.
virtual GMPErr Open() = 0;
// Reads the entire contents of the file, and calls
// GMPRecordClient::OnReadComplete() once the operation is complete.
// Note: OnReadComplete() is only called if this returns GMPNoErr.
// Reads the entire contents of the record, and calls
// GMPRecordClient::ReadComplete() once the operation is complete.
// Note: ReadComplete() is only called if this returns GMPNoErr.
virtual GMPErr Read() = 0;
// Writes aDataSize bytes of aData into the file, overwritting the contents
// of the file. Overwriting with 0 bytes "deletes" the file.
// Write 0 bytes to "delete" a file.
// Note: OnWriteComplete is only called if this returns GMPNoErr.
// Writes aDataSize bytes of aData into the record, overwriting the
// contents of the record. Overwriting with 0 bytes "deletes" the file.
// Note: WriteComplete is only called if this returns GMPNoErr.
virtual GMPErr Write(const uint8_t* aData, uint32_t aDataSize) = 0;
// Closes a file. File must not be used after this is called. Cancels all
// callbacks.
// Closes a record. GMPRecord object must not be used after this is
// called, request a new one with GMPPlatformAPI->openstorage to re-open
// this record. Cancels all callbacks.
virtual GMPErr Close() = 0;
virtual ~GMPRecord() {}
@ -57,32 +58,34 @@ class GMPRecordClient {
// Response to a GMPRecord::Open() call with the open |status|.
// aStatus values:
// - GMPNoErr - File opened successfully. File may be empty.
// - GMPFileInUse - There file is in use by another client.
// - GMPNoErr - Record opened successfully. Record may be empty.
// - GMPRecordInUse - This record is in use by another client.
// - GMPGenericErr - Unspecified error.
// Do not use the GMPRecord if aStatus is not GMPNoErr.
virtual void OnOpenComplete(GMPErr aStatus) = 0;
virtual void OpenComplete(GMPErr aStatus) = 0;
// Response to a GMPRecord::Read() call, where aData is the file contents,
// Response to a GMPRecord::Read() call, where aData is the record contents,
// of length aDataSize.
// aData is only valid for the duration of the call to OnReadComplete.
// aData is only valid for the duration of the call to ReadComplete.
// Copy it if you want to hang onto it!
// aStatus values:
// - GMPNoErr - File contents read successfully, aDataSize 0 means file
// - GMPNoErr - Record contents read successfully, aDataSize 0 means record
// is empty.
// - GMPFileInUse - There are other operations or clients in use on this file.
// - GMPRecordInUse - There are other operations or clients in use on
// this record.
// - GMPGenericErr - Unspecified error.
// Do not continue to use the GMPRecord if aStatus is not GMPNoErr.
virtual void OnReadComplete(GMPErr aStatus,
const uint8_t* aData,
uint32_t aDataSize) = 0;
virtual void ReadComplete(GMPErr aStatus,
const uint8_t* aData,
uint32_t aDataSize) = 0;
// Response to a GMPRecord::Write() call.
// - GMPNoErr - File contents written successfully.
// - GMPFileInUse - There are other operations or clients in use on this file.
// - GMPGenericErr - Unspecified error. File should be regarded as corrupt.
// - GMPRecordInUse - There are other operations or clients in use on
// this record.
// - GMPGenericErr - Unspecified error.
// Do not continue to use the GMPRecord if aStatus is not GMPNoErr.
virtual void OnWriteComplete(GMPErr aStatus) = 0;
virtual void WriteComplete(GMPErr aStatus) = 0;
virtual ~GMPRecordClient() {}
};

Some files were not shown because too many files have changed in this diff Show More