diff --git a/accessible/tests/mochitest/actions/a11y.ini b/accessible/tests/mochitest/actions/a11y.ini index 2553520f28df..9750b29f43fe 100644 --- a/accessible/tests/mochitest/actions/a11y.ini +++ b/accessible/tests/mochitest/actions/a11y.ini @@ -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] diff --git a/accessible/tests/mochitest/elm/a11y.ini b/accessible/tests/mochitest/elm/a11y.ini index 060533355975..c0b94f4c3d21 100644 --- a/accessible/tests/mochitest/elm/a11y.ini +++ b/accessible/tests/mochitest/elm/a11y.ini @@ -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] diff --git a/accessible/tests/mochitest/events/a11y.ini b/accessible/tests/mochitest/events/a11y.ini index f9bdc8dc4e2b..50dd2e8060d2 100644 --- a/accessible/tests/mochitest/events/a11y.ini +++ b/accessible/tests/mochitest/events/a11y.ini @@ -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] diff --git a/accessible/tests/mochitest/focus/a11y.ini b/accessible/tests/mochitest/focus/a11y.ini index 94966198238c..9a9e2c284524 100644 --- a/accessible/tests/mochitest/focus/a11y.ini +++ b/accessible/tests/mochitest/focus/a11y.ini @@ -2,4 +2,5 @@ [test_focusedChild.html] [test_takeFocus.html] +skip-if = buildapp == 'mulet' [test_takeFocus.xul] diff --git a/accessible/tests/mochitest/jsat/a11y.ini b/accessible/tests/mochitest/jsat/a11y.ini index 65300fc059bb..bd12501e94a8 100644 --- a/accessible/tests/mochitest/jsat/a11y.ini +++ b/accessible/tests/mochitest/jsat/a11y.ini @@ -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] diff --git a/accessible/tests/mochitest/states/a11y.ini b/accessible/tests/mochitest/states/a11y.ini index 164bfe4e6fcc..631ae38288b4 100644 --- a/accessible/tests/mochitest/states/a11y.ini +++ b/accessible/tests/mochitest/states/a11y.ini @@ -29,3 +29,4 @@ support-files = [test_tree.xul] [test_visibility.html] [test_visibility.xul] +skip-if = buildapp == "mulet" diff --git a/accessible/tests/mochitest/tree/a11y.ini b/accessible/tests/mochitest/tree/a11y.ini index 282a5b0e967d..cafa06dd2916 100644 --- a/accessible/tests/mochitest/tree/a11y.ini +++ b/accessible/tests/mochitest/tree/a11y.ini @@ -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] diff --git a/accessible/tests/mochitest/treeupdate/a11y.ini b/accessible/tests/mochitest/treeupdate/a11y.ini index 232537dc0ab6..e3852cd99895 100644 --- a/accessible/tests/mochitest/treeupdate/a11y.ini +++ b/accessible/tests/mochitest/treeupdate/a11y.ini @@ -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] diff --git a/b2g/chrome/content/test/mochitest/mochitest.ini b/b2g/chrome/content/test/mochitest/mochitest.ini index 0d60bb873d88..d18a20401abf 100644 --- a/b2g/chrome/content/test/mochitest/mochitest.ini +++ b/b2g/chrome/content/test/mochitest/mochitest.ini @@ -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 diff --git a/browser/base/content/test/chat/browser.ini b/browser/base/content/test/chat/browser.ini index b5ef3f7d85c9..fe2f9b8badf1 100644 --- a/browser/base/content/test/chat/browser.ini +++ b/browser/base/content/test/chat/browser.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == 'mulet' support-files = head.js chat.html diff --git a/browser/base/content/test/general/browser.ini b/browser/base/content/test/general/browser.ini index 65622871aa92..588a30bb5f5e 100644 --- a/browser/base/content/test/general/browser.ini +++ b/browser/base/content/test/general/browser.ini @@ -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] diff --git a/browser/base/content/test/newtab/browser.ini b/browser/base/content/test/newtab/browser.ini index 20a84f0a8756..ee011a0d5592 100644 --- a/browser/base/content/test/newtab/browser.ini +++ b/browser/base/content/test/newtab/browser.ini @@ -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 diff --git a/browser/base/content/test/plugins/browser.ini b/browser/base/content/test/plugins/browser.ini index cf9bdfcba86f..51f6ec9459c5 100644 --- a/browser/base/content/test/plugins/browser.ini +++ b/browser/base/content/test/plugins/browser.ini @@ -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 diff --git a/browser/base/content/test/social/browser.ini b/browser/base/content/test/social/browser.ini index 8176814cb148..f6e2a7d8135e 100644 --- a/browser/base/content/test/social/browser.ini +++ b/browser/base/content/test/social/browser.ini @@ -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 diff --git a/browser/components/customizableui/test/browser.ini b/browser/components/customizableui/test/browser.ini index c1bdf706b3d1..f4a7ab0e5d9f 100644 --- a/browser/components/customizableui/test/browser.ini +++ b/browser/components/customizableui/test/browser.ini @@ -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] diff --git a/browser/components/downloads/test/browser/browser.ini b/browser/components/downloads/test/browser/browser.ini index 2e1e1f45c60a..8b38affb1760 100644 --- a/browser/components/downloads/test/browser/browser.ini +++ b/browser/components/downloads/test/browser/browser.ini @@ -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] diff --git a/browser/components/feeds/test/chrome/chrome.ini b/browser/components/feeds/test/chrome/chrome.ini index f8d015d487b6..70789c258dec 100644 --- a/browser/components/feeds/test/chrome/chrome.ini +++ b/browser/components/feeds/test/chrome/chrome.ini @@ -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] diff --git a/browser/components/feeds/test/mochitest.ini b/browser/components/feeds/test/mochitest.ini index 46725466ec33..5737d31c81c4 100644 --- a/browser/components/feeds/test/mochitest.ini +++ b/browser/components/feeds/test/mochitest.ini @@ -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 diff --git a/browser/components/loop/test/mochitest/browser.ini b/browser/components/loop/test/mochitest/browser.ini index c50b515d100a..c56605806f50 100644 --- a/browser/components/loop/test/mochitest/browser.ini +++ b/browser/components/loop/test/mochitest/browser.ini @@ -4,3 +4,4 @@ support-files = [browser_mozLoop_charPref.js] [browser_mozLoop_doNotDisturb.js] +skip-if = buildapp == 'mulet' diff --git a/browser/components/places/tests/browser/browser.ini b/browser/components/places/tests/browser/browser.ini index 17497115b871..4cf37b6f96b0 100644 --- a/browser/components/places/tests/browser/browser.ini +++ b/browser/components/places/tests/browser/browser.ini @@ -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 diff --git a/browser/components/preferences/in-content/tests/browser.ini b/browser/components/preferences/in-content/tests/browser.ini index d5806a432b08..85ce7dac54e2 100644 --- a/browser/components/preferences/in-content/tests/browser.ini +++ b/browser/components/preferences/in-content/tests/browser.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == "mulet" support-files = head.js privacypane_tests_perwindow.js diff --git a/browser/components/preferences/tests/browser.ini b/browser/components/preferences/tests/browser.ini index 287e625ddfbc..87686dcc2a25 100644 --- a/browser/components/preferences/tests/browser.ini +++ b/browser/components/preferences/tests/browser.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == "mulet" support-files = head.js privacypane_tests_perwindow.js diff --git a/browser/components/privatebrowsing/test/browser/browser.ini b/browser/components/privatebrowsing/test/browser/browser.ini index 8f9183550051..824344afde75 100644 --- a/browser/components/privatebrowsing/test/browser/browser.ini +++ b/browser/components/privatebrowsing/test/browser/browser.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == "mulet" support-files = browser_privatebrowsing_concurrent_page.html browser_privatebrowsing_cookieacceptdialog.html diff --git a/browser/components/search/test/browser.ini b/browser/components/search/test/browser.ini index 8dc3919f1d93..9bf6850dfd97 100644 --- a/browser/components/search/test/browser.ini +++ b/browser/components/search/test/browser.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == 'mulet' support-files = 426329.xml 483086-1.xml diff --git a/browser/components/sessionstore/test/browser.ini b/browser/components/sessionstore/test/browser.ini index 55939409c956..868918d89850 100644 --- a/browser/components/sessionstore/test/browser.ini +++ b/browser/components/sessionstore/test/browser.ini @@ -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] diff --git a/browser/components/tabview/test/browser.ini b/browser/components/tabview/test/browser.ini index 60ff5e6c208a..d8b11e52fb54 100644 --- a/browser/components/tabview/test/browser.ini +++ b/browser/components/tabview/test/browser.ini @@ -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] diff --git a/browser/devtools/commandline/test/browser.ini b/browser/devtools/commandline/test/browser.ini index c306724bb934..9a42d3515244 100644 --- a/browser/devtools/commandline/test/browser.ini +++ b/browser/devtools/commandline/test/browser.ini @@ -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] diff --git a/browser/devtools/debugger/test/browser.ini b/browser/devtools/debugger/test/browser.ini index 0420b4b1dfc7..77f0e47ee799 100644 --- a/browser/devtools/debugger/test/browser.ini +++ b/browser/devtools/debugger/test/browser.ini @@ -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] diff --git a/browser/devtools/netmonitor/test/browser.ini b/browser/devtools/netmonitor/test/browser.ini index a63cd230d921..c4144a71022e 100644 --- a/browser/devtools/netmonitor/test/browser.ini +++ b/browser/devtools/netmonitor/test/browser.ini @@ -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] diff --git a/browser/devtools/projecteditor/test/browser.ini b/browser/devtools/projecteditor/test/browser.ini index 2ad99841262a..886be9cb72b0 100644 --- a/browser/devtools/projecteditor/test/browser.ini +++ b/browser/devtools/projecteditor/test/browser.ini @@ -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] diff --git a/browser/devtools/scratchpad/test/browser.ini b/browser/devtools/scratchpad/test/browser.ini index 916b42709a7b..c5ddab709ca1 100644 --- a/browser/devtools/scratchpad/test/browser.ini +++ b/browser/devtools/scratchpad/test/browser.ini @@ -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] diff --git a/browser/devtools/shared/test/browser.ini b/browser/devtools/shared/test/browser.ini index 16768895b2e2..20bd00cda9f1 100644 --- a/browser/devtools/shared/test/browser.ini +++ b/browser/devtools/shared/test/browser.ini @@ -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] diff --git a/browser/devtools/webconsole/test/browser.ini b/browser/devtools/webconsole/test/browser.ini index 386b6a75eaed..a69d7690127f 100644 --- a/browser/devtools/webconsole/test/browser.ini +++ b/browser/devtools/webconsole/test/browser.ini @@ -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] diff --git a/browser/experiments/Experiments.jsm b/browser/experiments/Experiments.jsm index bd2a6c57f25a..3f6e5080c87f 100644 --- a/browser/experiments/Experiments.jsm +++ b/browser/experiments/Experiments.jsm @@ -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) { diff --git a/config/rules.mk b/config/rules.mk index 751b33c54a45..39725867b2f3 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -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) diff --git a/content/base/test/chrome.ini b/content/base/test/chrome.ini index 4432f014e9a7..77b0752c5900 100644 --- a/content/base/test/chrome.ini +++ b/content/base/test/chrome.ini @@ -3,3 +3,4 @@ [test_bug357450.js] [test_copypaste.xul] [test_messagemanager_principal.html] +skip-if = buildapp == 'mulet' diff --git a/content/base/test/chrome/chrome.ini b/content/base/test/chrome/chrome.ini index 3159db9858e8..78aca03f29be 100644 --- a/content/base/test/chrome/chrome.ini +++ b/content/base/test/chrome/chrome.ini @@ -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] diff --git a/content/base/test/mochitest-child-permissions.ini b/content/base/test/mochitest-child-permissions.ini index 238e3d1ec441..7b798216b482 100644 --- a/content/base/test/mochitest-child-permissions.ini +++ b/content/base/test/mochitest-child-permissions.ini @@ -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) diff --git a/content/base/test/mochitest.ini b/content/base/test/mochitest.ini index 70a4cc1d7683..84b0cc31eab2 100644 --- a/content/base/test/mochitest.ini +++ b/content/base/test/mochitest.ini @@ -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 diff --git a/content/canvas/test/mochitest.ini b/content/canvas/test/mochitest.ini index 18bf84d5aa91..6227d5a31736 100644 --- a/content/canvas/test/mochitest.ini +++ b/content/canvas/test/mochitest.ini @@ -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] diff --git a/content/canvas/test/webgl-conformance/mochitest.ini b/content/canvas/test/webgl-conformance/mochitest.ini index 7670a805b3b6..b2caf9cc2ac9 100644 --- a/content/canvas/test/webgl-conformance/mochitest.ini +++ b/content/canvas/test/webgl-conformance/mochitest.ini @@ -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 diff --git a/content/canvas/test/webgl-mochitest/mochitest.ini b/content/canvas/test/webgl-mochitest/mochitest.ini index 89cc65ba8794..94c74f10020c 100644 --- a/content/canvas/test/webgl-mochitest/mochitest.ini +++ b/content/canvas/test/webgl-mochitest/mochitest.ini @@ -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] diff --git a/content/html/content/test/forms/mochitest.ini b/content/html/content/test/forms/mochitest.ini index c246692e5523..37bcd0dd5113 100644 --- a/content/html/content/test/forms/mochitest.ini +++ b/content/html/content/test/forms/mochitest.ini @@ -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] diff --git a/content/html/content/test/mochitest.ini b/content/html/content/test/mochitest.ini index 40f4da2c45b1..472ad8d9506d 100644 --- a/content/html/content/test/mochitest.ini +++ b/content/html/content/test/mochitest.ini @@ -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] diff --git a/content/html/document/test/mochitest.ini b/content/html/document/test/mochitest.ini index ebcaae613726..4c138805be00 100644 --- a/content/html/document/test/mochitest.ini +++ b/content/html/document/test/mochitest.ini @@ -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] diff --git a/content/media/MediaDecoderStateMachine.cpp b/content/media/MediaDecoderStateMachine.cpp index 797e96e490a7..9286ec93bcb6 100644 --- a/content/media/MediaDecoderStateMachine.cpp +++ b/content/media/MediaDecoderStateMachine.cpp @@ -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; diff --git a/content/media/gmp/GMPVideoDecoderChild.cpp b/content/media/gmp/GMPVideoDecoderChild.cpp index 29a80f50bac9..222b6355446b 100644 --- a/content/media/gmp/GMPVideoDecoderChild.cpp +++ b/content/media/gmp/GMPVideoDecoderChild.cpp @@ -96,6 +96,14 @@ GMPVideoDecoderChild::ResetComplete() SendResetComplete(); } +void +GMPVideoDecoderChild::Error(GMPErr aError) +{ + MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current()); + + SendError(aError); +} + void GMPVideoDecoderChild::CheckThread() { diff --git a/content/media/gmp/GMPVideoDecoderChild.h b/content/media/gmp/GMPVideoDecoderChild.h index a0b546d553d6..947368be00b0 100644 --- a/content/media/gmp/GMPVideoDecoderChild.h +++ b/content/media/gmp/GMPVideoDecoderChild.h @@ -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(); diff --git a/content/media/gmp/GMPVideoDecoderParent.cpp b/content/media/gmp/GMPVideoDecoderParent.cpp index e972aaa77ad1..626c99f900e2 100644 --- a/content/media/gmp/GMPVideoDecoderParent.cpp +++ b/content/media/gmp/GMPVideoDecoderParent.cpp @@ -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) { diff --git a/content/media/gmp/GMPVideoDecoderParent.h b/content/media/gmp/GMPVideoDecoderParent.h index 423568e85a51..a104dba46eed 100644 --- a/content/media/gmp/GMPVideoDecoderParent.h +++ b/content/media/gmp/GMPVideoDecoderParent.h @@ -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; diff --git a/content/media/gmp/GMPVideoEncodedFrameImpl.cpp b/content/media/gmp/GMPVideoEncodedFrameImpl.cpp index 94b97d6713fc..8d4a46c40114 100644 --- a/content/media/gmp/GMPVideoEncodedFrameImpl.cpp +++ b/content/media/gmp/GMPVideoEncodedFrameImpl.cpp @@ -51,7 +51,7 @@ GMPVideoEncodedFrameImpl::~GMPVideoEncodedFrameImpl() } } -const GMPEncryptedBufferData* +const GMPEncryptedBufferMetadata* GMPVideoEncodedFrameImpl::GetDecryptionData() const { return nullptr; diff --git a/content/media/gmp/GMPVideoEncodedFrameImpl.h b/content/media/gmp/GMPVideoEncodedFrameImpl.h index 7f52a236e12e..6e1d38e1d890 100644 --- a/content/media/gmp/GMPVideoEncodedFrameImpl.h +++ b/content/media/gmp/GMPVideoEncodedFrameImpl.h @@ -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(); diff --git a/content/media/gmp/GMPVideoEncoderChild.cpp b/content/media/gmp/GMPVideoEncoderChild.cpp index eb49db5821e9..3b1b5b92f271 100644 --- a/content/media/gmp/GMPVideoEncoderChild.cpp +++ b/content/media/gmp/GMPVideoEncoderChild.cpp @@ -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() { diff --git a/content/media/gmp/GMPVideoEncoderChild.h b/content/media/gmp/GMPVideoEncoderChild.h index 8f09a1f1828e..761fe1b2980a 100644 --- a/content/media/gmp/GMPVideoEncoderChild.h +++ b/content/media/gmp/GMPVideoEncoderChild.h @@ -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(); diff --git a/content/media/gmp/GMPVideoEncoderParent.cpp b/content/media/gmp/GMPVideoEncoderParent.cpp index 925d524feb28..b2e411be58ae 100644 --- a/content/media/gmp/GMPVideoEncoderParent.cpp +++ b/content/media/gmp/GMPVideoEncoderParent.cpp @@ -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) { diff --git a/content/media/gmp/GMPVideoEncoderParent.h b/content/media/gmp/GMPVideoEncoderParent.h index 40ae6e592d35..5482e9ac0c5f 100644 --- a/content/media/gmp/GMPVideoEncoderParent.h +++ b/content/media/gmp/GMPVideoEncoderParent.h @@ -67,6 +67,7 @@ private: virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; virtual bool RecvEncoded(const GMPVideoEncodedFrameData& aEncodedFrame, const nsTArray& 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; diff --git a/content/media/gmp/GMPVideoEncoderProxy.h b/content/media/gmp/GMPVideoEncoderProxy.h index 6066c19c2aa4..40e95155d60d 100644 --- a/content/media/gmp/GMPVideoEncoderProxy.h +++ b/content/media/gmp/GMPVideoEncoderProxy.h @@ -15,6 +15,7 @@ class GMPVideoEncoderCallbackProxy { public: virtual void Encoded(GMPVideoEncodedFrame* aEncodedFrame, const nsTArray& aCodecSpecificInfo) = 0; + virtual void Error(GMPErr aError) = 0; }; // A proxy to GMPVideoEncoder in the child process. diff --git a/content/media/gmp/PGMPVideoDecoder.ipdl b/content/media/gmp/PGMPVideoDecoder.ipdl index b40512a0617d..c25a9881b71e 100644 --- a/content/media/gmp/PGMPVideoDecoder.ipdl +++ b/content/media/gmp/PGMPVideoDecoder.ipdl @@ -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 diff --git a/content/media/gmp/PGMPVideoEncoder.ipdl b/content/media/gmp/PGMPVideoEncoder.ipdl index d209b5b57bf9..f7b910bac139 100644 --- a/content/media/gmp/PGMPVideoEncoder.ipdl +++ b/content/media/gmp/PGMPVideoEncoder.ipdl @@ -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 diff --git a/content/media/gmp/gmp-api/gmp-audio-decode.h b/content/media/gmp/gmp-api/gmp-audio-decode.h index d5b05ac45700..03a5402c6f0a 100644 --- a/content/media/gmp/gmp-api/gmp-audio-decode.h +++ b/content/media/gmp/gmp-api/gmp-audio-decode.h @@ -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; diff --git a/content/media/gmp/gmp-api/gmp-audio-samples.h b/content/media/gmp/gmp-api/gmp-audio-samples.h index abf574c2d7c4..4edbf7d8bc4b 100644 --- a/content/media/gmp/gmp-api/gmp-audio-samples.h +++ b/content/media/gmp/gmp-api/gmp-audio-samples.h @@ -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_ diff --git a/content/media/gmp/gmp-api/gmp-decryption.h b/content/media/gmp/gmp-api/gmp-decryption.h index 141d8b0c6ba3..67de939f24e0 100644 --- a/content/media/gmp/gmp-api/gmp-decryption.h +++ b/content/media/gmp/gmp-api/gmp-decryption.h @@ -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_ diff --git a/content/media/gmp/gmp-api/gmp-errors.h b/content/media/gmp/gmp-api/gmp-errors.h index 8165abbe14a7..b5d0074d2271 100644 --- a/content/media/gmp/gmp-api/gmp-errors.h +++ b/content/media/gmp/gmp-api/gmp-errors.h @@ -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; diff --git a/content/media/gmp/gmp-api/gmp-storage.h b/content/media/gmp/gmp-api/gmp-storage.h index f558096c15a4..6ca8872cab98 100644 --- a/content/media/gmp/gmp-api/gmp-storage.h +++ b/content/media/gmp/gmp-api/gmp-storage.h @@ -21,30 +21,31 @@ #include // 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() {} }; diff --git a/content/media/gmp/gmp-api/gmp-video-decode.h b/content/media/gmp/gmp-api/gmp-video-decode.h index 1873f4b0ac10..40363060b17a 100644 --- a/content/media/gmp/gmp-api/gmp-video-decode.h +++ b/content/media/gmp/gmp-api/gmp-video-decode.h @@ -57,6 +57,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 @@ -72,11 +76,11 @@ public: // - aCallback: Subclass should retain reference to it until DecodingComplete // is called. Do not attempt to delete it, host retains ownership. // aCoreCount: number of CPU cores. - virtual GMPErr InitDecode(const GMPVideoCodec& aCodecSettings, - const uint8_t* aCodecSpecific, - uint32_t aCodecSpecificLength, - GMPVideoDecoderCallback* aCallback, - int32_t aCoreCount) = 0; + virtual void InitDecode(const GMPVideoCodec& aCodecSettings, + const uint8_t* aCodecSpecific, + uint32_t aCodecSpecificLength, + GMPVideoDecoderCallback* aCallback, + int32_t aCoreCount) = 0; // Decode encoded frame (as a part of a video stream). The decoded frame // will be returned to the user through the decode complete callback. @@ -90,23 +94,23 @@ public: // - aCodecSpecificInfoLength : number of bytes in aCodecSpecificInfo // - renderTimeMs : System time to render in milliseconds. Only used by // decoders with internal rendering. - virtual GMPErr Decode(GMPVideoEncodedFrame* aInputFrame, - bool aMissingFrames, - const uint8_t* aCodecSpecificInfo, - uint32_t aCodecSpecificInfoLength, - int64_t aRenderTimeMs = -1) = 0; + virtual void Decode(GMPVideoEncodedFrame* aInputFrame, + bool aMissingFrames, + const uint8_t* aCodecSpecificInfo, + uint32_t aCodecSpecificInfoLength, + int64_t aRenderTimeMs = -1) = 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; diff --git a/content/media/gmp/gmp-api/gmp-video-encode.h b/content/media/gmp/gmp-api/gmp-video-encode.h index e91da187ffe2..08fc39f130b4 100644 --- a/content/media/gmp/gmp-api/gmp-video-encode.h +++ b/content/media/gmp/gmp-api/gmp-video-encode.h @@ -51,6 +51,10 @@ public: virtual void Encoded(GMPVideoEncodedFrame* aEncodedFrame, const uint8_t* aCodecSpecificInfo, uint32_t aCodecSpecificInfoLength) = 0; + + // Called when the encoder encounters a catestrophic error and cannot + // continue. Gecko will not send any more input for encoding. + virtual void Error(GMPErr aError) = 0; }; // ALL METHODS MUST BE CALLED ON THE MAIN THREAD @@ -72,12 +76,12 @@ public: // - aNnumberOfCores : Number of cores available for the encoder // - aMaxPayloadSize : The maximum size each payload is allowed // to have. Usually MTU - overhead. - virtual GMPErr InitEncode(const GMPVideoCodec& aCodecSettings, - const uint8_t* aCodecSpecific, - uint32_t aCodecSpecificLength, - GMPVideoEncoderCallback* aCallback, - int32_t aNumberOfCores, - uint32_t aMaxPayloadSize) = 0; + virtual void InitEncode(const GMPVideoCodec& aCodecSettings, + const uint8_t* aCodecSpecific, + uint32_t aCodecSpecificLength, + GMPVideoEncoderCallback* aCallback, + int32_t aNumberOfCores, + uint32_t aMaxPayloadSize) = 0; // Encode an I420 frame (as a part of a video stream). The encoded frame // will be returned to the user through the encode complete callback. @@ -90,11 +94,11 @@ public: // - aCodecSpecificInfoLength : number of bytes in aCodecSpecific // - aFrameTypes : The frame type to encode // - aFrameTypesLength : The number of elements in aFrameTypes array. - virtual GMPErr Encode(GMPVideoi420Frame* aInputFrame, - const uint8_t* aCodecSpecificInfo, - uint32_t aCodecSpecificInfoLength, - const GMPVideoFrameType* aFrameTypes, - uint32_t aFrameTypesLength) = 0; + virtual void Encode(GMPVideoi420Frame* aInputFrame, + const uint8_t* aCodecSpecificInfo, + uint32_t aCodecSpecificInfoLength, + const GMPVideoFrameType* aFrameTypes, + uint32_t aFrameTypesLength) = 0; // Inform the encoder about the packet loss and round trip time on the // network used to decide the best pattern and signaling. @@ -102,19 +106,19 @@ public: // - packetLoss : Fraction lost (loss rate in percent = // 100 * packetLoss / 255) // - rtt : Round-trip time in milliseconds - virtual GMPErr SetChannelParameters(uint32_t aPacketLoss, uint32_t aRTT) = 0; + virtual void SetChannelParameters(uint32_t aPacketLoss, uint32_t aRTT) = 0; // Inform the encoder about the new target bit rate. // // - newBitRate : New target bit rate // - frameRate : The target frame rate - virtual GMPErr SetRates(uint32_t aNewBitRate, uint32_t aFrameRate) = 0; + virtual void SetRates(uint32_t aNewBitRate, uint32_t aFrameRate) = 0; // Use this function to enable or disable periodic key frames. Can be useful for codecs // which have other ways of stopping error propagation. // // - enable : Enable or disable periodic key frames - virtual GMPErr SetPeriodicKeyFrames(bool aEnable) = 0; + virtual void SetPeriodicKeyFrames(bool aEnable) = 0; // May free Encoder memory. virtual void EncodingComplete() = 0; diff --git a/content/media/gmp/gmp-api/gmp-video-frame-encoded.h b/content/media/gmp/gmp-api/gmp-video-frame-encoded.h index bb4475543f9e..522d47570c2f 100644 --- a/content/media/gmp/gmp-api/gmp-video-frame-encoded.h +++ b/content/media/gmp/gmp-api/gmp-video-frame-encoded.h @@ -90,9 +90,9 @@ public: virtual GMPBufferType BufferType() const = 0; virtual void SetBufferType(GMPBufferType aBufferType) = 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 // frame is not encrypted. - virtual const GMPEncryptedBufferData* GetDecryptionData() const = 0; + virtual const GMPEncryptedBufferMetadata* GetDecryptionData() const = 0; }; #endif // GMP_VIDEO_FRAME_ENCODED_h_ diff --git a/content/media/mediasource/MediaSourceDecoder.cpp b/content/media/mediasource/MediaSourceDecoder.cpp index 14958690cf4d..3abd0fb8f95a 100644 --- a/content/media/mediasource/MediaSourceDecoder.cpp +++ b/content/media/mediasource/MediaSourceDecoder.cpp @@ -24,6 +24,11 @@ #include "SourceBufferList.h" #include "VideoUtils.h" +#ifdef MOZ_FMP4 +#include "MP4Decoder.h" +#include "MP4Reader.h" +#endif + #ifdef PR_LOGGING extern PRLogModuleInfo* gMediaSourceLog; #define MSE_DEBUG(...) PR_LOG(gMediaSourceLog, PR_LOG_DEBUG, (__VA_ARGS__)) @@ -418,6 +423,23 @@ MediaSourceReader::InitializePendingDecoders() mDecoder->NotifyWaitingForResourcesStatusChanged(); } +MediaDecoderReader* +CreateReaderForType(const nsACString& aType, AbstractMediaDecoder* aDecoder) +{ +#ifdef MOZ_FMP4 + // The MP4Reader that supports fragmented MP4 and uses + // PlatformDecoderModules is hidden behind prefs for regular video + // elements, but we always want to use it for MSE, so instantiate it + // directly here. + if ((aType.LowerCaseEqualsLiteral("video/mp4") || + aType.LowerCaseEqualsLiteral("audio/mp4")) && + MP4Decoder::IsEnabled()) { + return new MP4Reader(aDecoder); + } +#endif + return DecoderTraits::CreateReader(aType, aDecoder); +} + already_AddRefed MediaSourceReader::CreateSubDecoder(const nsACString& aType, MediaSourceDecoder* aParentDecoder, @@ -426,7 +448,7 @@ MediaSourceReader::CreateSubDecoder(const nsACString& aType, // XXX: Why/when is mDecoder null here, since it should be equal to aParentDecoder?! nsRefPtr decoder = new SubBufferDecoder(new SourceBufferResource(nullptr, aType), aParentDecoder); - nsRefPtr reader(DecoderTraits::CreateReader(aType, decoder)); + nsRefPtr reader(CreateReaderForType(aType, decoder)); if (!reader) { return nullptr; } diff --git a/content/media/omx/moz.build b/content/media/omx/moz.build index e1fe5abba56e..922f264c719d 100644 --- a/content/media/omx/moz.build +++ b/content/media/omx/moz.build @@ -48,7 +48,7 @@ if 'rtsp' in CONFIG['NECKO_PROTOCOLS']: 'RtspOmxReader.cpp', ] -if CONFIG['ANDROID_VERSION'] and int(CONFIG['ANDROID_VERSION']) >= 18: +if CONFIG['ANDROID_VERSION'] >= '18': EXPORTS += [ 'I420ColorConverterHelper.h', 'MediaCodecDecoder.h', diff --git a/content/media/test/mochitest.ini b/content/media/test/mochitest.ini index 0b5ae364a87f..b009707c2dd9 100644 --- a/content/media/test/mochitest.ini +++ b/content/media/test/mochitest.ini @@ -22,7 +22,7 @@ # do ok(true, "Type not supported") and stop the test. [DEFAULT] -skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug,b2g-desktop(bug 918299) +skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug,b2g-desktop(bug 918299) support-files = 320x240.ogv 320x240.ogv^headers^ @@ -306,7 +306,7 @@ skip-if = true # bug 475110 - disabled since we don't play Wave files standalone [test_autoplay_contentEditable.html] [test_buffered.html] [test_bug448534.html] -skip-if = os == 'win' # bug 894922 +skip-if = buildapp == 'mulet' || os == 'win' # bug 894922 [test_bug463162.xhtml] [test_bug465498.html] [test_bug493187.html] diff --git a/content/media/webspeech/recognition/test/mochitest.ini b/content/media/webspeech/recognition/test/mochitest.ini index 7e4b3143031f..fb70608fd2c8 100644 --- a/content/media/webspeech/recognition/test/mochitest.ini +++ b/content/media/webspeech/recognition/test/mochitest.ini @@ -10,7 +10,7 @@ support-files = [test_audio_capture_error.html] [test_call_start_from_end_handler.html] [test_nested_eventloop.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) [test_preference_enable.html] [test_recognition_service_error.html] skip-if = buildapp == 'b2g' # b2g(timed out) diff --git a/content/svg/content/test/mochitest.ini b/content/svg/content/test/mochitest.ini index 30a668c6a719..4f5a87d0e1e1 100644 --- a/content/svg/content/test/mochitest.ini +++ b/content/svg/content/test/mochitest.ini @@ -86,7 +86,7 @@ skip-if = true [test_text_lengthAdjust.html] [test_text_scaled.html] [test_text_selection.html] -skip-if = buildapp == 'b2g' # b2g(Mouse selection not workin on b2g) b2g-debug(Mouse selection not workin on b2g) b2g-desktop(Mouse selection not workin on b2g) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' # b2g(Mouse selection not workin on b2g) b2g-debug(Mouse selection not workin on b2g) b2g-desktop(Mouse selection not workin on b2g) [test_text_update.html] [test_transform.xhtml] [test_transformParsing.html] diff --git a/content/xul/content/test/mochitest.ini b/content/xul/content/test/mochitest.ini index c6ae56a82269..2ca10f272b56 100644 --- a/content/xul/content/test/mochitest.ini +++ b/content/xul/content/test/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = buildapp == 'b2g' #tests that use xul +skip-if = buildapp == 'mulet' || buildapp == 'b2g' #tests that use xul [test_bug486990.xul] skip-if = toolkit == 'android' #TIMED_OUT diff --git a/content/xul/templates/tests/chrome/chrome.ini b/content/xul/templates/tests/chrome/chrome.ini index 21db61762b51..2c1da41317be 100644 --- a/content/xul/templates/tests/chrome/chrome.ini +++ b/content/xul/templates/tests/chrome/chrome.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == 'mulet' support-files = animals.rdf animals.sqlite diff --git a/docshell/test/browser/browser.ini b/docshell/test/browser/browser.ini index 682ebd2de136..b6a9b035dc5a 100644 --- a/docshell/test/browser/browser.ini +++ b/docshell/test/browser/browser.ini @@ -72,8 +72,9 @@ skip-if = e10s # Bug 933103 - mochitest's EventUtils.synthesizeMouse functions n [browser_bug422543.js] skip-if = e10s # Bug ?????? - obscure test failures (shistory has a new entry - Got initial, expected newentry) [browser_bug441169.js] +skip-if = buildapp == 'mulet' [browser_bug503832.js] -skip-if = e10s # Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly +skip-if = buildapp == 'mulet' || e10s # Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly [browser_bug554155.js] [browser_bug655270.js] skip-if = e10s # Bug ?????? - PlacesUtils.history.addObserver notifications don't seem to fire diff --git a/docshell/test/chrome/chrome.ini b/docshell/test/chrome/chrome.ini index 6a756a453c5d..585a45aead1f 100644 --- a/docshell/test/chrome/chrome.ini +++ b/docshell/test/chrome/chrome.ini @@ -56,10 +56,12 @@ support-files = [test_bug301397.xul] [test_bug303267.xul] [test_bug311007.xul] +skip-if = buildapp == 'mulet' [test_bug321671.xul] [test_bug360511.xul] [test_bug364461.xul] [test_bug396519.xul] +skip-if = buildapp == 'mulet' [test_bug396649.xul] [test_bug428288.html] [test_bug449778.xul] diff --git a/docshell/test/mochitest.ini b/docshell/test/mochitest.ini index 3a46fc3e35db..385dd0c0f89c 100644 --- a/docshell/test/mochitest.ini +++ b/docshell/test/mochitest.ini @@ -40,7 +40,7 @@ support-files = skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_bug123696.html] [test_bug369814.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_bug384014.html] [test_bug385434.html] [test_bug387979.html] @@ -57,9 +57,9 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec skip-if = toolkit != "cocoa" || e10s support-files = file_bug511449.html [test_bug529119-1.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_bug529119-2.html] -skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(debug-only failure) b2g-desktop(Bug 931116, b2g desktop specific, initial triage) +skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(debug-only failure) b2g-desktop(Bug 931116, b2g desktop specific, initial triage) [test_bug530396.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Timeouts on B2G desktop support-files = bug530396-noref.sjs bug530396-subframe.html diff --git a/dom/alarm/test/mochitest.ini b/dom/alarm/test/mochitest.ini index 0110820eda94..f54189afe01d 100644 --- a/dom/alarm/test/mochitest.ini +++ b/dom/alarm/test/mochitest.ini @@ -5,16 +5,16 @@ support-files = file_empty.html [test_alarm_add_data.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_alarm_add_date.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_alarm_add_respectTimezone.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_alarm_non_permitted_app.html] [test_alarm_permitted_app.html] [test_alarm_remove.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_bug1015540.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_bug1037079.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 diff --git a/dom/animation/AnimationTimeline.cpp b/dom/animation/AnimationTimeline.cpp index 7d190e80e9a9..15bc3f23a22b 100644 --- a/dom/animation/AnimationTimeline.cpp +++ b/dom/animation/AnimationTimeline.cpp @@ -5,7 +5,6 @@ #include "AnimationTimeline.h" #include "mozilla/dom/AnimationTimelineBinding.h" -#include "mozilla/TimeStamp.h" #include "nsContentUtils.h" #include "nsIPresShell.h" #include "nsPresContext.h" @@ -36,7 +35,18 @@ TimeStamp AnimationTimeline::GetCurrentTimeStamp() const { // Always return the same object to benefit from return-value optimization. - TimeStamp result; // Initializes to null timestamp + TimeStamp result = mLastCurrentTime; + + // If we've never been sampled, initialize the current time to the timeline's + // zero time since that is the time we'll use if we don't have a refresh + // driver. + if (result.IsNull()) { + nsRefPtr timing = mDocument->GetNavigationTiming(); + if (!timing) { + return result; + } + result = timing->GetNavigationStartTimeStamp(); + } nsIPresShell* presShell = mDocument->GetShell(); if (MOZ_UNLIKELY(!presShell)) { @@ -49,6 +59,11 @@ AnimationTimeline::GetCurrentTimeStamp() const } result = presContext->RefreshDriver()->MostRecentRefresh(); + // FIXME: We would like to assert that: + // mLastCurrentTime.IsNull() || result >= mLastCurrentTime + // but due to bug 1043078 this will not be the case when the refresh driver + // is restored from test control. + mLastCurrentTime = result; return result; } diff --git a/dom/animation/AnimationTimeline.h b/dom/animation/AnimationTimeline.h index 429a48c51e14..fe6c0c1bf57c 100644 --- a/dom/animation/AnimationTimeline.h +++ b/dom/animation/AnimationTimeline.h @@ -9,15 +9,13 @@ #include "nsWrapperCache.h" #include "nsCycleCollectionParticipant.h" #include "mozilla/Attributes.h" +#include "mozilla/TimeStamp.h" #include "js/TypeDecls.h" #include "nsIDocument.h" struct JSContext; namespace mozilla { - -class TimeStamp; - namespace dom { class AnimationTimeline MOZ_FINAL : public nsWrapperCache @@ -44,6 +42,11 @@ protected: virtual ~AnimationTimeline() { } nsCOMPtr mDocument; + + // Store the most recently returned value of current time. This is used + // in cases where we don't have a refresh driver (e.g. because we are in + // a display:none iframe). + mutable mozilla::TimeStamp mLastCurrentTime; }; } // namespace dom diff --git a/dom/animation/test/animation-timeline/test_animation-timeline.html b/dom/animation/test/animation-timeline/test_animation-timeline.html index 4089a6fb2097..9b53e61495b6 100644 --- a/dom/animation/test/animation-timeline/test_animation-timeline.html +++ b/dom/animation/test/animation-timeline/test_animation-timeline.html @@ -7,6 +7,7 @@
+ diff --git a/dom/animation/test/mochitest.ini b/dom/animation/test/mochitest.ini index 2f33e470dc13..ddd97fd03955 100644 --- a/dom/animation/test/mochitest.ini +++ b/dom/animation/test/mochitest.ini @@ -1,3 +1,5 @@ [animation-timeline/test_animation-timeline.html] +skip-if = buildapp == 'mulet' [css-integration/test_element-get-animation-players.html] +skip-if = buildapp == 'mulet' [css-integration/test_animations-dynamic-changes.html] diff --git a/dom/apps/tests/file_packaged_app.sjs b/dom/apps/tests/file_packaged_app.sjs index 9e0e44842ea6..2e138e4a904f 100644 --- a/dom/apps/tests/file_packaged_app.sjs +++ b/dom/apps/tests/file_packaged_app.sjs @@ -20,12 +20,23 @@ var gDevUrl = "http://dev.url"; function handleRequest(request, response) { var query = getQuery(request); - response.setHeader("Access-Control-Allow-Origin", "*", false); - var packageSize = ("packageSize" in query) ? query.packageSize : 0; var appName = ("appName" in query) ? query.appName : gAppName; var devName = ("devName" in query) ? query.devName : gDevName; var devUrl = ("devUrl" in query) ? query.devUrl : gDevUrl; + // allowCancel just means deliver the file slowly so we have time to cancel it + var allowCancel = "allowCancel" in query; + var getPackage = "getPackage" in query; + var alreadyDeferred = Number(getState("alreadyDeferred")); + + if (allowCancel && getPackage && !alreadyDeferred) { + // Only do this for the actual package delivery. + response.processAsync(); + // And to avoid timer problems, only do this once. + setState("alreadyDeferred", "1"); + } + + response.setHeader("Access-Control-Allow-Origin", "*", false); // If this is a version update, update state, prepare the manifest, // the application package and return. @@ -36,7 +47,8 @@ function handleRequest(request, response) { var packageName = "test_packaged_app_" + packageVersion + ".zip"; setState("packageName", packageName); - var packagePath = "/" + gBasePath + "file_packaged_app.sjs?getPackage=" + + var packagePath = "/" + gBasePath + "file_packaged_app.sjs?" + + (allowCancel?"allowCancel&": "") + "getPackage=" + packageName; setState("packagePath", packagePath); @@ -84,11 +96,20 @@ function handleRequest(request, response) { response.setHeader("Etag", etag, false); // Serve the application package corresponding to the requested app version. - if ("getPackage" in query) { + if (getPackage) { var resource = readFile(packageName, true); response.setHeader("Content-Type", "Content-Type: application/java-archive", false); - response.write(resource); + if (allowCancel && !alreadyDeferred) { + var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + timer.initWithCallback(function (aTimer) { + response.write(resource); + aTimer.cancel(); + response.finish(); + }, 1000, Ci.nsITimer.TYPE_ONE_SHOT); + } else { + response.write(resource); + } return; } diff --git a/dom/apps/tests/test_packaged_app_common.js b/dom/apps/tests/test_packaged_app_common.js index 7c91021f1f64..449aa513d78c 100644 --- a/dom/apps/tests/test_packaged_app_common.js +++ b/dom/apps/tests/test_packaged_app_common.js @@ -57,13 +57,17 @@ var PackagedTestHelper = (function PackagedTestHelper() { finish(); } - function setAppVersion(aVersion, aCb, aDontUpdatePackage) { + function setAppVersion(aVersion, aCb, aDontUpdatePackage, aAllowCancel) { var xhr = new XMLHttpRequest(); var dontUpdate = ""; + var allowCancel = ""; if (aDontUpdatePackage) { dontUpdate = "&dontUpdatePackage=1"; } - var url = gSJS + "?setVersion=" + aVersion + dontUpdate; + if (aAllowCancel) { + allowCancel= "&allowCancel=1"; + } + var url = gSJS + "?setVersion=" + aVersion + dontUpdate + allowCancel; xhr.addEventListener("load", function() { is(xhr.responseText, "OK", "setAppVersion OK"); aCb(); diff --git a/dom/apps/tests/test_packaged_app_install.html b/dom/apps/tests/test_packaged_app_install.html index e3f40b7967f1..4dc300a35b8b 100644 --- a/dom/apps/tests/test_packaged_app_install.html +++ b/dom/apps/tests/test_packaged_app_install.html @@ -34,7 +34,7 @@ function checkAppInstallError(aMiniManifestURL, aExpectedError) { req.onerror = function(evt) { var error = evt.target.error.name; if (error == aExpectedError) { - ok(true, "Got expected " + aExpectedError); + info("Got expected " + aExpectedError); PackagedTestHelper.next(); } else { ok(false, "Got unexpected " + error); @@ -46,7 +46,7 @@ function checkAppInstallError(aMiniManifestURL, aExpectedError) { function checkUninstallApp(aApp) { var req = navigator.mozApps.mgmt.uninstall(aApp); req.onsuccess = function() { - ok(true, "App uninstalled"); + info("App uninstalled"); aApp.ondownloadsuccess = null; aApp.ondownloaderror = null; aApp.onprogress = null; @@ -83,11 +83,11 @@ var steps = [ // Set up SpecialPowers.setAllAppsLaunchable(true); SpecialPowers.addPermission("webapps-manage", true, document); - ok(true, "Set up"); + info("Set up"); PackagedTestHelper.next(); }, function() { - ok(true, "autoConfirmAppInstall"); + info("autoConfirmAppInstall"); SpecialPowers.autoConfirmAppInstall(PackagedTestHelper.next); }, function() { @@ -96,17 +96,17 @@ var steps = [ function() { // Bug 927699 - navigator.mozApps.install(url) lets NS_ERROR_FAILURE onto // the web. - ok(true, "== TEST == INVALID_URL"); + info("== TEST == INVALID_URL"); checkAppInstallError("", "INVALID_URL"); }, function() { // Test network error. - ok(true, "== TEST == Network error"); + info("== TEST == Network error"); checkAppInstallError("http://notvalidurl", "NETWORK_ERROR"); }, function() { // Test wrong mini-manifest content type. - ok(true, "== TEST == Not valid mini-manifest content type"); + info("== TEST == Not valid mini-manifest content type"); var miniManifestURL = PackagedTestHelper.gSJS + "?getManifest=true" + "&noManifestContentType=true"; @@ -114,7 +114,7 @@ var steps = [ }, function() { // Test mini-manifest 'size' value is not number. Bug 839435. - ok(true, "== TEST == Size value is not a number"); + info("== TEST == Size value is not a number"); var miniManifestURL = PackagedTestHelper.gSJS + "?getManifest=true" + "&packageSize=\"NotANumber\""; @@ -122,7 +122,7 @@ var steps = [ }, function() { // Test mini-manifest negative 'size' value. Bug 839435. - ok(true, "== TEST == Negative size value"); + info("== TEST == Negative size value"); var miniManifestURL = PackagedTestHelper.gSJS + "?getManifest=true" + "&packageSize=-1"; @@ -130,7 +130,7 @@ var steps = [ }, function() { // Test wrong package path - ok(true, "== TEST == Installing app with wrong package path"); + info("== TEST == Installing app with wrong package path"); var miniManifestURL = PackagedTestHelper.gSJS + "?getManifest=true" + "&wrongPackagePath=true"; @@ -138,7 +138,7 @@ var steps = [ }, function() { // Test no manifest in zip file. - ok(true, "== TEST == No manifest in the zip file"); + info("== TEST == No manifest in the zip file"); var miniManifestURL = PackagedTestHelper.gSJS + "?getManifest=true"; PackagedTestHelper.checkAppDownloadError(miniManifestURL, "MISSING_MANIFEST", 0, true, true, @@ -150,7 +150,7 @@ var steps = [ function() { // Test mini-manifest app name is different from the webapp manifest name. // Bug 844243. - ok(true, "== TEST == Mini-manifest app name is different from webapp " + + info("== TEST == Mini-manifest app name is different from webapp " + "manifest name"); var miniManifestURL = PackagedTestHelper.gSJS + "?getManifest=true" + @@ -187,11 +187,11 @@ var steps = [ PackagedTestHelper.setAppVersion(2, PackagedTestHelper.next); }, function() { - ok(true, "== TEST == Install packaged app"); + info("== TEST == Install packaged app"); var miniManifestURL = PackagedTestHelper.gSJS + "?getManifest=true"; navigator.mozApps.mgmt.oninstall = function(evt) { - ok(true, "Got oninstall event"); + info("Got oninstall event"); PackagedTestHelper.gApp = evt.application; PackagedTestHelper.gApp.ondownloaderror = function() { ok(false, "Download error " + @@ -199,7 +199,7 @@ var steps = [ PackagedTestHelper.finish(); }; PackagedTestHelper.gApp.ondownloadsuccess = function() { - ok(true, "App downloaded"); + info("App downloaded"); var expected = { name: PackagedTestHelper.gAppName, manifestURL: miniManifestURL, @@ -220,11 +220,92 @@ var steps = [ var request = navigator.mozApps.installPackage(miniManifestURL); request.onerror = PackagedTestHelper.mozAppsError; request.onsuccess = function() { - ok(true, "Application installed"); + info("Application installed"); }; }, function() { - ok(true, "all done!\n"); + PackagedTestHelper.setAppVersion(3, PackagedTestHelper.next, false, true); + }, + function() { + info("== TEST == Install packaged app with a cancel/resume"); + var miniManifestURL = PackagedTestHelper.gSJS + + "?getManifest=true&allowCancel"; + navigator.mozApps.mgmt.oninstall = function(evt) { + info("Got oninstall event"); + PackagedTestHelper.gApp = evt.application; + + PackagedTestHelper.gApp.onprogress = function() { + // The first onprogress event is generated *before* the actual + // download is started. And the next one will be generated too late. + // So we just try to delay the canceling a bit. + setTimeout(function() { + // Let's try cancelling and resuming the download later on. + info("Cancelling the download"); + PackagedTestHelper.gApp.cancelDownload(); + // And only do this once. + PackagedTestHelper.gApp.onprogress = null; + }, 40); + }; + + var alreadyCanceled = false; + PackagedTestHelper.gApp.ondownloaderror = function() { + info("Got a expected download error"); + ok(!alreadyCanceled, "The download should be cancelled only once!"); + is(PackagedTestHelper.gApp.downloadError.name, "DOWNLOAD_CANCELED", + "Download error " + PackagedTestHelper.gApp.downloadError.name); + if (!alreadyCanceled) { + PackagedTestHelper.gApp.download(); + alreadyCanceled = true; + } + }; + + PackagedTestHelper.gApp.ondownloadsuccess = function() { + info("App downloaded"); + // We could try also applying the download we just made. + var expected = { + name: PackagedTestHelper.gAppName, + manifestURL: miniManifestURL, + installOrigin: PackagedTestHelper.gInstallOrigin, + progress: 0, + installState: "pending", + downloadAvailable: false, + downloading: false, + downloadSize: 0, + size: 0, + readyToApplyDownload: true + }; + PackagedTestHelper.checkAppState(PackagedTestHelper.gApp, 3, expected, + true, false, function() {}); + }; + + PackagedTestHelper.gApp.ondownloadapplied = function() { + info("App download applied."); + var expected = { + name: PackagedTestHelper.gAppName, + manifestURL: miniManifestURL, + installOrigin: PackagedTestHelper.gInstallOrigin, + progress: 0, + installState: "installed", + downloadAvailable: false, + downloading: false, + downloadSize: 0, + size: 0, + readyToApplyDownload: false + }; + PackagedTestHelper.checkAppState(PackagedTestHelper.gApp, 3, expected, + true, false, PackagedTestHelper.next); + } + + }; + + var request = navigator.mozApps.installPackage(miniManifestURL); + request.onerror = PackagedTestHelper.mozAppsError; + request.onsuccess = function() { + info("Application installed"); + }; + }, + function() { + info("all done!\n"); PackagedTestHelper.finish(); } ]; diff --git a/dom/audiochannel/tests/mochitest.ini b/dom/audiochannel/tests/mochitest.ini index 9cbe25785b41..9e5de668f74c 100644 --- a/dom/audiochannel/tests/mochitest.ini +++ b/dom/audiochannel/tests/mochitest.ini @@ -6,6 +6,6 @@ support-files = AudioChannelChromeScript.js [test_telephonyPolicy.html] -skip-if = (toolkit == 'gonk' || e10s) +skip-if = buildapp == 'mulet' || (toolkit == 'gonk' || e10s) [test_audioChannelChange.html] skip-if = (toolkit != 'gonk') diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index ba3eaa10fc5c..e53c2171bd63 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -63,6 +63,7 @@ #include "Layers.h" #include "mozilla/layers/ShadowLayers.h" +#include "gfxPrefs.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/TabChild.h" @@ -358,11 +359,13 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx, new DisplayPortPropertyData(displayport, aPriority), nsINode::DeleteProperty); - nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame(); - if (rootScrollFrame && content == rootScrollFrame->GetContent()) { - // We are setting a root displayport for a document. - // The pres shell needs a special flag set. - presShell->SetIgnoreViewportScrolling(true); + if (gfxPrefs::AsyncPanZoomEnabled()) { + nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame(); + if (rootScrollFrame && content == rootScrollFrame->GetContent()) { + // We are setting a root displayport for a document. + // The pres shell needs a special flag set. + presShell->SetIgnoreViewportScrolling(true); + } } nsIFrame* rootFrame = presShell->FrameManager()->GetRootFrame(); diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini index 1789c8689e1e..f1e8367f9349 100644 --- a/dom/base/test/mochitest.ini +++ b/dom/base/test/mochitest.ini @@ -13,6 +13,7 @@ support-files = [test_appname_override.html] [test_audioWindowUtils.html] [test_audioNotification.html] +skip-if = buildapp == 'mulet' [test_bug793311.html] [test_bug913761.html] [test_bug976673.html] @@ -25,7 +26,7 @@ support-files = [test_constructor-assignment.html] [test_constructor.html] [test_dialogArguments.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s [test_document.all_unqualified.html] [test_domcursor.html] [test_domrequest.html] diff --git a/dom/browser-element/mochitest/mochitest-oop.ini b/dom/browser-element/mochitest/mochitest-oop.ini index db15d8211edd..d912ce52203d 100644 --- a/dom/browser-element/mochitest/mochitest-oop.ini +++ b/dom/browser-element/mochitest/mochitest-oop.ini @@ -3,7 +3,7 @@ # so we don't run that test on platforms which don't support OOP tests. # OOP tests don't work on native-fennec (bug 774939). # Bug 960345 - Disabled on OSX debug for frequent crashes. -skip-if = os == "android" || (toolkit == "cocoa" && debug) || (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s +skip-if = os == "android" || (toolkit == "cocoa" && debug) || buildapp == 'mulet' || (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s support-files = browserElement_OpenMixedProcess.js file_browserElement_OpenMixedProcess.html diff --git a/dom/browser-element/mochitest/mochitest.ini b/dom/browser-element/mochitest/mochitest.ini index 17472e37ec1c..2d96a30e86e2 100644 --- a/dom/browser-element/mochitest/mochitest.ini +++ b/dom/browser-element/mochitest/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s +skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s support-files = ../../../browser/base/content/test/general/audio.ogg ../../../content/media/test/short-video.ogv diff --git a/dom/browser-element/mochitest/priority/mochitest.ini b/dom/browser-element/mochitest/priority/mochitest.ini index 393f7bba918e..a9932314e1a7 100644 --- a/dom/browser-element/mochitest/priority/mochitest.ini +++ b/dom/browser-element/mochitest/priority/mochitest.ini @@ -1,6 +1,6 @@ [DEFAULT] # Good luck running these tests on anything but desktop Linux. -skip-if = toolkit != "gtk2" || (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s +skip-if = toolkit != "gtk2" || ((buildapp =='mulet' || buildapp == 'b2g') && (toolkit != 'gonk' || debug)) || e10s # Note: ../browserElementTestHelpers.js makes all tests in this directory OOP, # because testing the process-priority manager without OOP frames does not make diff --git a/dom/devicestorage/ipc/mochitest.ini b/dom/devicestorage/ipc/mochitest.ini index 37bb5f93bb6f..bab5e0b46ff5 100644 --- a/dom/devicestorage/ipc/mochitest.ini +++ b/dom/devicestorage/ipc/mochitest.ini @@ -3,4 +3,4 @@ skip-if = toolkit == 'android' || e10s #bug 781789 & bug 782275 support-files = ../test/devicestorage_common.js [test_ipc.html] -skip-if = buildapp == 'b2g' # b2g(nested ipc not working) b2g-debug(nested ipc not working) b2g-desktop(nested ipc not working) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' # b2g(nested ipc not working) b2g-debug(nested ipc not working) b2g-desktop(nested ipc not working) diff --git a/dom/devicestorage/test/chrome.ini b/dom/devicestorage/test/chrome.ini index 568a23ac75b5..d7e88eb147d5 100644 --- a/dom/devicestorage/test/chrome.ini +++ b/dom/devicestorage/test/chrome.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == 'mulet' [test_app_permissions.html] [test_fs_app_permissions.html] diff --git a/dom/downloads/tests/mochitest.ini b/dom/downloads/tests/mochitest.ini index 4b200d829c88..aee62b639434 100644 --- a/dom/downloads/tests/mochitest.ini +++ b/dom/downloads/tests/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = buildapp == 'b2g' # bug 979446, frequent failures +skip-if = buildapp == 'mulet' || buildapp == 'b2g' # bug 979446, frequent failures support-files = serve_file.sjs diff --git a/dom/events/test/mochitest.ini b/dom/events/test/mochitest.ini index 4eeff715106e..b7d0f197ac54 100644 --- a/dom/events/test/mochitest.ini +++ b/dom/events/test/mochitest.ini @@ -40,30 +40,32 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_bug422132.html] skip-if = buildapp == 'b2g' || e10s # b2g(2 failures out of 8, mousewheel test) b2g-debug(2 failures out of 8, mousewheel test) b2g-desktop(2 failures out of 8, mousewheel test) [test_bug426082.html] -skip-if = buildapp == 'b2g' || os == "win" || toolkit == 'android' || e10s # Intermittent failures, bug 921693 # b2g(1 failure out of 6, Moving the mouse down from the label should have unpressed the button) b2g-debug(1 failure out of 6, Moving the mouse down from the label should have unpressed the button) b2g-desktop(1 failure out of 6, Moving the mouse down from the label should have unpressed the button) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || os == "win" || toolkit == 'android' || e10s # Intermittent failures, bug 921693 # b2g(1 failure out of 6, Moving the mouse down from the label should have unpressed the button) b2g-debug(1 failure out of 6, Moving the mouse down from the label should have unpressed the button) b2g-desktop(1 failure out of 6, Moving the mouse down from the label should have unpressed the button) [test_bug427537.html] [test_bug428988.html] [test_bug432698.html] +skip-if = buildapp == 'mulet' [test_bug443985.html] [test_bug447736.html] [test_bug448602.html] [test_bug450876.html] +skip-if = buildapp == 'mulet' [test_bug456273.html] [test_bug457672.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #CRASH_DUMP, RANDOM +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug489671.html] [test_bug493251.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_bug502818.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug508479.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #CRASH_DUMP, RANDOM # b2g(drag event, also fails on Android) b2g-debug(drag event, also fails on Android) b2g-desktop(drag event, also fails on Android) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #CRASH_DUMP, RANDOM # b2g(drag event, also fails on Android) b2g-debug(drag event, also fails on Android) b2g-desktop(drag event, also fails on Android) [test_bug822898.html] [test_bug517851.html] [test_bug534833.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #CRASH_DUMP, RANDOM # b2g(4 failures out of 6, bug 901564,click not fired, also disabled on Android) b2g-debug(4 failures out of 6, bug 901564,click not fired, also disabled on Android) b2g-desktop(4 failures out of 6, bug 901564,click not fired, also disabled on Android) [test_bug545268.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #CRASH_DUMP, RANDOM #Bug 931116, b2g desktop specific, initial triage +skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #CRASH_DUMP, RANDOM #Bug 931116, b2g desktop specific, initial triage [test_bug547996-1.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug547996-2.xhtml] @@ -81,7 +83,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(1 failure out of 615, [test_bug605242.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug607464.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #CRASH_DUMP, RANDOM +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug613634.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug615597.html] @@ -143,18 +145,20 @@ skip-if = buildapp == 'b2g' || e10s # b2g(456 failed out of 19873, mousewheel te [test_draggableprop.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_dragstart.html] -skip-if = buildapp == 'b2g' # b2g(drag event, also fails on Android) b2g-debug(drag event, also fails on Android) b2g-desktop(drag event, also fails on Android) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' # b2g(drag event, also fails on Android) b2g-debug(drag event, also fails on Android) b2g-desktop(drag event, also fails on Android) [test_error_events.html] skip-if = toolkit == 'android' #TIMED_OUT [test_eventctors.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_eventTimeStamp.html] [test_focus_disabled.html] +skip-if = buildapp == 'mulet' [test_messageEvent.html] [test_moz_mouse_pixel_scroll_event.html] +skip-if = buildapp == 'mulet' [test_onerror_handler_args.html] [test_wheel_default_action.html] -skip-if = buildapp == 'b2g' || e10s +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || e10s [test_bug985988.html] [test_dom_storage_event.html] [test_bug998809.html] diff --git a/dom/filesystem/CreateFileTask.h b/dom/filesystem/CreateFileTask.h index 0d20726a5f7a..bbba9b940228 100644 --- a/dom/filesystem/CreateFileTask.h +++ b/dom/filesystem/CreateFileTask.h @@ -71,7 +71,7 @@ private: InfallibleTArray mArrayData; bool mReplace; - // This cannot be a DOMFile bacause this object is created on a different + // This cannot be a DOMFile because this object is created on a different // thread and DOMFile is not thread-safe. Let's use the DOMFileImpl instead. nsRefPtr mTargetFileImpl; }; diff --git a/dom/filesystem/DeviceStorageFileSystem.cpp b/dom/filesystem/DeviceStorageFileSystem.cpp index a9251f04b8a5..a6637dfc11a3 100644 --- a/dom/filesystem/DeviceStorageFileSystem.cpp +++ b/dom/filesystem/DeviceStorageFileSystem.cpp @@ -13,7 +13,7 @@ #include "nsCOMPtr.h" #include "nsDebug.h" #include "nsDeviceStorage.h" -#include "nsIDOMFile.h" +#include "nsDOMFile.h" #include "nsIFile.h" #include "nsPIDOMWindow.h" @@ -114,7 +114,7 @@ DeviceStorageFileSystem::GetLocalFile(const nsAString& aRealPath) const } bool -DeviceStorageFileSystem::GetRealPath(nsIDOMFile* aFile, nsAString& aRealPath) const +DeviceStorageFileSystem::GetRealPath(DOMFileImpl* aFile, nsAString& aRealPath) const { MOZ_ASSERT(FileSystemUtils::IsParentProcess(), "Should be on parent process!"); diff --git a/dom/filesystem/DeviceStorageFileSystem.h b/dom/filesystem/DeviceStorageFileSystem.h index cd4e19431f0f..1240e8c30dc0 100644 --- a/dom/filesystem/DeviceStorageFileSystem.h +++ b/dom/filesystem/DeviceStorageFileSystem.h @@ -37,7 +37,7 @@ public: GetLocalFile(const nsAString& aRealPath) const MOZ_OVERRIDE; virtual bool - GetRealPath(nsIDOMFile* aFile, nsAString& aRealPath) const MOZ_OVERRIDE; + GetRealPath(DOMFileImpl* aFile, nsAString& aRealPath) const MOZ_OVERRIDE; virtual const nsAString& GetRootName() const MOZ_OVERRIDE; diff --git a/dom/filesystem/Directory.cpp b/dom/filesystem/Directory.cpp index 389883fdadb5..b3a05c7b69f3 100644 --- a/dom/filesystem/Directory.cpp +++ b/dom/filesystem/Directory.cpp @@ -195,12 +195,12 @@ Directory::RemoveInternal(const StringOrFileOrDirectory& aPath, bool aRecursive, { nsresult error = NS_OK; nsString realPath; - nsCOMPtr file; + nsRefPtr file; // Check and get the target path. if (aPath.IsFile()) { - file = aPath.GetAsFile(); + file = static_cast(aPath.GetAsFile())->Impl(); goto parameters_check_done; } diff --git a/dom/filesystem/FileSystemBase.h b/dom/filesystem/FileSystemBase.h index 490e53b46182..dffc48cf748b 100644 --- a/dom/filesystem/FileSystemBase.h +++ b/dom/filesystem/FileSystemBase.h @@ -10,13 +10,13 @@ #include "nsAutoPtr.h" #include "nsString.h" -class nsIDOMFile; class nsPIDOMWindow; namespace mozilla { namespace dom { class Directory; +class DOMFileImpl; class FileSystemBase { @@ -73,7 +73,7 @@ public: * empty string. */ virtual bool - GetRealPath(nsIDOMFile* aFile, nsAString& aRealPath) const = 0; + GetRealPath(DOMFileImpl* aFile, nsAString& aRealPath) const = 0; /* * Get the permission name required to access this file system. diff --git a/dom/filesystem/RemoveTask.cpp b/dom/filesystem/RemoveTask.cpp index ed92044b2987..fc0c3cf0e1ec 100644 --- a/dom/filesystem/RemoveTask.cpp +++ b/dom/filesystem/RemoveTask.cpp @@ -10,7 +10,7 @@ #include "mozilla/dom/FileSystemBase.h" #include "mozilla/dom/FileSystemUtils.h" #include "mozilla/dom/Promise.h" -#include "nsIDOMFile.h" +#include "nsDOMFile.h" #include "nsIFile.h" #include "nsStringGlue.h" @@ -19,13 +19,13 @@ namespace dom { RemoveTask::RemoveTask(FileSystemBase* aFileSystem, const nsAString& aDirPath, - nsIDOMFile* aTargetFile, + DOMFileImpl* aTargetFile, const nsAString& aTargetPath, bool aRecursive, ErrorResult& aRv) : FileSystemTaskBase(aFileSystem) , mDirRealPath(aDirPath) - , mTargetFile(aTargetFile) + , mTargetFileImpl(aTargetFile) , mTargetRealPath(aTargetPath) , mRecursive(aRecursive) , mReturnValue(false) @@ -65,8 +65,8 @@ RemoveTask::RemoveTask(FileSystemBase* aFileSystem, BlobParent* bp = static_cast(static_cast(target)); nsCOMPtr blob = bp->GetBlob(); - mTargetFile = do_QueryInterface(blob); - MOZ_ASSERT(mTargetFile, "mTargetFile should not be null."); + MOZ_ASSERT(blob); + mTargetFileImpl = static_cast(blob.get())->Impl(); } RemoveTask::~RemoveTask() @@ -90,9 +90,10 @@ RemoveTask::GetRequestParams(const nsString& aFileSystem) const param.filesystem() = aFileSystem; param.directory() = mDirRealPath; param.recursive() = mRecursive; - if (mTargetFile) { + if (mTargetFileImpl) { + nsRefPtr file = new DOMFile(mTargetFileImpl); BlobChild* actor - = ContentChild::GetSingleton()->GetOrCreateActorForBlob(mTargetFile); + = ContentChild::GetSingleton()->GetOrCreateActorForBlob(file); if (actor) { param.target() = actor; } @@ -129,8 +130,8 @@ RemoveTask::Work() } // Get the DOM path if a DOMFile is passed as the target. - if (mTargetFile) { - if (!mFileSystem->GetRealPath(mTargetFile, mTargetRealPath)) { + if (mTargetFileImpl) { + if (!mFileSystem->GetRealPath(mTargetFileImpl, mTargetRealPath)) { return NS_ERROR_DOM_SECURITY_ERR; } if (!FileSystemUtils::IsDescendantPath(mDirRealPath, mTargetRealPath)) { diff --git a/dom/filesystem/RemoveTask.h b/dom/filesystem/RemoveTask.h index 109296762d2d..f7aa856c041d 100644 --- a/dom/filesystem/RemoveTask.h +++ b/dom/filesystem/RemoveTask.h @@ -14,6 +14,7 @@ namespace mozilla { namespace dom { +class DOMFileImpl; class Promise; class RemoveTask MOZ_FINAL @@ -22,7 +23,7 @@ class RemoveTask MOZ_FINAL public: RemoveTask(FileSystemBase* aFileSystem, const nsAString& aDirPath, - nsIDOMFile* aTargetFile, + DOMFileImpl* aTargetFile, const nsAString& aTargetPath, bool aRecursive, ErrorResult& aRv); @@ -58,7 +59,9 @@ protected: private: nsRefPtr mPromise; nsString mDirRealPath; - nsCOMPtr mTargetFile; + // This cannot be a DOMFile because this object will be used on a different + // thread and DOMFile is not thread-safe. Let's use the DOMFileImpl instead. + nsRefPtr mTargetFileImpl; nsString mTargetRealPath; bool mRecursive; bool mReturnValue; diff --git a/dom/identity/tests/mochitest/chrome.ini b/dom/identity/tests/mochitest/chrome.ini index a19d9f30a63b..adcf54945fef 100644 --- a/dom/identity/tests/mochitest/chrome.ini +++ b/dom/identity/tests/mochitest/chrome.ini @@ -12,5 +12,6 @@ support-files= [test_declareAudience.html] [test_rpHasValidCallbacks.html] +skip-if = buildapp == 'mulet' [test_syntheticEvents.html] diff --git a/dom/indexedDB/ipc/mochitest.ini b/dom/indexedDB/ipc/mochitest.ini index 4a55c62e16d7..81b48267ea25 100644 --- a/dom/indexedDB/ipc/mochitest.ini +++ b/dom/indexedDB/ipc/mochitest.ini @@ -1,4 +1,4 @@ [DEFAULT] [test_ipc.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 783513 # b2g(nested ipc not working) b2g-debug(nested ipc not working) b2g-desktop(nested ipc not working) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #bug 783513 # b2g(nested ipc not working) b2g-debug(nested ipc not working) b2g-desktop(nested ipc not working) diff --git a/dom/indexedDB/test/mochitest.ini b/dom/indexedDB/test/mochitest.ini index 0da0e834e2e7..f8053fc50146 100644 --- a/dom/indexedDB/test/mochitest.ini +++ b/dom/indexedDB/test/mochitest.ini @@ -239,10 +239,10 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_unique_index_update.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_webapp_clearBrowserData_inproc_inproc.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #No test app installed #Bug 931116, b2g desktop specific, initial triage +skip-if = ((buildapp == 'mulet' || buildapp == 'b2g') && toolkit != 'gonk') || toolkit == 'android' #No test app installed #Bug 931116, b2g desktop specific, initial triage [test_webapp_clearBrowserData_inproc_oop.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #No test app installed #Bug 931116, b2g desktop specific, initial triage +skip-if = ((buildapp == 'mulet' || buildapp == 'b2g') && toolkit != 'gonk') || toolkit == 'android' #No test app installed #Bug 931116, b2g desktop specific, initial triage [test_webapp_clearBrowserData_oop_inproc.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #No test app installed #Bug 931116, b2g desktop specific, initial triage +skip-if = ((buildapp == 'mulet' || buildapp == 'b2g') && toolkit != 'gonk') || toolkit == 'android' #No test app installed #Bug 931116, b2g desktop specific, initial triage [test_bug937006.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage diff --git a/dom/indexedDB/test/unit/xpcshell.ini b/dom/indexedDB/test/unit/xpcshell.ini index be4e7a6f60db..306bd42e58cf 100644 --- a/dom/indexedDB/test/unit/xpcshell.ini +++ b/dom/indexedDB/test/unit/xpcshell.ini @@ -31,7 +31,7 @@ support-files = [test_getAll.js] [test_globalObjects_ipc.js] # FIXME/bug 575918: out-of-process xpcshell is broken on OS X -skip-if = os == "mac" || os == "android" +skip-if = buildapp == 'mulet' || os == "mac" || os == "android" [test_globalObjects_other.js] [test_globalObjects_xpc.js] [test_global_data.js] diff --git a/dom/ipc/tests/chrome.ini b/dom/ipc/tests/chrome.ini index 8a05fe088b7a..58acba9ffe09 100644 --- a/dom/ipc/tests/chrome.ini +++ b/dom/ipc/tests/chrome.ini @@ -4,3 +4,4 @@ support-files = process_error_contentscript.js [test_process_error.xul] +skip-if = buildapp == "mulet" diff --git a/dom/media/gmp-plugin/gmp-fake.cpp b/dom/media/gmp-plugin/gmp-fake.cpp index aaa8a4e205aa..69082ff6ad61 100644 --- a/dom/media/gmp-plugin/gmp-fake.cpp +++ b/dom/media/gmp-plugin/gmp-fake.cpp @@ -121,7 +121,7 @@ class FakeVideoEncoder : public GMPVideoEncoder { host_ (hostAPI), callback_ (NULL) {} - virtual GMPErr InitEncode (const GMPVideoCodec& codecSettings, + virtual void InitEncode (const GMPVideoCodec& codecSettings, const uint8_t* aCodecSpecific, uint32_t aCodecSpecificSize, GMPVideoEncoderCallback* callback, @@ -130,11 +130,9 @@ class FakeVideoEncoder : public GMPVideoEncoder { callback_ = callback; GMPLOG (GL_INFO, "Initialized encoder"); - - return GMPNoErr; } - virtual GMPErr Encode (GMPVideoi420Frame* inputImage, + virtual void Encode (GMPVideoi420Frame* inputImage, const uint8_t* aCodecSpecificInfo, uint32_t aCodecSpecificInfoLength, const GMPVideoFrameType* aFrameTypes, @@ -149,8 +147,6 @@ class FakeVideoEncoder : public GMPVideoEncoder { g_platform_api->runonmainthread(new FakeEncoderTask(this, inputImage, aFrameTypes[0])); - - return GMPGenericErr; } void Encode_m (GMPVideoi420Frame* inputImage, @@ -223,16 +219,13 @@ class FakeVideoEncoder : public GMPVideoEncoder { GMPLOG (GL_DEBUG, "Callback called"); } - virtual GMPErr SetChannelParameters (uint32_t aPacketLoss, uint32_t aRTT) { - return GMPNoErr; + virtual void SetChannelParameters (uint32_t aPacketLoss, uint32_t aRTT) { } - virtual GMPErr SetRates (uint32_t aNewBitRate, uint32_t aFrameRate) { - return GMPNoErr; + virtual void SetRates (uint32_t aNewBitRate, uint32_t aFrameRate) { } - virtual GMPErr SetPeriodicKeyFrames (bool aEnable) { - return GMPNoErr; + virtual void SetPeriodicKeyFrames (bool aEnable) { } virtual void EncodingComplete() { @@ -283,7 +276,7 @@ class FakeVideoDecoder : public GMPVideoDecoder { virtual ~FakeVideoDecoder() { } - virtual GMPErr InitDecode (const GMPVideoCodec& codecSettings, + virtual void InitDecode (const GMPVideoCodec& codecSettings, const uint8_t* aCodecSpecific, uint32_t aCodecSpecificSize, GMPVideoDecoderCallback* callback, @@ -291,10 +284,9 @@ class FakeVideoDecoder : public GMPVideoDecoder { GMPLOG (GL_INFO, "InitDecode"); callback_ = callback; - return GMPNoErr; } - virtual GMPErr Decode (GMPVideoEncodedFrame* inputFrame, + virtual void Decode (GMPVideoEncodedFrame* inputFrame, bool missingFrames, const uint8_t* aCodecSpecificInfo, uint32_t aCodecSpecificInfoLength, @@ -303,16 +295,12 @@ class FakeVideoDecoder : public GMPVideoDecoder { << "Decoding frame size=" << inputFrame->Size() << " timestamp=" << inputFrame->TimeStamp()); g_platform_api->runonmainthread(new FakeDecoderTask(this, inputFrame, renderTimeMs)); - - return GMPNoErr; } - virtual GMPErr Reset() { - return GMPNoErr; + virtual void Reset() { } - virtual GMPErr Drain() { - return GMPNoErr; + virtual void Drain() { } virtual void DecodingComplete() { diff --git a/dom/messages/test/mochitest.ini b/dom/messages/test/mochitest.ini index 7ebc13d88c34..5fc124679d01 100644 --- a/dom/messages/test/mochitest.ini +++ b/dom/messages/test/mochitest.ini @@ -2,4 +2,4 @@ skip-if = e10s [test_bug_993732.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 diff --git a/dom/permission/tests/mochitest.ini b/dom/permission/tests/mochitest.ini index f6da99653cd6..962d3db1774d 100644 --- a/dom/permission/tests/mochitest.ini +++ b/dom/permission/tests/mochitest.ini @@ -7,7 +7,7 @@ support-files = [test_alarms.html] [test_browser.html] [test_embed-apps.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_idle.html] skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_permission_basics.html] @@ -24,4 +24,4 @@ skip-if = toolkit == 'android' [test_input-manage.html] skip-if = toolkit == 'android' [test_wifi-manage.html] -skip-if = (buildapp != 'b2g') || (buildapp == 'b2g' && toolkit != 'gonk') #b2g-desktop(Bug 931116, b2g desktop specific, initial triage) \ No newline at end of file +skip-if = (buildapp != 'b2g') || (buildapp == 'b2g' && toolkit != 'gonk') #b2g-desktop(Bug 931116, b2g desktop specific, initial triage) diff --git a/dom/plugins/test/mochitest/chrome.ini b/dom/plugins/test/mochitest/chrome.ini index 44b303bc11f1..5beb831e370b 100644 --- a/dom/plugins/test/mochitest/chrome.ini +++ b/dom/plugins/test/mochitest/chrome.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == "mulet" support-files = hang_test.js privatemode_perwindowpb.xul diff --git a/dom/plugins/test/mochitest/mochitest.ini b/dom/plugins/test/mochitest/mochitest.ini index 9a326927e33f..a4aca3191da0 100644 --- a/dom/plugins/test/mochitest/mochitest.ini +++ b/dom/plugins/test/mochitest/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #b2g-desktop(tests that use plugins) +skip-if = ((buildapp == 'mulet' || buildapp == 'b2g') && toolkit != 'gonk') || e10s #b2g-desktop(tests that use plugins) support-files = 307-xo-redirect.sjs crashing_subpage.html diff --git a/dom/plugins/test/unit/xpcshell.ini b/dom/plugins/test/unit/xpcshell.ini index eaa0022a144d..2e81b4f456e5 100644 --- a/dom/plugins/test/unit/xpcshell.ini +++ b/dom/plugins/test/unit/xpcshell.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = buildapp == 'mulet' head = head_plugins.js tail = diff --git a/dom/power/test/mochitest.ini b/dom/power/test/mochitest.ini index 1d1da9d9df04..3c519d46262d 100644 --- a/dom/power/test/mochitest.ini +++ b/dom/power/test/mochitest.ini @@ -4,7 +4,7 @@ skip-if = e10s [test_bug957893.html] [test_bug957899.html] [test_wakelock_not_exposed.html] -run-if = appname != "b2g" +run-if = appname != "b2g" && buildapp != "mulet" [test_power_basics.html] [test_power_set_cpusleepallowed.html] skip-if = toolkit != "gonk" diff --git a/dom/settings/tests/chrome.ini b/dom/settings/tests/chrome.ini index 75dc4064aad6..759514814058 100644 --- a/dom/settings/tests/chrome.ini +++ b/dom/settings/tests/chrome.ini @@ -2,5 +2,6 @@ [test_settings_service.js] [test_settings_service.xul] +skip-if= buildapp == 'mulet' [test_settings_service_callback.js] [test_settings_service_callback.xul] diff --git a/dom/tests/browser/browser.ini b/dom/tests/browser/browser.ini index 0fa50199837a..1be9889af13e 100644 --- a/dom/tests/browser/browser.ini +++ b/dom/tests/browser/browser.ini @@ -11,11 +11,13 @@ support-files = worker_bug1004814.js [browser_bug1008941_dismissGeolocationHanger.js] +skip-if = buildapp == 'mulet' [browser_test__content.js] [browser_ConsoleAPITests.js] [browser_ConsoleStorageAPITests.js] [browser_ConsoleStoragePBTest_perwindowpb.js] [browser_autofocus_background.js] +skip-if= buildapp == 'mulet' [browser_autofocus_preference.js] [browser_bug396843.js] [browser_focus_steal_from_chrome.js] @@ -24,7 +26,7 @@ support-files = [browser_geolocation_privatebrowsing_perwindowpb.js] [browser_localStorage_privatestorageevent.js] [browser_test_new_window_from_content.js] -skip-if = (toolkit == 'android' || buildapp == 'b2g') +skip-if = (toolkit == 'android' || buildapp == 'b2g' || buildapp == 'mulet') support-files = test_new_window_from_content_child.html test_new_window_from_content_child.js @@ -39,4 +41,5 @@ support-files = [browser_webapps_perms_reinstall.js] disabled = re-enable when bug 794920 is fixed [browser_xhr_sandbox.js] +skip-if= buildapp == 'mulet' [browser_bug1004814.js] diff --git a/dom/tests/mochitest/ajax/offline/mochitest.ini b/dom/tests/mochitest/ajax/offline/mochitest.ini index 5125653d943a..dba8a3b462b2 100644 --- a/dom/tests/mochitest/ajax/offline/mochitest.ini +++ b/dom/tests/mochitest/ajax/offline/mochitest.ini @@ -74,7 +74,7 @@ skip-if = buildapp == 'b2g' [test_bug474696.html] skip-if = buildapp == 'b2g' [test_bug544462.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'mulet' || buildapp == 'b2g' [test_bug744719-cancel.html] skip-if = buildapp == 'b2g' [test_bug744719.html] diff --git a/dom/tests/mochitest/bugs/mochitest.ini b/dom/tests/mochitest/bugs/mochitest.ini index e1a954c5a9e8..774177e984fc 100644 --- a/dom/tests/mochitest/bugs/mochitest.ini +++ b/dom/tests/mochitest/bugs/mochitest.ini @@ -44,7 +44,7 @@ skip-if = buildapp == 'b2g' || e10s # b2g(dom.disable_open_during_load not imple [test_bug265203.html] [test_bug291377.html] [test_bug291653.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_bug304459.html] [test_bug308856.html] [test_bug327891.html] @@ -71,16 +71,16 @@ skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) [test_bug400204.html] [test_bug404748.html] [test_bug406375.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s [test_bug411103.html] [test_bug414291.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_bug427744.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s [test_bug42976.html] [test_bug430276.html] [test_bug437361.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(dom.disable_open_during_load not implemented in b2g, showmodaldialog) b2g-debug(dom.disable_open_during_load not implemented in b2g, showmodaldialog) b2g-desktop(dom.disable_open_during_load not implemented in b2g, showmodaldialog) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(dom.disable_open_during_load not implemented in b2g, showmodaldialog) b2g-debug(dom.disable_open_during_load not implemented in b2g, showmodaldialog) b2g-desktop(dom.disable_open_during_load not implemented in b2g, showmodaldialog) [test_bug440572.html] [test_bug456151.html] [test_bug458091.html] @@ -88,14 +88,14 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_bug459848.html] [test_bug465263.html] [test_bug479143.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_bug484775.html] [test_bug492925.html] [test_bug49312.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_bug495219.html] [test_bug504862.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #RANDOM # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #RANDOM # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_bug529328.html] [test_bug531176.html] [test_bug531542.html] @@ -116,7 +116,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_bug597809.html] skip-if = toolkit == 'android' || e10s [test_bug61098.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_bug612267.html] [test_bug617296.html] [test_bug620947.html] @@ -158,9 +158,9 @@ skip-if = toolkit == 'android' || e10s #bug 775227 [test_onerror_message.html] [test_protochains.html] [test_resize_move_windows.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #Windows can't change size and position on Android # b2g(Windows can't change size and position on B2G) b2g-debug(Windows can't change size and position on B2G) b2g-desktop(Windows can't change size and position on B2G) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #Windows can't change size and position on Android # b2g(Windows can't change size and position on B2G) b2g-debug(Windows can't change size and position on B2G) b2g-desktop(Windows can't change size and position on B2G) [test_sizetocontent_clamp.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #Windows can't change size on Android # b2g(Windows can't change size on B2G) b2g-debug(Windows can't change size on B2G) b2g-desktop(Windows can't change size on B2G) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #Windows can't change size on Android # b2g(Windows can't change size on B2G) b2g-debug(Windows can't change size on B2G) b2g-desktop(Windows can't change size on B2G) [test_toJSON.html] [test_window_bar.html] skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s diff --git a/dom/tests/mochitest/chrome/chrome.ini b/dom/tests/mochitest/chrome/chrome.ini index 544110bf3eaa..487b059e1540 100644 --- a/dom/tests/mochitest/chrome/chrome.ini +++ b/dom/tests/mochitest/chrome/chrome.ini @@ -36,6 +36,7 @@ support-files = [test_cyclecollector.xul] [test_docshell_swap.xul] [test_focus.xul] +skip-if = buildapp == 'mulet' [test_focus_docnav.xul] [test_focus_switchbinding.xul] [test_focused_link_scroll.xul] diff --git a/dom/tests/mochitest/general/chrome.ini b/dom/tests/mochitest/general/chrome.ini index 28a04daf5736..6a80281ab784 100644 --- a/dom/tests/mochitest/general/chrome.ini +++ b/dom/tests/mochitest/general/chrome.ini @@ -4,3 +4,4 @@ [test_offsets.css] [test_offsets.js] [test_offsets.xul] +skip-if = buildapp == 'mulet' diff --git a/dom/tests/mochitest/general/mochitest.ini b/dom/tests/mochitest/general/mochitest.ini index b8effe4949ad..4c2bea3fa535 100644 --- a/dom/tests/mochitest/general/mochitest.ini +++ b/dom/tests/mochitest/general/mochitest.ini @@ -34,33 +34,36 @@ skip-if = buildapp == 'b2g' # b2g(clipboard undefined) b2g-debug(clipboard undef [test_domWindowUtils_scrollXY.html] [test_domWindowUtils_scrollbarSize.html] [test_donottrack.html] +skip-if = buildapp == 'mulet' [test_focus_legend_noparent.html] [test_focusrings.xul] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_for_of.html] [test_frameElementWrapping.html] [test_framedhistoryframes.html] [test_idleapi_permissions.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || buildapp == 'mulet' [test_interfaces.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_network_events.html] # Disable this test until bug 795711 is fixed. [test_offsets.html] [test_offsets.js] [test_outerHTML.html] [test_outerHTML.xhtml] +skip-if = buildapp == 'mulet' [test_paste_selection.html] +skip-if = buildapp == 'mulet' [test_picture_pref.html] [test_resource_timing.html] -skip-if = buildapp == 'b2g' # b2g(No clipboard) b2g-debug(No clipboard) b2g-desktop(No clipboard) +skip-if = buildapp == 'b2g' || buildapp == 'mulet' # b2g(No clipboard) b2g-debug(No clipboard) b2g-desktop(No clipboard) [test_performance_now.html] [test_srcset_pref.html] [test_showModalDialog.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #Don't run modal tests on Android # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #Don't run modal tests on Android # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_stylesheetPI.html] [test_vibrator.html] -skip-if = toolkit == 'android' #CRASH_SUTAGENT +skip-if = buildapp == 'mulet' || toolkit == 'android' #CRASH_SUTAGENT [test_windowProperties.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_windowedhistoryframes.html] diff --git a/dom/tests/mochitest/geolocation/mochitest.ini b/dom/tests/mochitest/geolocation/mochitest.ini index fd3d700e3924..79b359a018d5 100644 --- a/dom/tests/mochitest/geolocation/mochitest.ini +++ b/dom/tests/mochitest/geolocation/mochitest.ini @@ -23,7 +23,7 @@ skip-if = buildapp == 'b2g' skip-if = toolkit=='gonk' || toolkit == 'android' || e10s #TIMED_OUT # b2g-debug(debug-only timeout) [test_geolocation_is_undefined_when_pref_is_off.html] [test_handlerSpinsEventLoop.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #Don't run modal tests on Android # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #Don't run modal tests on Android # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_manyCurrentConcurrent.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_manyCurrentSerial.html] @@ -33,7 +33,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_manyWatchSerial.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_manyWindows.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'mulet' || buildapp == 'b2g' [test_mozsettings.html] skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #mozSettings is undefined [test_mozsettingsWatch.html] diff --git a/dom/tests/mochitest/notification/mochitest.ini b/dom/tests/mochitest/notification/mochitest.ini index 89d4e45169c3..9972c9c1d05d 100644 --- a/dom/tests/mochitest/notification/mochitest.ini +++ b/dom/tests/mochitest/notification/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = e10s +skip-if = e10s || buildapp == 'mulet' support-files = MockServices.js NotificationTest.js diff --git a/dom/tests/mochitest/storageevent/mochitest.ini b/dom/tests/mochitest/storageevent/mochitest.ini index f18fb840b1e7..e6fcf34b22d2 100644 --- a/dom/tests/mochitest/storageevent/mochitest.ini +++ b/dom/tests/mochitest/storageevent/mochitest.ini @@ -14,5 +14,6 @@ support-files = [test_storageLocalStorageEventCheckNoPropagation.html] [test_storageLocalStorageEventCheckPropagation.html] [test_storageNotifications.html] +skip-if = buildapp == 'mulet' [test_storageSessionStorageEventCheckNoPropagation.html] [test_storageSessionStorageEventCheckPropagation.html] diff --git a/dom/webidl/HTMLElement.webidl b/dom/webidl/HTMLElement.webidl index 034abe3f5db3..8399c1e7cbac 100644 --- a/dom/webidl/HTMLElement.webidl +++ b/dom/webidl/HTMLElement.webidl @@ -76,10 +76,6 @@ interface HTMLElement : Element { readonly attribute CSSStyleDeclaration style; // Mozilla specific stuff - // FIXME Bug 810677 Move className from HTMLElement to Element - [Pure] - attribute DOMString className; - attribute EventHandler oncopy; attribute EventHandler oncut; attribute EventHandler onpaste; diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index 8b01ce2d01ca..99afaa87006b 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -737,6 +737,29 @@ public: } }; +class FinishActivationRunnable : public nsRunnable +{ + nsMainThreadPtrHandle mRegistration; + +public: + FinishActivationRunnable(const nsMainThreadPtrHandle& aRegistration) + : mRegistration(aRegistration) + { + MOZ_ASSERT(!NS_IsMainThread()); + } + + NS_IMETHODIMP + Run() + { + AssertIsOnMainThread(); + + // FinishActivate takes ownership of the passed info. + nsRefPtr swm = ServiceWorkerManager::GetInstance(); + swm->FinishActivate(mRegistration.get()); + return NS_OK; + } +}; + class CancelServiceWorkerInstallationRunnable MOZ_FINAL : public nsRunnable { nsMainThreadPtrHandle mRegistration; @@ -798,6 +821,39 @@ public: } }; +class FinishActivateHandler : public PromiseNativeHandler +{ + nsMainThreadPtrHandle mRegistration; + +public: + FinishActivateHandler(const nsMainThreadPtrHandle& aRegistration) + : mRegistration(aRegistration) + { + MOZ_ASSERT(!NS_IsMainThread()); + } + + virtual + ~FinishActivateHandler() + { } + + void + ResolvedCallback(JSContext* aCx, JS::Handle aValue) MOZ_OVERRIDE + { + WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate(); + MOZ_ASSERT(workerPrivate); + workerPrivate->AssertIsOnWorkerThread(); + + nsRefPtr r = new FinishActivationRunnable(mRegistration); + NS_DispatchToMainThread(r); + } + + void + RejectedCallback(JSContext* aCx, JS::Handle aValue) MOZ_OVERRIDE + { + // FIXME(nsm). Spec is undefined. + } +}; + /* * Fires 'install' event on the ServiceWorkerGlobalScope. Modifies busy count * since it fires the event. This is ok since there can't be nested @@ -873,12 +929,77 @@ private: } }; +class ActivateEventRunnable : public WorkerRunnable +{ + nsMainThreadPtrHandle mRegistration; + +public: + ActivateEventRunnable(WorkerPrivate* aWorkerPrivate, + const nsMainThreadPtrHandle& aRegistration) + : WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount), + mRegistration(aRegistration) + { + MOZ_ASSERT(aWorkerPrivate); + } + + bool + WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) + { + MOZ_ASSERT(aWorkerPrivate); + return DispatchActivateEvent(aCx, aWorkerPrivate); + } + +private: + bool + DispatchActivateEvent(JSContext* aCx, WorkerPrivate* aWorkerPrivate) + { + MOZ_ASSERT(aWorkerPrivate->IsServiceWorker()); + nsRefPtr target = do_QueryObject(aWorkerPrivate->GlobalScope()); + + // FIXME(nsm): Set activeWorker to the correct thing. + EventInit init; + init.mBubbles = false; + init.mCancelable = true; + nsRefPtr event = + InstallPhaseEvent::Constructor(target, NS_LITERAL_STRING("activate"), init); + + event->SetTrusted(true); + + nsRefPtr waitUntilPromise; + + nsresult rv = target->DispatchDOMEvent(nullptr, event, nullptr, nullptr); + if (NS_SUCCEEDED(rv)) { + waitUntilPromise = event->GetPromise(); + if (!waitUntilPromise) { + ErrorResult rv; + nsCOMPtr global = + do_QueryObject(aWorkerPrivate->GlobalScope()); + waitUntilPromise = + Promise::Resolve(global, + aCx, JS::UndefinedHandleValue, rv); + } + } else { + ErrorResult rv; + nsCOMPtr global = + do_QueryObject(aWorkerPrivate->GlobalScope()); + // Continue with a canceled install. + waitUntilPromise = Promise::Reject(global, aCx, + JS::UndefinedHandleValue, rv); + } + + nsRefPtr handler = new FinishActivateHandler(mRegistration); + waitUntilPromise->AppendNativeHandler(handler); + return true; + } +}; + void ServiceWorkerManager::Install(ServiceWorkerRegistration* aRegistration, ServiceWorkerInfo* aServiceWorkerInfo) { AssertIsOnMainThread(); aRegistration->mInstallingWorker = aServiceWorkerInfo; + MOZ_ASSERT(aRegistration->mInstallingWorker); nsMainThreadPtrHandle handle = new nsMainThreadPtrHolder(aRegistration); @@ -920,9 +1041,52 @@ ServiceWorkerManager::Install(ServiceWorkerRegistration* aRegistration, class ActivationRunnable : public nsRunnable { + nsRefPtr mRegistration; public: explicit ActivationRunnable(ServiceWorkerRegistration* aRegistration) - { } + : mRegistration(aRegistration) + { + } + + NS_IMETHODIMP + Run() MOZ_OVERRIDE + { + if (mRegistration->mCurrentWorker) { + // FIXME(nsm). Steps 3.1-3.4 of the algorithm. + } + + mRegistration->mCurrentWorker = mRegistration->mWaitingWorker.forget(); + + // FIXME(nsm): Steps 7 of the algorithm. + + nsRefPtr swm = ServiceWorkerManager::GetInstance(); + + swm->FireEventOnServiceWorkerContainers(mRegistration, + NS_LITERAL_STRING("controllerchange")); + + MOZ_ASSERT(mRegistration->mCurrentWorker); + nsRefPtr serviceWorker; + nsresult rv = + swm->CreateServiceWorker(mRegistration->mCurrentWorker->GetScriptSpec(), + mRegistration->mScope, + getter_AddRefs(serviceWorker)); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } + + nsMainThreadPtrHandle handle = + new nsMainThreadPtrHolder(mRegistration); + + nsRefPtr r = + new ActivateEventRunnable(serviceWorker->GetWorkerPrivate(), handle); + + AutoSafeJSContext cx; + if (!r->Dispatch(cx)) { + return NS_ERROR_FAILURE; + } + + return NS_OK; + } }; void @@ -934,7 +1098,17 @@ ServiceWorkerManager::FinishInstall(ServiceWorkerRegistration* aRegistration) // FIXME(nsm): Actually update the state of active ServiceWorker instances. } + if (!aRegistration->mInstallingWorker) { + // It is possible that while this run of [[Install]] was waiting for + // the worker to handle the install event, some page called register() with + // a different script leading to [[Update]] terminating the + // installingWorker and setting it to null. The FinishInstallRunnable may + // already have been dispatched, hence the check. + return; + } + aRegistration->mWaitingWorker = aRegistration->mInstallingWorker.forget(); + MOZ_ASSERT(aRegistration->mWaitingWorker); // FIXME(nsm): Actually update state of active ServiceWorker instances to // installed. @@ -942,17 +1116,25 @@ ServiceWorkerManager::FinishInstall(ServiceWorkerRegistration* aRegistration) // FIXME(nsm): Handle replace(). - // FIXME(nsm): Check that no document is using the registration! + if (!aRegistration->IsControllingDocuments()) { + nsRefPtr r = + new ActivationRunnable(aRegistration); - nsRefPtr r = - new ActivationRunnable(aRegistration); - - nsresult rv = NS_DispatchToMainThread(r); - if (NS_WARN_IF(NS_FAILED(rv))) { - // FIXME(nsm): Handle error. + nsresult rv = NS_DispatchToMainThread(r); + if (NS_WARN_IF(NS_FAILED(rv))) { + // FIXME(nsm): Handle error. + // How likely is this to happen and can we really do anything about it? + } } } +void +ServiceWorkerManager::FinishActivate(ServiceWorkerRegistration* aRegistration) +{ + // FIXME(nsm): Set aRegistration->mCurrentWorker state to activated. + // Fire statechange. +} + NS_IMETHODIMP ServiceWorkerManager::CreateServiceWorkerForWindow(nsPIDOMWindow* aWindow, const nsACString& aScriptSpec, @@ -1215,6 +1397,7 @@ ServiceWorkerManager::GetScopeForUrl(const nsAString& aUrl, nsAString& aScope) aScope = NS_ConvertUTF8toUTF16(r->mScope); return NS_OK; } + NS_IMETHODIMP ServiceWorkerManager::AddContainerEventListener(nsIURI* aDocumentURI, nsIDOMEventTarget* aListener) { diff --git a/dom/workers/ServiceWorkerManager.h b/dom/workers/ServiceWorkerManager.h index 872f80c80015..e034dbb76589 100644 --- a/dom/workers/ServiceWorkerManager.h +++ b/dom/workers/ServiceWorkerManager.h @@ -186,6 +186,7 @@ public: */ class ServiceWorkerManager MOZ_FINAL : public nsIServiceWorkerManager { + friend class ActivationRunnable; friend class RegisterRunnable; friend class CallInstallRunnable; friend class ServiceWorkerUpdateInstance; @@ -285,6 +286,9 @@ public: void FinishInstall(ServiceWorkerRegistration* aRegistration); + void + FinishActivate(ServiceWorkerRegistration* aRegistration); + void HandleError(JSContext* aCx, const nsACString& aScope, diff --git a/dom/workers/test/mochitest.ini b/dom/workers/test/mochitest.ini index 6b77f6ccaaaa..48ee725ad8ed 100644 --- a/dom/workers/test/mochitest.ini +++ b/dom/workers/test/mochitest.ini @@ -119,6 +119,7 @@ skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_multi_sharedWorker.html] [test_multi_sharedWorker_lifetimes.html] [test_navigator.html] +skip-if = buildapp == 'mulet' [test_newError.html] [test_onLine.html] skip-if = (toolkit == 'gonk' && debug) #debug-only failure diff --git a/dom/workers/test/serviceworkers/install_event_worker.js b/dom/workers/test/serviceworkers/install_event_worker.js index 02b5174a778c..f965d28aa8a2 100644 --- a/dom/workers/test/serviceworkers/install_event_worker.js +++ b/dom/workers/test/serviceworkers/install_event_worker.js @@ -1,4 +1,3 @@ oninstall = function(e) { - dump("NSM Got install event\n"); - dump(e.activeWorker); + dump("Got install event\n"); } diff --git a/dom/workers/test/serviceworkers/test_install_event.html b/dom/workers/test/serviceworkers/test_install_event.html index b84a9604bb5d..dcea3d78adcf 100644 --- a/dom/workers/test/serviceworkers/test_install_event.html +++ b/dom/workers/test/serviceworkers/test_install_event.html @@ -16,14 +16,19 @@