diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index 411f850c9323..af7753fab03f 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -4,6 +4,7 @@ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/1999/xhtml"); +@namespace svg url("http://www.w3.org/2000/svg"); #main-window:not([chromehidden~="toolbar"]) { %ifdef XP_MACOSX diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 7d211ccabdd0..fb908c3946cb 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -404,14 +404,9 @@ - -#ifdef XP_UNIX - &syncStartPanel.subTitleUnix; -#else - &syncStartPanel.subTitle; -#endif - + value="&syncStartPanel2.heading;"/> + diff --git a/browser/base/content/highlighter.css b/browser/base/content/highlighter.css index 6b9f5d27e4a6..cb29d4119626 100644 --- a/browser/base/content/highlighter.css +++ b/browser/base/content/highlighter.css @@ -6,25 +6,15 @@ pointer-events: none; } -.highlighter-outline-container { - overflow: hidden; - position: relative; -} - -.highlighter-outline { - position: absolute; -} - -.highlighter-outline[hidden] { - opacity: 0; - pointer-events: none; - display: -moz-box; -} - -.highlighter-outline:not([disable-transitions]) { - transition-property: opacity, top, left, width, height; - transition-duration: 0.1s; - transition-timing-function: linear; +/* + * Box model highlighter + */ +svg|svg.box-model-root[hidden], +svg|line.box-model-guide-top[hidden], +svg|line.box-model-guide-right[hidden], +svg|line.box-model-guide-left[hidden], +svg|line.box-model-guide-bottom[hidden] { + display: none; } /* @@ -45,13 +35,6 @@ display: -moz-box; } -.highlighter-nodeinfobar-positioner:not([disable-transitions]), -.highlighter-nodeinfobar-positioner[disable-transitions][force-transitions] { - transition-property: transform, opacity, top, left; - transition-duration: 0.1s; - transition-timing-function: linear; -} - .highlighter-nodeinfobar-text { overflow: hidden; white-space: nowrap; diff --git a/browser/base/content/socialmarks.xml b/browser/base/content/socialmarks.xml index 60baee9fd737..5ca27a42f159 100644 --- a/browser/base/content/socialmarks.xml +++ b/browser/base/content/socialmarks.xml @@ -220,10 +220,11 @@ } if (aResetOnClose) { let evName = inMenuPanel ? "ViewHiding": "popuphidden"; - panel.addEventListener(evName, function _hidden() { + let _hidden = () => { panel.removeEventListener(evName, _hidden); this.update(); - }.bind(this), false); + }; + panel.addEventListener(evName, _hidden, false); } ]]> @@ -282,12 +283,13 @@ if (!this.inMenuPanel) sizeSocialPanelToContent(this.panel, this.content); } else { - this.content.addEventListener("load", function panelBrowserOnload(e) { + let panelBrowserOnload = (e) => { this.content.removeEventListener("load", panelBrowserOnload, true); this.dispatchPanelEvent("socialFrameShow"); if (!this.inMenuPanel) sizeSocialPanelToContent(this.panel, this.content); - }.bind(this), true); + }; + this.content.addEventListener("load", panelBrowserOnload, true); } ]]> diff --git a/browser/base/content/test/general/domplate_test.js b/browser/base/content/test/general/domplate_test.js index 75f2b25e2a52..b340b22ed61d 100644 --- a/browser/base/content/test/general/domplate_test.js +++ b/browser/base/content/test/general/domplate_test.js @@ -46,6 +46,6 @@ function test() waitForFocus(createDocument, content); }, true); - content.location = "data:text/html,basic domplate tests"; + content.location = "data:text/html;charset=utf-8,domplate_test.js"; } diff --git a/browser/base/content/test/general/mochitest.ini b/browser/base/content/test/general/mochitest.ini index 13acd7a6c5f6..caccc6f7f848 100644 --- a/browser/base/content/test/general/mochitest.ini +++ b/browser/base/content/test/general/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s support-files = audio.ogg bug364677-data.xml diff --git a/browser/components/feeds/test/mochitest.ini b/browser/components/feeds/test/mochitest.ini index c3ce5c0fcc2a..46725466ec33 100644 --- a/browser/components/feeds/test/mochitest.ini +++ b/browser/components/feeds/test/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s support-files = bug368464-data.xml bug408328-data.xml diff --git a/browser/devtools/app-manager/test/head.js b/browser/devtools/app-manager/test/head.js index 61f3228f5271..30870b62feea 100644 --- a/browser/devtools/app-manager/test/head.js +++ b/browser/devtools/app-manager/test/head.js @@ -19,6 +19,11 @@ const HOSTED_APP_MANIFEST = TEST_BASE + "hosted_app.manifest"; const PACKAGED_APP_DIR_PATH = getTestFilePath("."); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + function addTab(url, targetWindow = window) { info("Adding tab: " + url); diff --git a/browser/devtools/commandline/test/head.js b/browser/devtools/commandline/test/head.js index 40762de18dd1..646752238932 100644 --- a/browser/devtools/commandline/test/head.js +++ b/browser/devtools/commandline/test/head.js @@ -10,6 +10,11 @@ let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/")); Services.scriptloader.loadSubScript(testDir + "/helpers.js", this); Services.scriptloader.loadSubScript(testDir + "/mockCommands.js", this); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + function whenDelayedStartupFinished(aWindow, aCallback) { Services.obs.addObserver(function observer(aSubject, aTopic) { if (aWindow == aSubject) { diff --git a/browser/devtools/debugger/test/browser_dbg_listtabs-02.js b/browser/devtools/debugger/test/browser_dbg_listtabs-02.js index 56fe91ee8fb6..e48f38a7b40b 100644 --- a/browser/devtools/debugger/test/browser_dbg_listtabs-02.js +++ b/browser/devtools/debugger/test/browser_dbg_listtabs-02.js @@ -45,7 +45,7 @@ function test() { .then(testWindowClosed) .then(removeTabB) .then(checkSingleTab) - .then(finish); + .then(finishUp); } function checkSingleTab() { @@ -208,3 +208,8 @@ function removeTabB() { removeTab(gTabB); return deferred.promise; } + +function finishUp() { + gTabList = gFirstActor = gActorA = gTabA = gTabB = gTabC = gNewWindow = null; + finish(); +} diff --git a/browser/devtools/debugger/test/browser_dbg_variables-view-frame-with.js b/browser/devtools/debugger/test/browser_dbg_variables-view-frame-with.js index e11f17325b47..96b2f48f9e77 100644 --- a/browser/devtools/debugger/test/browser_dbg_variables-view-frame-with.js +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-frame-with.js @@ -207,4 +207,5 @@ registerCleanupFunction(function() { gDebuggee = null; gPanel = null; gDebugger = null; + gVariables = null; }); diff --git a/browser/devtools/debugger/test/head.js b/browser/devtools/debugger/test/head.js index 3ce51dfe49a7..2472a024b732 100644 --- a/browser/devtools/debugger/test/head.js +++ b/browser/devtools/debugger/test/head.js @@ -27,6 +27,11 @@ let Toolbox = devtools.Toolbox; const EXAMPLE_URL = "http://example.com/browser/browser/devtools/debugger/test/"; +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + // All tests are asynchronous. waitForExplicitFinish(); diff --git a/browser/devtools/fontinspector/test/browser_fontinspector.js b/browser/devtools/fontinspector/test/browser_fontinspector.js index 2ab140040e83..c198938e53d5 100644 --- a/browser/devtools/fontinspector/test/browser_fontinspector.js +++ b/browser/devtools/fontinspector/test/browser_fontinspector.js @@ -16,6 +16,11 @@ function test() { let viewDoc; let inspector; + gDevTools.testing = true; + SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; + }); + gBrowser.selectedTab = gBrowser.addTab(); gBrowser.selectedBrowser.addEventListener("load", function onload() { gBrowser.selectedBrowser.removeEventListener("load", onload, true); diff --git a/browser/devtools/framework/gDevTools.jsm b/browser/devtools/framework/gDevTools.jsm index e90c39cd3a26..8a593b11c28f 100644 --- a/browser/devtools/framework/gDevTools.jsm +++ b/browser/devtools/framework/gDevTools.jsm @@ -32,6 +32,8 @@ this.DevTools = function DevTools() { this.destroy = this.destroy.bind(this); this._teardown = this._teardown.bind(this); + this._testing = false; + EventEmitter.decorate(this); Services.obs.addObserver(this._teardown, "devtools-unloaded", false); @@ -39,6 +41,29 @@ this.DevTools = function DevTools() { } DevTools.prototype = { + /** + * When the testing flag is set we take appropriate action to prevent race + * conditions in our testing environment. This means setting + * dom.send_after_paint_to_content to false to prevent infinite MozAfterPaint + * loops and not autohiding the highlighter. + */ + get testing() { + return this._testing; + }, + + set testing(state) { + this._testing = state; + + if (state) { + // dom.send_after_paint_to_content is set to true (non-default) in + // testing/profiles/prefs_general.js so lets set it to the same as it is + // in a default browser profile for the duration of the test. + Services.prefs.setBoolPref("dom.send_after_paint_to_content", false); + } else { + Services.prefs.setBoolPref("dom.send_after_paint_to_content", true); + } + }, + /** * Register a new developer tool. * diff --git a/browser/devtools/framework/selection.js b/browser/devtools/framework/selection.js index be8b3778874b..f01ce77a794e 100644 --- a/browser/devtools/framework/selection.js +++ b/browser/devtools/framework/selection.js @@ -160,20 +160,22 @@ Selection.prototype = { setNodeFront: function(value, reason="unknown") { this.reason = reason; - if (value !== this._nodeFront) { - let rawValue = null; - if (value && value.isLocal_toBeDeprecated()) { - rawValue = value.rawNode(); - } - this.emit("before-new-node", rawValue, reason); - this.emit("before-new-node-front", value, reason); - let previousNode = this._node; - let previousFront = this._nodeFront; - this._node = rawValue; - this._nodeFront = value; - this.emit("new-node", previousNode, this.reason); - this.emit("new-node-front", value, this.reason); + + // We used to return here if the node had not changed but we now need to + // set the node even if it is already set otherwise it is not possible to + // e.g. highlight the same node twice. + let rawValue = null; + if (value && value.isLocal_toBeDeprecated()) { + rawValue = value.rawNode(); } + this.emit("before-new-node", rawValue, reason); + this.emit("before-new-node-front", value, reason); + let previousNode = this._node; + let previousFront = this._nodeFront; + this._node = rawValue; + this._nodeFront = value; + this.emit("new-node", previousNode, this.reason); + this.emit("new-node-front", value, this.reason); }, get documentFront() { diff --git a/browser/devtools/framework/test/head.js b/browser/devtools/framework/test/head.js index c586a168b255..a07c621a5a01 100644 --- a/browser/devtools/framework/test/head.js +++ b/browser/devtools/framework/test/head.js @@ -13,6 +13,11 @@ let promise = tempScope.Promise; let {devtools} = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); let TargetFactory = devtools.TargetFactory; +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + /** * Open a new tab at a URL and call a callback on load */ diff --git a/browser/devtools/framework/toolbox.js b/browser/devtools/framework/toolbox.js index f803021a5897..e0ef96441387 100644 --- a/browser/devtools/framework/toolbox.js +++ b/browser/devtools/framework/toolbox.js @@ -73,6 +73,8 @@ function Toolbox(target, selectedTool, hostType, hostOptions) { this._splitConsoleOnKeypress = this._splitConsoleOnKeypress.bind(this) this.destroy = this.destroy.bind(this); this.highlighterUtils = new ToolboxHighlighterUtils(this); + this._highlighterReady = this._highlighterReady.bind(this); + this._highlighterHidden = this._highlighterHidden.bind(this); this._target.on("close", this.destroy); @@ -1097,8 +1099,14 @@ Toolbox.prototype = { this._inspector = InspectorFront(this._target.client, this._target.form); this._walker = yield this._inspector.getWalker(); this._selection = new Selection(this._walker); + if (this.highlighterUtils.isRemoteHighlightable) { - this._highlighter = yield this._inspector.getHighlighter(); + let autohide = !gDevTools.testing; + + this.walker.on("highlighter-ready", this._highlighterReady); + this.walker.on("highlighter-hide", this._highlighterHidden); + + this._highlighter = yield this._inspector.getHighlighter(autohide); } }.bind(this)); } @@ -1110,6 +1118,10 @@ Toolbox.prototype = { * Returns a promise that resolves when the fronts are destroyed */ destroyInspector: function() { + if (this._destroying) { + return this._destroying; + } + if (!this._inspector) { return promise.resolve(); } @@ -1125,6 +1137,11 @@ Toolbox.prototype = { this._selection.destroy(); } + if (this.walker) { + this.walker.off("highlighter-ready", this._highlighterReady); + this.walker.off("highlighter-hide", this._highlighterHidden); + } + this._inspector = null; this._highlighter = null; this._selection = null; @@ -1135,7 +1152,9 @@ Toolbox.prototype = { // Releasing the walker (if it has been created) // This can fail, but in any case, we want to continue destroying the // inspector/highlighter/selection - let walker = this._walker ? this._walker.release() : promise.resolve(); + let walker = (this._destroying = this._walker) ? + this._walker.release() : + promise.resolve(); return walker.then(outstanding, outstanding); }, @@ -1224,7 +1243,15 @@ Toolbox.prototype = { this._host = null; this._toolPanels.clear(); }).then(null, console.error); - } + }, + + _highlighterReady: function() { + this.emit("highlighter-ready"); + }, + + _highlighterHidden: function() { + this.emit("highlighter-hide"); + }, }; /** @@ -1284,6 +1311,7 @@ ToolboxHighlighterUtils.prototype = { let deferred = promise.defer(); let done = () => { + this._isPicking = true; this.toolbox.emit("picker-started"); this.toolbox.on("select", this.stopPicker); deferred.resolve(); @@ -1293,20 +1321,20 @@ ToolboxHighlighterUtils.prototype = { this.toolbox.initInspector(), this.toolbox.selectTool("inspector") ]).then(() => { - this._isPicking = true; this.toolbox._pickerButton.setAttribute("checked", "true"); if (this.isRemoteHighlightable) { - this.toolbox.highlighter.pick().then(done); - this.toolbox.walker.on("picker-node-hovered", this._onPickerNodeHovered); this.toolbox.walker.on("picker-node-picked", this._onPickerNodePicked); + + this.toolbox.highlighter.pick().then(done); } else { - this.toolbox.walker.pick().then(node => { - this.toolbox.selection.setNodeFront(node, "picker-node-picked"); - this.stopPicker(); + return this.toolbox.walker.pick().then(node => { + this.toolbox.selection.setNodeFront(node, "picker-node-picked").then(() => { + this.stopPicker(); + done(); + }); }); - done(); } }); @@ -1404,11 +1432,16 @@ ToolboxHighlighterUtils.prototype = { * Hide the highlighter. * @return a promise that resolves when the highlighter is hidden */ - unhighlight: function() { + unhighlight: function(forceHide=false) { if (this.isRemoteHighlightable) { // If the remote highlighter exists on the target, use it return this.toolbox.initInspector().then(() => { - return this.toolbox.highlighter.hideBoxModel(); + let autohide = forceHide || !gDevTools.testing; + + if (autohide) { + return this.toolbox.highlighter.hideBoxModel(); + } + return promise.resolve(); }); } else { // If not, no need to unhighlight as the older highlight method uses a diff --git a/browser/devtools/inspector/breadcrumbs.js b/browser/devtools/inspector/breadcrumbs.js index dec6f5a09c5e..0ec7fce177db 100644 --- a/browser/devtools/inspector/breadcrumbs.js +++ b/browser/devtools/inspector/breadcrumbs.js @@ -699,7 +699,7 @@ HTMLBreadcrumbs.prototype = { this.selectionGuardEnd(err); }); } -} +}; XPCOMUtils.defineLazyGetter(this, "DOMUtils", function () { return Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils); diff --git a/browser/devtools/inspector/test/browser_inspector_basic_highlighter.js b/browser/devtools/inspector/test/browser_inspector_basic_highlighter.js index bc3eabddbd03..7132c04fad26 100644 --- a/browser/devtools/inspector/test/browser_inspector_basic_highlighter.js +++ b/browser/devtools/inspector/test/browser_inspector_basic_highlighter.js @@ -18,24 +18,21 @@ function test() { waitForFocus(setupTest, content); }, true); - content.location = "data:text/html,

foo

bar

"; + content.location = "data:text/html;charset=utf-8,

foo

bar"; function setupTest() { openInspector((aInspector, aToolbox) => { toolbox = aToolbox; inspector = aInspector; - inspector.selection.setNode(doc.querySelector("h2"), null); - inspector.once("inspector-updated", runTests); + inspector.selection.setNode(doc.querySelector("span"), "test"); + inspector.toolbox.once("highlighter-ready", runTests); }); } - function runTests(aInspector) { - getHighlighterOutline().setAttribute("disable-transitions", "true"); + function runTests() { Task.spawn(function() { yield hoverH1InMarkupView(); yield assertH1Highlighted(); - yield mouseLeaveMarkupView(); - yield assertNoNodeHighlighted(); finishUp(); }).then(null, Cu.reportError); @@ -43,11 +40,11 @@ function test() { function hoverH1InMarkupView() { let deferred = promise.defer(); - let container = getContainerForRawNode(inspector.markup, doc.querySelector("h1")); - EventUtils.synthesizeMouse(container.tagLine, 2, 2, {type: "mousemove"}, - inspector.markup.doc.defaultView); - inspector.toolbox.once("node-highlight", deferred.resolve); + + inspector.toolbox.once("highlighter-ready", deferred.resolve); + EventUtils.synthesizeMouseAtCenter(container.tagLine, {type: "mousemove"}, + inspector.markup.doc.defaultView); return deferred.promise; } @@ -55,25 +52,6 @@ function test() { function assertH1Highlighted() { ok(isHighlighting(), "The highlighter is shown on a markup container hover"); is(getHighlitNode(), doc.querySelector("h1"), "The highlighter highlights the right node"); - return promise.resolve(); - } - - function mouseLeaveMarkupView() { - let deferred = promise.defer(); - - // Find another element to mouseover over in order to leave the markup-view - let btn = toolbox.doc.querySelector(".toolbox-dock-button"); - - EventUtils.synthesizeMouse(btn, 2, 2, {type: "mousemove"}, - toolbox.doc.defaultView); - executeSoon(deferred.resolve); - - return deferred.promise; - } - - function assertNoNodeHighlighted() { - ok(!isHighlighting(), "After the mouse left the markup view, the highlighter is hidden"); - return promise.resolve(); } function finishUp() { diff --git a/browser/devtools/inspector/test/browser_inspector_breadcrumbs.js b/browser/devtools/inspector/test/browser_inspector_breadcrumbs.js index d6e35ea9109d..428d8a2fc4b9 100644 --- a/browser/devtools/inspector/test/browser_inspector_breadcrumbs.js +++ b/browser/devtools/inspector/test/browser_inspector_breadcrumbs.js @@ -91,7 +91,7 @@ function test() } function finishUp() { - doc = nodes = null; + doc = nodes = inspector = null; gBrowser.removeCurrentTab(); finish(); } diff --git a/browser/devtools/inspector/test/browser_inspector_bug_650804_search.js b/browser/devtools/inspector/test/browser_inspector_bug_650804_search.js index ad889ba7285a..3cb83918a8f2 100644 --- a/browser/devtools/inspector/test/browser_inspector_bug_650804_search.js +++ b/browser/devtools/inspector/test/browser_inspector_bug_650804_search.js @@ -52,7 +52,8 @@ function test() waitForFocus(setupTest, content); }, true); - content.location = "http://mochi.test:8888/browser/browser/devtools/inspector/test/browser_inspector_bug_650804_search.html"; + content.location = "http://mochi.test:8888/browser/browser/devtools/" + + "inspector/test/browser_inspector_bug_650804_search.html"; function $(id) { if (id == null) return null; diff --git a/browser/devtools/inspector/test/browser_inspector_bug_674871.js b/browser/devtools/inspector/test/browser_inspector_bug_674871.js index 7d2e508e807b..8f29ccc30b10 100644 --- a/browser/devtools/inspector/test/browser_inspector_bug_674871.js +++ b/browser/devtools/inspector/test/browser_inspector_bug_674871.js @@ -50,7 +50,6 @@ function test() inspector = aInspector; // Make sure the highlighter is shown so we can disable transitions inspector.toolbox.highlighter.showBoxModel(getNodeFront(doc.body)).then(() => { - getHighlighterOutline().setAttribute("disable-transitions", "true"); runTests(); }); }); @@ -65,12 +64,17 @@ function test() function isTheIframeHighlighted() { - let outlineRect = getHighlighterOutlineRect(); - let iframeRect = iframeNode.getBoundingClientRect(); - for (let dim of ["width", "height", "top", "left"]) { - is(Math.floor(outlineRect[dim]), Math.floor(iframeRect[dim]), - "Outline dimension is correct " + outlineRect[dim]); - } + let {p1, p2, p3, p4} = getBoxModelStatus().border.points; + let {top, right, bottom, left} = iframeNode.getBoundingClientRect(); + + is(top, p1.y, "iframeRect.top === boxModelStatus.p1.y"); + is(top, p2.y, "iframeRect.top === boxModelStatus.p2.y"); + is(right, p2.x, "iframeRect.right === boxModelStatus.p2.x"); + is(right, p3.x, "iframeRect.right === boxModelStatus.p3.x"); + is(bottom, p3.y, "iframeRect.bottom === boxModelStatus.p3.y"); + is(bottom, p4.y, "iframeRect.bottom === boxModelStatus.p4.y"); + is(left, p1.x, "iframeRect.left === boxModelStatus.p1.x"); + is(left, p4.x, "iframeRect.left === boxModelStatus.p4.x"); iframeNode.style.marginBottom = doc.defaultView.innerHeight + "px"; doc.defaultView.scrollBy(0, 40); @@ -82,9 +86,8 @@ function test() { is(getHighlitNode(), iframeBodyNode, "highlighter shows the right node"); - // 184 == 200 + 11(border) + 13(padding) - 40(scroll) - let outlineRect = getHighlighterOutlineRect(); - is(outlineRect.height, 184, "highlighter height"); + let outlineRect = getSimpleBorderRect(); + is(outlineRect.height, 200, "highlighter height"); inspector.toolbox.highlighterUtils.stopPicker().then(() => { let target = TargetFactory.forTab(gBrowser.selectedTab); diff --git a/browser/devtools/inspector/test/browser_inspector_bug_699308_iframe_navigation.js b/browser/devtools/inspector/test/browser_inspector_bug_699308_iframe_navigation.js index ee6689727ed8..6922087aebad 100644 --- a/browser/devtools/inspector/test/browser_inspector_bug_699308_iframe_navigation.js +++ b/browser/devtools/inspector/test/browser_inspector_bug_699308_iframe_navigation.js @@ -18,12 +18,7 @@ function test() { inspector.toolbox.highlighterUtils.startPicker().then(() => { EventUtils.synthesizeMouse(content.document.body, 1, 1, {type: "mousemove"}, content); - inspector.toolbox.once("picker-node-hovered", () => { - executeSoon(() => { - getHighlighterOutline().setAttribute("disable-transitions", "true"); - cb(); - }); - }); + inspector.toolbox.once("highlighter-ready", cb); }); } @@ -35,8 +30,7 @@ function test() { ok(isHighlighting(), "Inspector is highlighting"); iframe.addEventListener("load", onIframeLoad, false); - - executeSoon(function() { + executeSoon(() => { iframe.contentWindow.location = "javascript:location.reload()"; }); }); @@ -51,6 +45,7 @@ function test() { } iframe.removeEventListener("load", onIframeLoad, false); + info("Finished reloading iframe and inspector updated"); ok(isHighlighting(), "Inspector is highlighting after iframe nav"); @@ -78,6 +73,7 @@ function test() { waitForFocus(startTest, content); }, true); - content.location = "data:text/html,

bug 699308 - test iframe navigation" + - ""; + content.location = "data:text/html;charset=utf-8," + + "

bug 699308 - test iframe navigation

" + + ""; } diff --git a/browser/devtools/inspector/test/browser_inspector_bug_958456_highlight_comments.js b/browser/devtools/inspector/test/browser_inspector_bug_958456_highlight_comments.js index 57b1fab14431..756ce0ee58e0 100644 --- a/browser/devtools/inspector/test/browser_inspector_bug_958456_highlight_comments.js +++ b/browser/devtools/inspector/test/browser_inspector_bug_958456_highlight_comments.js @@ -77,7 +77,6 @@ function prepareHighlighter() { let deferred = promise.defer(); inspector.selection.setNode(doc.querySelector("p"), null); inspector.once("inspector-updated", () => { - getHighlighterOutline().setAttribute("disable-transitions", "true"); deferred.resolve(); }); return deferred.promise; diff --git a/browser/devtools/inspector/test/browser_inspector_changes.js b/browser/devtools/inspector/test/browser_inspector_changes.js index e391adcc6683..fc76792af6bf 100644 --- a/browser/devtools/inspector/test/browser_inspector_changes.js +++ b/browser/devtools/inspector/test/browser_inspector_changes.js @@ -150,5 +150,5 @@ function test() { waitForFocus(createDocument, content); }, true); - content.location = "data:text/html,basic tests for inspector"; + content.location = "data:text/html;charset=utf-8,browser_inspector_changes.js"; } diff --git a/browser/devtools/inspector/test/browser_inspector_highlighter.js b/browser/devtools/inspector/test/browser_inspector_highlighter.js index 8537bf0415fa..c2c8401e8003 100644 --- a/browser/devtools/inspector/test/browser_inspector_highlighter.js +++ b/browser/devtools/inspector/test/browser_inspector_highlighter.js @@ -51,30 +51,29 @@ function createDocument() { inspector = aInspector; inspector.selection.setNode(div, null); inspector.once("inspector-updated", () => { - getHighlighterOutline().setAttribute("disable-transitions", "true"); inspector.toolbox.highlighterUtils.startPicker().then(testMouseOverH1Highlights); }); }); } function testMouseOverH1Highlights() { - inspector.toolbox.once("picker-node-hovered", () => { + inspector.toolbox.once("highlighter-ready", () => { ok(isHighlighting(), "Highlighter is shown"); is(getHighlitNode(), h1, "Highlighter's outline correspond to the selected node"); - testOutlineDimensions(); + testBoxModelDimensions(); }); EventUtils.synthesizeMouse(h1, 2, 2, {type: "mousemove"}, content); } -function testOutlineDimensions() { +function testBoxModelDimensions() { let h1Dims = h1.getBoundingClientRect(); - let h1Width = h1Dims.width; - let h1Height = h1Dims.height; + let h1Width = Math.ceil(h1Dims.width); + let h1Height = Math.ceil(h1Dims.height); - let outlineDims = getHighlighterOutlineRect(); - let outlineWidth = outlineDims.width; - let outlineHeight = outlineDims.height; + let outlineDims = getSimpleBorderRect(); + let outlineWidth = Math.ceil(outlineDims.width); + let outlineHeight = Math.ceil(outlineDims.height); // Disabled due to bug 716245 is(outlineWidth, h1Width, "outline width matches dimensions of element (no zoom)"); @@ -85,27 +84,22 @@ function testOutlineDimensions() { .QueryInterface(Ci.nsIMarkupDocumentViewer); contentViewer.fullZoom = 2; - // We wait at least 500ms to make sure the highlighter is not "mutting" the - // resize event + // simulate the zoomed dimensions of the div element + let h1Dims = h1.getBoundingClientRect(); + // There seems to be some very minor differences in the floats, so let's + // floor the values + let h1Width = Math.floor(h1Dims.width * contentViewer.fullZoom); + let h1Height = Math.floor(h1Dims.height * contentViewer.fullZoom); - window.setTimeout(function() { - // simulate the zoomed dimensions of the div element - let h1Dims = h1.getBoundingClientRect(); - // There seems to be some very minor differences in the floats, so let's - // floor the values - let h1Width = Math.floor(h1Dims.width * contentViewer.fullZoom); - let h1Height = Math.floor(h1Dims.height * contentViewer.fullZoom); + let outlineDims = getSimpleBorderRect(); + let outlineWidth = Math.floor(outlineDims.width); + let outlineHeight = Math.floor(outlineDims.height); - let outlineDims = getHighlighterOutlineRect(); - let outlineWidth = Math.floor(outlineDims.width); - let outlineHeight = Math.floor(outlineDims.height); + is(outlineWidth, h1Width, "outline width matches dimensions of element (zoomed)"); - // Disabled due to bug 716245 - is(outlineWidth, h1Width, "outline width matches dimensions of element (zoomed)"); - is(outlineHeight, h1Height, "outline height matches dimensions of element (zoomed)"); + is(outlineHeight, h1Height, "outline height matches dimensions of element (zoomed)"); - executeSoon(finishUp); - }, 500); + executeSoon(finishUp); } function finishUp() { @@ -127,5 +121,5 @@ function test() { waitForFocus(createDocument, content); }, true); - content.location = "data:text/html,basic tests for inspector"; + content.location = "data:text/html;charset=utf-8,browser_inspector_highlighter.js"; } diff --git a/browser/devtools/inspector/test/browser_inspector_iframeTest.js b/browser/devtools/inspector/test/browser_inspector_iframeTest.js index 2cc3be2df017..9b199a9fb07e 100644 --- a/browser/devtools/inspector/test/browser_inspector_iframeTest.js +++ b/browser/devtools/inspector/test/browser_inspector_iframeTest.js @@ -31,10 +31,13 @@ function createDocument() { div2 = iframe2.contentDocument.createElement('div'); div2.textContent = 'nested div'; iframe2.contentDocument.body.appendChild(div2); + // Open the inspector, start the picker mode, and start the tests openInspector(aInspector => { inspector = aInspector; - inspector.toolbox.highlighterUtils.startPicker().then(runTests); + inspector.once("inspector-updated", () => { + inspector.toolbox.highlighterUtils.startPicker().then(runTests); + }); }); }, false); @@ -47,9 +50,7 @@ function createDocument() { } function moveMouseOver(aElement, cb) { - inspector.toolbox.once("picker-node-hovered", () => { - executeSoon(cb); - }); + inspector.toolbox.once("picker-node-hovered", cb); EventUtils.synthesizeMouseAtCenter(aElement, {type: "mousemove"}, aElement.ownerDocument.defaultView); } @@ -60,15 +61,14 @@ function runTests() { function testDiv1Highlighter() { moveMouseOver(div1, () => { - getHighlighterOutline().setAttribute("disable-transitions", "true"); - is(getHighlitNode(), div1, "highlighter matches selection"); + is(getHighlitNode(), div1, "highlighter matches selection of div1"); testDiv2Highlighter(); }); } function testDiv2Highlighter() { moveMouseOver(div2, () => { - is(getHighlitNode(), div2, "highlighter matches selection"); + is(getHighlitNode(), div2, "highlighter matches selection of div2"); selectRoot(); }); } diff --git a/browser/devtools/inspector/test/browser_inspector_initialization.js b/browser/devtools/inspector/test/browser_inspector_initialization.js index 6b0c59fceaa2..2bccf0750b02 100644 --- a/browser/devtools/inspector/test/browser_inspector_initialization.js +++ b/browser/devtools/inspector/test/browser_inspector_initialization.js @@ -137,5 +137,5 @@ function test() waitForFocus(createDocument, content); }, true); - content.location = "data:text/html,basic tests for inspector"; + content.location = "data:text/html;charset=utf-8,browser_inspector_initialization.js"; } diff --git a/browser/devtools/inspector/test/browser_inspector_invalidate.js b/browser/devtools/inspector/test/browser_inspector_invalidate.js index 13e4c4622edd..fff5232bb40b 100644 --- a/browser/devtools/inspector/test/browser_inspector_invalidate.js +++ b/browser/devtools/inspector/test/browser_inspector_invalidate.js @@ -13,24 +13,24 @@ function test() { openInspector(aInspector => { inspector = aInspector; - inspector.toolbox.highlighter.showBoxModel(getNodeFront(div)).then(runTest); + inspector.once("inspector-updated", () => { + inspector.toolbox.highlighter.showBoxModel(getNodeFront(div)).then(runTest); + }); }); } function runTest() { - let outline = getHighlighterOutline(); - is(outline.style.width, "100px", "outline has the right width"); + let rect = getSimpleBorderRect(); + is(rect.width, 100, "outline has the right width"); div.style.width = "200px"; - function pollTest() { - if (outline.style.width == "100px") { - setTimeout(pollTest, 10); - return; - } - is(outline.style.width, "200px", "outline updated"); - finishUp(); - } - setTimeout(pollTest, 10); + inspector.toolbox.once("highlighter-ready", testRectWidth); + } + + function testRectWidth() { + let rect = getSimpleBorderRect(); + is(rect.width, 200, "outline updated"); + finishUp(); } function finishUp() { @@ -49,5 +49,5 @@ function test() { waitForFocus(createDocument, content); }, true); - content.location = "data:text/html,basic tests for inspector"; + content.location = "data:text/html;charset=utf-8,browser_inspector_invalidate.js"; } diff --git a/browser/devtools/inspector/test/browser_inspector_scrolling.js b/browser/devtools/inspector/test/browser_inspector_scrolling.js index 6d81576f06a3..9a54afd4ce38 100644 --- a/browser/devtools/inspector/test/browser_inspector_scrolling.js +++ b/browser/devtools/inspector/test/browser_inspector_scrolling.js @@ -33,34 +33,34 @@ function inspectNode(aInspector) { inspector = aInspector; - inspector.once("inspector-updated", performScrollingTest); - executeSoon(function() { - inspector.selection.setNode(div, ""); - }); + let highlighter = inspector.toolbox.highlighter; + highlighter.showBoxModel(getNodeFront(div)).then(performScrollingTest); } function performScrollingTest() { - executeSoon(function() { - // FIXME: this will fail on retina displays. EventUtils will only scroll - // 25px down instead of 50. - EventUtils.synthesizeWheel(div, 10, 10, - { deltaY: 50.0, deltaMode: WheelEvent.DOM_DELTA_PIXEL }, - iframe.contentWindow); - }); - gBrowser.selectedBrowser.addEventListener("scroll", function() { gBrowser.selectedBrowser.removeEventListener("scroll", arguments.callee, false); + let isRetina = devicePixelRatio === 2; + is(iframe.contentDocument.body.scrollTop, + isRetina ? 25 : 50, "inspected iframe scrolled"); - is(iframe.contentDocument.body.scrollTop, 50, "inspected iframe scrolled"); - - inspector = div = iframe = doc = null; - let target = TargetFactory.forTab(gBrowser.selectedTab); - gDevTools.closeToolbox(target); - gBrowser.removeCurrentTab(); - finish(); + finishUp(); }, false); + + EventUtils.synthesizeWheel(div, 10, 10, + { deltaY: 50.0, deltaMode: WheelEvent.DOM_DELTA_PIXEL }, + iframe.contentWindow); +} + +function finishUp() +{ + inspector = div = iframe = doc = null; + let target = TargetFactory.forTab(gBrowser.selectedTab); + gDevTools.closeToolbox(target); + gBrowser.removeCurrentTab(); + finish(); } function test() diff --git a/browser/devtools/inspector/test/browser_inspector_sidebarstate.js b/browser/devtools/inspector/test/browser_inspector_sidebarstate.js index 09acfad3b150..73cba40629e4 100644 --- a/browser/devtools/inspector/test/browser_inspector_sidebarstate.js +++ b/browser/devtools/inspector/test/browser_inspector_sidebarstate.js @@ -25,18 +25,19 @@ function inspectorRuleViewOpened() gDevTools.once("toolbox-destroyed", inspectorClosed); let target = TargetFactory.forTab(gBrowser.selectedTab); - gDevTools.getToolbox(target).destroy(); + gDevTools.closeToolbox(target); } function inspectorClosed() { openInspector(function(panel) { inspector = panel; + if (inspector.sidebar.getCurrentTabID()) { - // Default sidebar already selected. + info("Default sidebar already selected.") testNewDefaultTab(); } else { - // Default sidebar still to be selected. + info("Default sidebar still to be selected, adding select listener."); inspector.sidebar.once("select", testNewDefaultTab); } }); @@ -67,5 +68,5 @@ function test() waitForFocus(createDocument, content); }, true); - content.location = "data:text/html,basic tests for inspector"; + content.location = "data:text/html;charset=utf-8,browser_inspector_sidebarstate.js"; } diff --git a/browser/devtools/inspector/test/browser_inspector_tree_height.js b/browser/devtools/inspector/test/browser_inspector_tree_height.js index f234b62baf2a..503c4a18bb22 100644 --- a/browser/devtools/inspector/test/browser_inspector_tree_height.js +++ b/browser/devtools/inspector/test/browser_inspector_tree_height.js @@ -106,6 +106,6 @@ function test() waitForFocus(createDocument, content); }, true); - content.location = "data:text/html,basic tests for inspector"; + content.location = "data:text/html;charset=utf-8,browser_inspector_tree_height.js"; } diff --git a/browser/devtools/inspector/test/head.js b/browser/devtools/inspector/test/head.js index c39d68d48d66..3076bd94fdd7 100644 --- a/browser/devtools/inspector/test/head.js +++ b/browser/devtools/inspector/test/head.js @@ -27,12 +27,18 @@ let console = tempScope.console; let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/")); Services.scriptloader.loadSubScript(testDir + "../../../commandline/test/helpers.js", this); +gDevTools.testing = true; SimpleTest.registerCleanupFunction(() => { - console.error("Here we are\n") + gDevTools.testing = false; +}); + +SimpleTest.registerCleanupFunction(() => { + console.error("Here we are\n"); let {DebuggerServer} = Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {}); console.error("DebuggerServer open connections: " + Object.getOwnPropertyNames(DebuggerServer._connections).length); Services.prefs.clearUserPref("devtools.dump.emit"); + Services.prefs.clearUserPref("devtools.inspector.activeSidebar"); }); function openInspector(callback) @@ -60,63 +66,118 @@ function getHighlighter() return gBrowser.selectedBrowser.parentNode.querySelector(".highlighter-container"); } -function getHighlighterOutline() -{ - let h = getHighlighter(); - if (h) { - return h.querySelector(".highlighter-outline"); - } +function getSimpleBorderRect() { + let {p1, p2, p3, p4} = getBoxModelStatus().border.points; + + return { + top: p1.y, + left: p1.x, + width: p2.x - p1.x, + height: p4.y - p1.y + }; } -function getHighlighterOutlineRect() { - let helper = new LayoutHelpers(window.content); - let outline = getHighlighterOutline(); +function getBoxModelRoot() { + let highlighter = getHighlighter(); + return highlighter.querySelector(".box-model-root"); +} - if (outline) { - let browserOffsetRect = helper.getDirtyRect(gBrowser.selectedBrowser); - let outlineRect = helper.getDirtyRect(outline); - outlineRect.top -= browserOffsetRect.top; - outlineRect.left -= browserOffsetRect.left; +function getBoxModelStatus() { + let root = getBoxModelRoot(); + let inspector = getActiveInspector(); - return outlineRect; - } + return { + visible: !root.hasAttribute("hidden"), + currentNode: inspector.walker.currentNode, + margin: { + points: getPointsForRegion("margin"), + visible: isRegionHidden("margin") + }, + border: { + points: getPointsForRegion("border"), + visible: isRegionHidden("border") + }, + padding: { + points: getPointsForRegion("padding"), + visible: isRegionHidden("padding") + }, + content: { + points: getPointsForRegion("content"), + visible: isRegionHidden("content") + }, + guides: { + top: getGuideStatus("top"), + right: getGuideStatus("right"), + bottom: getGuideStatus("bottom"), + left: getGuideStatus("left") + } + }; +} + +function getGuideStatus(location) { + let root = getBoxModelRoot(); + let guide = root.querySelector(".box-model-guide-" + location); + + return { + visible: !guide.hasAttribute("hidden"), + x1: guide.getAttribute("x1"), + y1: guide.getAttribute("y1"), + x2: guide.getAttribute("x2"), + y2: guide.getAttribute("y2") + }; +} + +function getPointsForRegion(region) { + let root = getBoxModelRoot(); + let box = root.querySelector(".box-model-" + region); + let points = box.getAttribute("points").split(/[, ]/); + + // We multiply each value by 1 to cast it into a number + return { + p1: { + x: parseFloat(points[0]), + y: parseFloat(points[1]) + }, + p2: { + x: parseFloat(points[2]), + y: parseFloat(points[3]) + }, + p3: { + x: parseFloat(points[4]), + y: parseFloat(points[5]) + }, + p4: { + x: parseFloat(points[6]), + y: parseFloat(points[7]) + } + }; +} + +function isRegionHidden(region) { + let root = getBoxModelRoot(); + let box = root.querySelector(".box-model-" + region); + + return !box.hasAttribute("hidden"); } function isHighlighting() { - let outline = getHighlighterOutline(); - return outline && !outline.hasAttribute("hidden"); + let root = getBoxModelRoot(); + return !root.hasAttribute("hidden"); } function getHighlitNode() { if (isHighlighting()) { let helper = new LayoutHelpers(window.content); - let outlineRect = getHighlighterOutlineRect(); + let points = getBoxModelStatus().content.points; + let x = (points.p1.x + points.p2.x + points.p3.x + points.p4.x) / 4; + let y = (points.p1.y + points.p2.y + points.p3.y + points.p4.y) / 4; - let a = { - x: outlineRect.left, - y: outlineRect.top - }; - - let b = { - x: a.x + outlineRect.width, - y: a.y + outlineRect.height - }; - - let {x, y} = getMidPoint(a, b); return helper.getElementFromPoint(window.content.document, x, y); } } -function getMidPoint(aPointA, aPointB) -{ - let pointC = {}; - pointC.x = (aPointB.x - aPointA.x) / 2 + aPointA.x; - pointC.y = (aPointB.y - aPointA.y) / 2 + aPointA.y; - return pointC; -} - function computedView() { let sidebar = getActiveInspector().sidebar; diff --git a/browser/devtools/layoutview/test/browser_layoutview.js b/browser/devtools/layoutview/test/browser_layoutview.js index b6bc37270498..9c2d8511afe4 100644 --- a/browser/devtools/layoutview/test/browser_layoutview.js +++ b/browser/devtools/layoutview/test/browser_layoutview.js @@ -7,6 +7,11 @@ let TargetFactory = devtools.TargetFactory; function test() { waitForExplicitFinish(); + gDevTools.testing = true; + SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; + }); + Services.prefs.setBoolPref("devtools.inspector.sidebarOpen", true); let doc; diff --git a/browser/devtools/layoutview/view.css b/browser/devtools/layoutview/view.css index a7f77fd50752..232102d84a75 100644 --- a/browser/devtools/layoutview/view.css +++ b/browser/devtools/layoutview/view.css @@ -54,23 +54,23 @@ body { } } - -#margins { - padding: 28px; -} - -#content { - height: 20px; +#content, +#borders { border-width: 1px; } +#content { + height: 25px; +} + +#margins, #padding { + border-style: solid; border-width: 25px; } #borders { - border-width: 2px; - box-shadow: 0 0 16px black; + padding: 25px; } #main > p { @@ -89,55 +89,44 @@ body { cursor: default; } -.border.top { - left: 0; top: 23px; - width: 98px; -} - -.border.bottom { - right: 0; bottom: 22px; - width: 98px; - top: auto; -} - -.border.left { - top: 42px; left: 0; - width: 56px; -} - -.border.right{ - bottom: 42px; right: 0; - width: 56px; - top: auto; -} - -.top, .bottom { +.top, +.bottom { width: calc(100% - 2px); text-align: center; } +.padding.top { + top: 55px; +} + +.padding.bottom { + bottom: 57px; +} + +.border.top { + top: 30px; +} + +.border.bottom { + bottom: 31px; +} + .margin.top { - top: 8px; + top: 5px; } .margin.bottom { bottom: 6px; } -.padding.top { - top: 35px; -} - -.padding.bottom { - bottom: 35px; -} - .size, .margin.left, .margin.right, +.border.left, +.border.right, .padding.left, .padding.right { - top: 0; + top: 22px; line-height: 132px; } @@ -146,15 +135,30 @@ body { } .margin.right, -.margin.left { - width: 28px; -} - +.margin.left, +.border.left, +.border.right, .padding.right, .padding.left { width: 25px; } +.padding.left { + left: 52px; +} + +.padding.right { + right: 51px; +} + +.border.left { + left: 26px; +} + +.border.right { + right: 26px; +} + .margin.right { right: 0; } @@ -163,14 +167,6 @@ body { left: 0; } -.padding.left { - left: 30px; -} - -.padding.right { - right: 30px; -} - .tooltip { position: absolute; bottom: 0; diff --git a/browser/devtools/layoutview/view.js b/browser/devtools/layoutview/view.js index edf0235bb736..1f9b341baef7 100644 --- a/browser/devtools/layoutview/view.js +++ b/browser/devtools/layoutview/view.js @@ -239,12 +239,41 @@ LayoutView.prototype = { this._lastRequest = lastRequest; return this._lastRequest; - } -} + }, + + showBoxModel: function(options={}) { + let toolbox = this.inspector.toolbox; + let nodeFront = this.inspector.selection.nodeFront; + + toolbox.highlighterUtils.highlightNodeFront(nodeFront, options); + }, + + hideBoxModel: function() { + let toolbox = this.inspector.toolbox; + + toolbox.highlighterUtils.unhighlight(); + }, +}; let elts; let tooltip; +let onmouseover = function(e) { + let region = e.target.getAttribute("data-box"); + + tooltip.textContent = e.target.getAttribute("tooltip"); + this.layoutview.showBoxModel({region: region}); + + return false; +}.bind(window); + +let onmouseout = function(e) { + tooltip.textContent = ""; + this.layoutview.hideBoxModel(); + + return false; +}.bind(window); + window.setPanel = function(panel) { this.layoutview = new LayoutView(panel, window); @@ -276,11 +305,3 @@ window.onunload = function() { } } }; - -function onmouseover(e) { - tooltip.textContent = e.target.getAttribute("tooltip"); -} - -function onmouseout(e) { - tooltip.textContent = ""; -} \ No newline at end of file diff --git a/browser/devtools/layoutview/view.xhtml b/browser/devtools/layoutview/view.xhtml index 56837a48dcd5..7c8605281076 100644 --- a/browser/devtools/layoutview/view.xhtml +++ b/browser/devtools/layoutview/view.xhtml @@ -30,31 +30,31 @@
-
-
-
-
+
+
+
+
-

-

-

-

+

+

+

+

-

-

-

-

+

+

+

+

-

-

-

-

+

+

+

+

-

+

diff --git a/browser/devtools/markupview/markup-view.js b/browser/devtools/markupview/markup-view.js index f990eb1edc3c..a93912df9b39 100644 --- a/browser/devtools/markupview/markup-view.js +++ b/browser/devtools/markupview/markup-view.js @@ -165,7 +165,7 @@ MarkupView.prototype = { }, _onMouseLeave: function() { - this._hideBoxModel(); + this._hideBoxModel(true); if (this._hoveredNode) { this._containers.get(this._hoveredNode).hovered = false; } @@ -176,8 +176,8 @@ MarkupView.prototype = { this._inspector.toolbox.highlighterUtils.highlightNodeFront(nodeFront, options); }, - _hideBoxModel: function() { - this._inspector.toolbox.highlighterUtils.unhighlight(); + _hideBoxModel: function(forceHide) { + this._inspector.toolbox.highlighterUtils.unhighlight(forceHide); }, _briefBoxModelTimer: null, @@ -1545,8 +1545,6 @@ MarkupContainer.prototype = { // Remove event listeners this.elt.removeEventListener("dblclick", this._onToggle, false); - this.elt.removeEventListener("mouseover", this._onMouseOver, false); - this.elt.removeEventListener("mouseout", this._onMouseOut, false); this.elt.removeEventListener("mousedown", this._onMouseDown, false); this.expander.removeEventListener("click", this._onToggle, false); diff --git a/browser/devtools/markupview/test/browser_inspector_markup_968316_highlight_node_after_mouseleave_mousemove.js b/browser/devtools/markupview/test/browser_inspector_markup_968316_highlight_node_after_mouseleave_mousemove.js index 19879c0b57ea..92b20bb013bc 100644 --- a/browser/devtools/markupview/test/browser_inspector_markup_968316_highlight_node_after_mouseleave_mousemove.js +++ b/browser/devtools/markupview/test/browser_inspector_markup_968316_highlight_node_after_mouseleave_mousemove.js @@ -15,7 +15,7 @@ function test() { waitForFocus(startTests, content); }, true); - content.location = "data:text/html,

Select me!

"; + content.location = "data:text/html;charset=utf-8,

Select me!

"; } function startTests(aInspector, aToolbox) { diff --git a/browser/devtools/markupview/test/browser_inspector_markup_968316_highlit_node_on_hover_then_select.js b/browser/devtools/markupview/test/browser_inspector_markup_968316_highlit_node_on_hover_then_select.js index 0256cc57b0fc..ccea1714d3ab 100644 --- a/browser/devtools/markupview/test/browser_inspector_markup_968316_highlit_node_on_hover_then_select.js +++ b/browser/devtools/markupview/test/browser_inspector_markup_968316_highlit_node_on_hover_then_select.js @@ -15,7 +15,7 @@ function test() { waitForFocus(startTests, content); }, true); - content.location = "data:text/html,

It's going to be legen....

"; + content.location = "data:text/html;charset=utf-8,

It's going to be legen....

"; } function startTests(aInspector, aToolbox) { diff --git a/browser/devtools/markupview/test/browser_inspector_markup_navigation.js b/browser/devtools/markupview/test/browser_inspector_markup_navigation.js index d8d3632a9c1d..ab90ea9546c5 100644 --- a/browser/devtools/markupview/test/browser_inspector_markup_navigation.js +++ b/browser/devtools/markupview/test/browser_inspector_markup_navigation.js @@ -125,7 +125,7 @@ function test() { break; } - inspector.markup._waitForChildren().then(() => executeSoon(function BIMNT_newNode() { + inspector.markup._waitForChildren().then(() => executeSoon(() => { let node = inspector.selection.node; if (className == "*comment*") { diff --git a/browser/devtools/markupview/test/head.js b/browser/devtools/markupview/test/head.js index c8d7e30ddb6b..8142e3591b8c 100644 --- a/browser/devtools/markupview/test/head.js +++ b/browser/devtools/markupview/test/head.js @@ -12,6 +12,11 @@ let {getInplaceEditorForSpan: inplaceEditor} = devtools.require("devtools/shared //Services.prefs.setBoolPref("devtools.dump.emit", true); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + // Clear preferences that may be set during the course of tests. function clearUserPrefs() { Services.prefs.clearUserPref("devtools.inspector.htmlPanelOpen"); @@ -120,7 +125,7 @@ function hoverContainer(nodeOrSelector, inspector) { info("Hovering over the markup-container for node " + nodeOrSelector); let highlit = inspector.toolbox.once("node-highlight"); let container = getContainerForRawNode(inspector.markup, getNode(nodeOrSelector)); - EventUtils.synthesizeMouse(container.tagLine, 2, 2, {type: "mousemove"}, + EventUtils.synthesizeMouseAtCenter(container.tagLine, {type: "mousemove"}, inspector.markup.doc.defaultView); return highlit; } @@ -148,8 +153,9 @@ function clickContainer(nodeOrSelector, inspector) { * @return {Boolean} */ function isHighlighterVisible() { - let outline = gBrowser.selectedBrowser.parentNode.querySelector(".highlighter-container .highlighter-outline"); - return outline && !outline.hasAttribute("hidden"); + let highlighter = gBrowser.selectedBrowser.parentNode + .querySelector(".highlighter-container .box-model-root"); + return highlighter && !highlighter.hasAttribute("hidden"); } /** @@ -164,7 +170,7 @@ function mouseLeaveMarkupView(inspector) { // Find another element to mouseover over in order to leave the markup-view let btn = inspector.toolbox.doc.querySelector(".toolbox-dock-button"); - EventUtils.synthesizeMouse(btn, 2, 2, {type: "mousemove"}, + EventUtils.synthesizeMouseAtCenter(btn, {type: "mousemove"}, inspector.toolbox.doc.defaultView); executeSoon(def.resolve); diff --git a/browser/devtools/netmonitor/test/head.js b/browser/devtools/netmonitor/test/head.js index 0a5779665b52..496cd7051ebd 100644 --- a/browser/devtools/netmonitor/test/head.js +++ b/browser/devtools/netmonitor/test/head.js @@ -43,6 +43,11 @@ const SORTING_SJS = EXAMPLE_URL + "sjs_sorting-test-server.sjs"; const TEST_IMAGE = EXAMPLE_URL + "test-image.png"; const TEST_IMAGE_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="; +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + // All tests are asynchronous. waitForExplicitFinish(); @@ -55,6 +60,7 @@ const gDefaultFilters = Services.prefs.getCharPref("devtools.netmonitor.filters" registerCleanupFunction(() => { info("finish() was called, cleaning up..."); + Services.prefs.setBoolPref("devtools.debugger.log", gEnableLogging); Services.prefs.setCharPref("devtools.netmonitor.filters", gDefaultFilters); }); diff --git a/browser/devtools/profiler/test/head.js b/browser/devtools/profiler/test/head.js index 0a3e021e6c24..c27b9f687567 100644 --- a/browser/devtools/profiler/test/head.js +++ b/browser/devtools/profiler/test/head.js @@ -23,6 +23,11 @@ let DebuggerServer = temp.DebuggerServer; let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/")); Services.scriptloader.loadSubScript(testDir + "../../../commandline/test/helpers.js", this); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + registerCleanupFunction(function () { helpers = null; Services.prefs.clearUserPref(PROFILER_ENABLED); diff --git a/browser/devtools/responsivedesign/test/head.js b/browser/devtools/responsivedesign/test/head.js index 9a1367c3bf82..a362137d275e 100644 --- a/browser/devtools/responsivedesign/test/head.js +++ b/browser/devtools/responsivedesign/test/head.js @@ -10,6 +10,11 @@ let TargetFactory = devtools.TargetFactory; let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/")); Services.scriptloader.loadSubScript(testDir + "../../../commandline/test/helpers.js", this); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + function openInspector(callback) { let target = TargetFactory.forTab(gBrowser.selectedTab); diff --git a/browser/devtools/scratchpad/test/browser_scratchpad_revert_to_saved.js b/browser/devtools/scratchpad/test/browser_scratchpad_revert_to_saved.js index e948e46e2825..956c98b977b9 100644 --- a/browser/devtools/scratchpad/test/browser_scratchpad_revert_to_saved.js +++ b/browser/devtools/scratchpad/test/browser_scratchpad_revert_to_saved.js @@ -90,8 +90,7 @@ function testAfterSecondRevert() { ok(menu.hasAttribute("disabled"), "Revert menu entry is disabled after reverting to changed saved state."); gFile.remove(false); - gFile = null; - gScratchpad = null; + gFile = gScratchpad = menu = null; finish(); } diff --git a/browser/devtools/scratchpad/test/head.js b/browser/devtools/scratchpad/test/head.js index de820bfd9fad..56a3954cfcac 100644 --- a/browser/devtools/scratchpad/test/head.js +++ b/browser/devtools/scratchpad/test/head.js @@ -10,6 +10,11 @@ const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {}); let gScratchpadWindow; // Reference to the Scratchpad chrome window object +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + /** * Open a Scratchpad window. * diff --git a/browser/devtools/shared/test/head.js b/browser/devtools/shared/test/head.js index a2c0fb554561..8fb37e9ca411 100644 --- a/browser/devtools/shared/test/head.js +++ b/browser/devtools/shared/test/head.js @@ -6,6 +6,11 @@ let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); let TargetFactory = devtools.TargetFactory; let {console} = Cu.import("resource://gre/modules/devtools/Console.jsm", {}); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + /** * Open a new tab at a URL and call a callback on load */ diff --git a/browser/devtools/sourceeditor/editor.js b/browser/devtools/sourceeditor/editor.js index 2704432e6dc9..f0827928bfc6 100644 --- a/browser/devtools/sourceeditor/editor.js +++ b/browser/devtools/sourceeditor/editor.js @@ -32,8 +32,7 @@ const CM_STYLES = [ "chrome://browser/skin/devtools/common.css", "chrome://browser/content/devtools/codemirror/codemirror.css", "chrome://browser/content/devtools/codemirror/dialog.css", - "chrome://browser/content/devtools/codemirror/mozilla.css", - "chrome://browser/content/devtools/codemirror/foldgutter.css" + "chrome://browser/content/devtools/codemirror/mozilla.css" ]; const CM_SCRIPTS = [ diff --git a/browser/devtools/sourceeditor/test/head.js b/browser/devtools/sourceeditor/test/head.js index e51bc87ec966..66c57a6ac29c 100644 --- a/browser/devtools/sourceeditor/test/head.js +++ b/browser/devtools/sourceeditor/test/head.js @@ -8,6 +8,11 @@ const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}) const { require } = devtools; const Editor = require("devtools/sourceeditor/editor"); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + function setup(cb) { const opt = "chrome,titlebar,toolbar,centerscreen,resizable,dialog=no"; const url = "data:text/xml;charset=UTF-8," + diff --git a/browser/devtools/styleeditor/test/head.js b/browser/devtools/styleeditor/test/head.js index 087286f05d0b..5585a35890b8 100644 --- a/browser/devtools/styleeditor/test/head.js +++ b/browser/devtools/styleeditor/test/head.js @@ -23,6 +23,11 @@ let cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"] let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/")); Services.scriptloader.loadSubScript(testDir + "../../../commandline/test/helpers.js", this); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + function cleanup() { gPanelWindow = null; diff --git a/browser/devtools/styleinspector/style-inspector.js b/browser/devtools/styleinspector/style-inspector.js index 0f43fc89635e..22b975e30474 100644 --- a/browser/devtools/styleinspector/style-inspector.js +++ b/browser/devtools/styleinspector/style-inspector.js @@ -135,7 +135,7 @@ RuleViewTool.prototype = { delete this.doc; delete this.inspector; } -} +}; function ComputedViewTool(aInspector, aWindow, aIFrame) { diff --git a/browser/devtools/styleinspector/test/browser_ruleview_inherit.js b/browser/devtools/styleinspector/test/browser_ruleview_inherit.js index e0ce0307d9e6..bea78aace1a6 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_inherit.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_inherit.js @@ -112,5 +112,5 @@ function test() waitForFocus(() => openRuleView(simpleInherit), content); }, true); - content.location = "data:text/html,basic style inspector tests"; + content.location = "data:text/html;charset=utf-8,browser_inspector_changes.js"; } diff --git a/browser/devtools/styleinspector/test/browser_ruleview_manipulation.js b/browser/devtools/styleinspector/test/browser_ruleview_manipulation.js index a9e4f7cb2235..f2c5f5bd2e35 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_manipulation.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_manipulation.js @@ -83,5 +83,5 @@ function test() waitForFocus(() => openRuleView(simpleOverride), content); }, true); - content.location = "data:text/html,basic style inspector tests"; + content.location = "data:text/html;charset=utf-8,browser_ruleview_manipulation.js"; } diff --git a/browser/devtools/styleinspector/test/browser_ruleview_override.js b/browser/devtools/styleinspector/test/browser_ruleview_override.js index 6cb695d09a91..89607e1969c3 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_override.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_override.js @@ -178,5 +178,5 @@ function test() waitForFocus(() => openRuleView(simpleOverride), content); }, true); - content.location = "data:text/html,basic style inspector tests"; + content.location = "data:text/html;charset=utf-8,browser_ruleview_override.js"; } diff --git a/browser/devtools/styleinspector/test/browser_ruleview_ui.js b/browser/devtools/styleinspector/test/browser_ruleview_ui.js index c4764fd20e1f..c13f2dcc74ea 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_ui.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_ui.js @@ -248,5 +248,5 @@ function test() waitForFocus(() => openRuleView(startTest), content); }, true); - content.location = "data:text/html,basic style inspector tests"; + content.location = "data:text/html;charset=utf-8,browser_ruleview_ui.js"; } diff --git a/browser/devtools/styleinspector/test/browser_ruleview_update.js b/browser/devtools/styleinspector/test/browser_ruleview_update.js index 540005bcaf0c..59d5fc460e38 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_update.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_update.js @@ -189,5 +189,5 @@ function test() waitForFocus(() => openRuleView(startTest), content); }, true); - content.location = "data:text/html,basic style inspector tests"; + content.location = "data:text/html;charset=utf-8,browser_ruleview_update.js"; } diff --git a/browser/devtools/styleinspector/test/head.js b/browser/devtools/styleinspector/test/head.js index 9cdfb09bfd03..99781f042604 100644 --- a/browser/devtools/styleinspector/test/head.js +++ b/browser/devtools/styleinspector/test/head.js @@ -9,11 +9,6 @@ const TEST_BASE_HTTPS = "https://example.com/browser/browser/devtools/styleinspe //Services.prefs.setBoolPref("devtools.dump.emit", true); Services.prefs.setBoolPref("devtools.debugger.log", true); -SimpleTest.registerCleanupFunction(() => { - Services.prefs.clearUserPref("devtools.debugger.log"); - Services.prefs.clearUserPref("devtools.dump.emit"); -}); - let tempScope = {}; Cu.import("resource:///modules/devtools/gDevTools.jsm", tempScope); @@ -30,6 +25,16 @@ let {CssLogic, CssSelector} = devtools.require("devtools/styleinspector/css-logi let promise = devtools.require("sdk/core/promise"); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + +SimpleTest.registerCleanupFunction(() => { + Services.prefs.clearUserPref("devtools.debugger.log"); + Services.prefs.clearUserPref("devtools.dump.emit"); +}); + let { editableField, getInplaceEditorForSpan: inplaceEditor diff --git a/browser/devtools/tilt/test/head.js b/browser/devtools/tilt/test/head.js index a82ef5e43a61..90f6b6d59be6 100644 --- a/browser/devtools/tilt/test/head.js +++ b/browser/devtools/tilt/test/head.js @@ -56,6 +56,10 @@ const NODE_REMOVED = Tilt.NOTIFICATIONS.NODE_REMOVED; const TILT_ENABLED = Services.prefs.getBoolPref("devtools.tilt.enabled"); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); function isTiltEnabled() { info("Apparently, Tilt is" + (TILT_ENABLED ? "" : " not") + " enabled."); diff --git a/browser/devtools/webconsole/test/browser_console_variables_view_highlighter.js b/browser/devtools/webconsole/test/browser_console_variables_view_highlighter.js index 70413f81f970..263ddd9b81e3 100644 --- a/browser/devtools/webconsole/test/browser_console_variables_view_highlighter.js +++ b/browser/devtools/webconsole/test/browser_console_variables_view_highlighter.js @@ -66,7 +66,7 @@ function onNodeListVviewFetched(aEvent, aVar) // variable's highlightDomNode and see if it has the desired effect prop.highlightDomNode(); } else { - finishTest(); + finishUp(); } } @@ -89,3 +89,9 @@ function onNodeListVviewFetched(aEvent, aVar) hoverOverDomNodeVariableAndAssertHighlighter(0); } + +function finishUp() { + gWebConsole = gJSTerm = gVariablesView = gToolbox = null; + + finishTest(); +} diff --git a/browser/devtools/webconsole/test/browser_webconsole_autocomplete_in_debugger_stackframe.js b/browser/devtools/webconsole/test/browser_webconsole_autocomplete_in_debugger_stackframe.js index 3fb39a0d6e36..194170aa9ce7 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_autocomplete_in_debugger_stackframe.js +++ b/browser/devtools/webconsole/test/browser_webconsole_autocomplete_in_debugger_stackframe.js @@ -214,7 +214,7 @@ function testCompletion(hud) { is(newItems.length, 0, "no items for foo2Obj[0]"); testDriver = null; - executeSoon(finishTest); + executeSoon(finishUp); yield undefined; } @@ -237,3 +237,8 @@ function onFramesAdded() info("onFramesAdded, openConsole() now"); executeSoon(() => openConsole(null, testNext)); } + +function finishUp() { + testDriver = gStackframes = null; + finishTest(); +} diff --git a/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js b/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js index 09ee0c354813..dadc0f39c6e3 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js +++ b/browser/devtools/webconsole/test/browser_webconsole_bug_585991_autocomplete_keys.js @@ -332,5 +332,10 @@ function popupHideAfterCompletionInText() is(inputNode.selectionStart, inputNode.selectionEnd, "cursor location (confirmed)"); ok(!completeNode.value, "completeNode is empty"); + finishUp(); +} + +function finishUp() { + HUD = popup = jsterm = inputNode = completeNode = null; finishTest(); } diff --git a/browser/devtools/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js b/browser/devtools/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js index e84791c6864b..1fe63f9f8088 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js +++ b/browser/devtools/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js @@ -84,5 +84,10 @@ function onVariablesViewReady(aEvent, aView) { findVariableViewProperties(aView, [ { name: "body", value: "" }, - ], { webconsole: gHUD }).then(finishTest); + ], { webconsole: gHUD }).then(finishUp); +} + +function finishUp() { + gHUD = null; + finishTest(); } diff --git a/browser/devtools/webconsole/test/browser_webconsole_output_01.js b/browser/devtools/webconsole/test/browser_webconsole_output_01.js index a7531a4b02ea..7946bd72028e 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_output_01.js +++ b/browser/devtools/webconsole/test/browser_webconsole_output_01.js @@ -89,5 +89,10 @@ function test() { let {tab} = yield loadTab(TEST_URI); let hud = yield openConsole(tab); return checkOutputForInputs(hud, inputTests); - }).then(finishTest); + }).then(finishUp); +} + +function finishUp() { + inputTests = null; + finishTest(); } diff --git a/browser/devtools/webconsole/test/browser_webconsole_output_03.js b/browser/devtools/webconsole/test/browser_webconsole_output_03.js index fe606d13a7d0..3a8565603e67 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_output_03.js +++ b/browser/devtools/webconsole/test/browser_webconsole_output_03.js @@ -153,12 +153,17 @@ let inputTests = [ ]; function test() { - addTab(TEST_URI); browser.addEventListener("load", function onLoad() { browser.removeEventListener("load", onLoad, true); openConsole().then((hud) => { return checkOutputForInputs(hud, inputTests); - }).then(finishTest); + }).then(finishUp); }, true); } + +function finishUp() { + inputTests = null; + + finishTest(); +} diff --git a/browser/devtools/webconsole/test/browser_webconsole_output_05.js b/browser/devtools/webconsole/test/browser_webconsole_output_05.js index 5c168cec2575..d6eb744f02d8 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_output_05.js +++ b/browser/devtools/webconsole/test/browser_webconsole_output_05.js @@ -80,5 +80,10 @@ function test() { let {tab} = yield loadTab(TEST_URI); let hud = yield openConsole(tab); return checkOutputForInputs(hud, inputTests); - }).then(finishTest); + }).then(finishUp); +} + +function finishUp() { + inputTests = null; + finishTest(); } diff --git a/browser/devtools/webconsole/test/browser_webconsole_view_source.js b/browser/devtools/webconsole/test/browser_webconsole_view_source.js index 645599a2c092..a646e5bcae6b 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_view_source.js +++ b/browser/devtools/webconsole/test/browser_webconsole_view_source.js @@ -28,7 +28,7 @@ function testViewSource(hud) { EventUtils.sendMouseEvent({ type: "click" }, button, content); openDebugger().then(({panelWin: { DebuggerView }}) => { - info("debugger openeed"); + info("debugger opened"); Sources = DebuggerView.Sources; openConsole(null, (hud) => { info("console opened again"); @@ -71,14 +71,11 @@ let observer = { ok(true, "the view source window was opened in response to clicking " + "the location node"); - // executeSoon() is necessary to avoid crashing Firefox. See bug 611543. - executeSoon(function() { - aSubject.close(); - ok(containsValueInvoked, "custom containsValue() was invoked"); - Sources.containsValue = containsValue; - Sources = containsValue = null; - finishTest(); - }); + aSubject.close(); + ok(containsValueInvoked, "custom containsValue() was invoked"); + Sources.containsValue = containsValue; + Sources = containsValue = null; + finishTest(); } }; diff --git a/browser/devtools/webconsole/test/head.js b/browser/devtools/webconsole/test/head.js index d94ad1f2ce92..be8c481a08f9 100644 --- a/browser/devtools/webconsole/test/head.js +++ b/browser/devtools/webconsole/test/head.js @@ -40,6 +40,11 @@ const GROUP_INDENT_DEFAULT = 6; const WEBCONSOLE_STRINGS_URI = "chrome://browser/locale/devtools/webconsole.properties"; let WCU_l10n = new WebConsoleUtils.l10n(WEBCONSOLE_STRINGS_URI); +gDevTools.testing = true; +SimpleTest.registerCleanupFunction(() => { + gDevTools.testing = false; +}); + function log(aMsg) { dump("*** WebConsoleTest: " + aMsg + "\n"); @@ -298,7 +303,7 @@ function dumpMessageElement(aMessage) function finishTest() { - browser = hudId = hud = filterBox = outputNode = cs = null; + browser = hudId = hud = filterBox = outputNode = cs = hudBox = null; dumpConsoles(); diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index 91b941a9b475..35b81e4a8a65 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -98,9 +98,8 @@ These should match what Safari and other Apple applications use on OS X Lion. -- - - - + + diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css index 92a6193d52c8..6f65e410c175 100644 --- a/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css @@ -8,6 +8,7 @@ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/1999/xhtml"); +@namespace svg url("http://www.w3.org/2000/svg"); %include ../shared/browser.inc %include linuxShared.inc @@ -1956,6 +1957,7 @@ toolbarbutton.chevron > .toolbarbutton-icon { /* Sync Panel */ .sync-panel-icon { + height:32px; width: 32px; background: url("chrome://browser/content/abouthome/sync.png") top left no-repeat; } @@ -1971,7 +1973,9 @@ toolbarbutton.chevron > .toolbarbutton-icon { #sync-error-panel-title, #sync-start-panel-title { + font-size: 120%; font-weight: bold; + margin-bottom: 5px; } #sync-start-panel-subtitle, diff --git a/browser/themes/linux/devtools/layoutview.css b/browser/themes/linux/devtools/layoutview.css index dcb78e40121f..64ff0d2d0f54 100644 --- a/browser/themes/linux/devtools/layoutview.css +++ b/browser/themes/linux/devtools/layoutview.css @@ -11,36 +11,40 @@ } .theme-body { - color: hsl(210,100%,85%) !important; + color: hsl(210,53%,45%) !important; box-sizing: border-box; } #main { + background-color: white; border-color: hsla(210,100%,85%,0.7); border-style: dotted; } -#main > .border { - color: hsl(210,53%,45%); -} - -.border > span { - background-color: hsl(210,100%,85%); - border-radius: 2px; - padding: 0 4px; -} - #content { - border-color: hsla(210,100%,85%,0.7); - border-style: dotted + background-color: #80d4ff; + border-color: hsl(210,100%,85%); + border-style: dotted; +} + +#padding, +#margins { + border-color: hsla(210,100%,85%,0.2); + outline: dotted 1px hsl(210,100%,85%); } #padding { - border-color: hsla(210,100%,85%,0.2); - border-style: solid; + background-color: #66cc52; } #borders { - border-style: solid; + background-color: #ffe431; + border-style: dotted; border-color: hsl(210,100%,85%); + box-shadow: 0 0 8px #000; +} + +#margins { + background-color: #d89b28; + opacity: 0.6; } diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css index 03cc302bd705..b027ae23386b 100644 --- a/browser/themes/osx/browser.css +++ b/browser/themes/osx/browser.css @@ -14,6 +14,7 @@ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/1999/xhtml"); +@namespace svg url("http://www.w3.org/2000/svg"); #urlbar:-moz-lwtheme:not([focused="true"]), .searchbar-textbox:-moz-lwtheme:not([focused="true"]) { @@ -3786,6 +3787,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { /* Sync Panels */ .sync-panel-icon { + height:32px; width: 32px; background: url("chrome://browser/content/abouthome/sync.png") top left no-repeat; } @@ -3823,7 +3825,9 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { #sync-error-panel-title, #sync-start-panel-title { + font-size: 120%; font-weight: bold; + margin-bottom: 5px; } #sync-start-panel-subtitle, diff --git a/browser/themes/osx/devtools/layoutview.css b/browser/themes/osx/devtools/layoutview.css index dcb78e40121f..64ff0d2d0f54 100644 --- a/browser/themes/osx/devtools/layoutview.css +++ b/browser/themes/osx/devtools/layoutview.css @@ -11,36 +11,40 @@ } .theme-body { - color: hsl(210,100%,85%) !important; + color: hsl(210,53%,45%) !important; box-sizing: border-box; } #main { + background-color: white; border-color: hsla(210,100%,85%,0.7); border-style: dotted; } -#main > .border { - color: hsl(210,53%,45%); -} - -.border > span { - background-color: hsl(210,100%,85%); - border-radius: 2px; - padding: 0 4px; -} - #content { - border-color: hsla(210,100%,85%,0.7); - border-style: dotted + background-color: #80d4ff; + border-color: hsl(210,100%,85%); + border-style: dotted; +} + +#padding, +#margins { + border-color: hsla(210,100%,85%,0.2); + outline: dotted 1px hsl(210,100%,85%); } #padding { - border-color: hsla(210,100%,85%,0.2); - border-style: solid; + background-color: #66cc52; } #borders { - border-style: solid; + background-color: #ffe431; + border-style: dotted; border-color: hsl(210,100%,85%); + box-shadow: 0 0 8px #000; +} + +#margins { + background-color: #d89b28; + opacity: 0.6; } diff --git a/browser/themes/shared/customizableui/customizeMode.inc.css b/browser/themes/shared/customizableui/customizeMode.inc.css index 0aea6b5aa3a2..f449c9518707 100644 --- a/browser/themes/shared/customizableui/customizeMode.inc.css +++ b/browser/themes/shared/customizableui/customizeMode.inc.css @@ -253,6 +253,7 @@ toolbarpaletteitem[place="toolbar"] { #wrapper-personal-bookmarks:not([place="toolbar"]) > #personal-bookmarks { -moz-box-pack: center; + min-height: 48px; } #customization-palette > toolbarpaletteitem > label { diff --git a/browser/themes/shared/customizableui/panelUIOverlay.inc.css b/browser/themes/shared/customizableui/panelUIOverlay.inc.css index 48e36fb9eb95..d9b6a0f048d2 100644 --- a/browser/themes/shared/customizableui/panelUIOverlay.inc.css +++ b/browser/themes/shared/customizableui/panelUIOverlay.inc.css @@ -134,7 +134,8 @@ .panelUI-grid .toolbarbutton-1 > .toolbarbutton-text, .panelUI-grid .toolbarbutton-1 > .toolbarbutton-multiline-text { text-align: center; - margin: 2px 0 0; + /* Need to override toolkit theming which sets margin: 0 !important; */ + margin: 2px 0 0 !important; } .panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-multiline-text { diff --git a/browser/themes/shared/devtools/highlighter.inc.css b/browser/themes/shared/devtools/highlighter.inc.css index af8770d27a9f..25dfddd82ebc 100644 --- a/browser/themes/shared/devtools/highlighter.inc.css +++ b/browser/themes/shared/devtools/highlighter.inc.css @@ -4,12 +4,40 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ %endif -/* Highlighter */ +/* Box model highlighter */ +svg|g.box-model-container { + opacity: 0.4; +} -.highlighter-outline { - box-shadow: 0 0 0 1px black; - outline: 1px dashed white; - outline-offset: -1px; +svg|polygon.box-model-content { + fill: #80d4ff; +} + +svg|polygon.box-model-padding { + fill: #66cc52; +} + +svg|polygon.box-model-border { + fill: #ffe431; +} + +svg|polygon.box-model-margin { + fill: #d89b28; +} + +svg|polygon.box-model-content, +svg|polygon.box-model-padding, +svg|polygon.box-model-border, +svg|polygon.box-model-margin { + stroke: none; +} + +svg|line.box-model-guide-top, +svg|line.box-model-guide-right, +svg|line.box-model-guide-bottom, +svg|line.box-model-guide-left { + stroke: #08C; + stroke-dasharray: 5 3; } /* Highlighter - Node Infobar */ diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css index 293d58852bff..3065991ebd16 100644 --- a/browser/themes/windows/browser.css +++ b/browser/themes/windows/browser.css @@ -6,6 +6,7 @@ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/1999/xhtml"); +@namespace svg url("http://www.w3.org/2000/svg"); %include ../shared/browser.inc %include windowsShared.inc @@ -2386,6 +2387,7 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { /* Sync Panel */ .sync-panel-icon { + height:32px; width: 32px; background: url("chrome://browser/content/abouthome/sync.png") top left no-repeat; } @@ -2401,7 +2403,9 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { #sync-error-panel-title, #sync-start-panel-title { + font-size: 120%; font-weight: bold; + margin-bottom: 5px; } #sync-start-panel-subtitle, diff --git a/browser/themes/windows/devtools/layoutview.css b/browser/themes/windows/devtools/layoutview.css index dcb78e40121f..64ff0d2d0f54 100644 --- a/browser/themes/windows/devtools/layoutview.css +++ b/browser/themes/windows/devtools/layoutview.css @@ -11,36 +11,40 @@ } .theme-body { - color: hsl(210,100%,85%) !important; + color: hsl(210,53%,45%) !important; box-sizing: border-box; } #main { + background-color: white; border-color: hsla(210,100%,85%,0.7); border-style: dotted; } -#main > .border { - color: hsl(210,53%,45%); -} - -.border > span { - background-color: hsl(210,100%,85%); - border-radius: 2px; - padding: 0 4px; -} - #content { - border-color: hsla(210,100%,85%,0.7); - border-style: dotted + background-color: #80d4ff; + border-color: hsl(210,100%,85%); + border-style: dotted; +} + +#padding, +#margins { + border-color: hsla(210,100%,85%,0.2); + outline: dotted 1px hsl(210,100%,85%); } #padding { - border-color: hsla(210,100%,85%,0.2); - border-style: solid; + background-color: #66cc52; } #borders { - border-style: solid; + background-color: #ffe431; + border-style: dotted; border-color: hsl(210,100%,85%); + box-shadow: 0 0 8px #000; +} + +#margins { + background-color: #d89b28; + opacity: 0.6; } diff --git a/caps/tests/mochitest/mochitest.ini b/caps/tests/mochitest/mochitest.ini index 962348088b73..187150a05c45 100644 --- a/caps/tests/mochitest/mochitest.ini +++ b/caps/tests/mochitest/mochitest.ini @@ -3,6 +3,7 @@ support-files = file_disableScript.html [test_app_principal_equality.html] +skip-if = e10s [test_bug246699.html] [test_bug292789.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage diff --git a/content/base/test/csp/mochitest.ini b/content/base/test/csp/mochitest.ini index 08650553ee81..67cda615536f 100644 --- a/content/base/test/csp/mochitest.ini +++ b/content/base/test/csp/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = file_CSP.css file_CSP.sjs diff --git a/content/base/test/mochitest.ini b/content/base/test/mochitest.ini index b2743a15d782..6b2e835a27ec 100644 --- a/content/base/test/mochitest.ini +++ b/content/base/test/mochitest.ini @@ -220,7 +220,7 @@ skip-if = toolkit == 'android' [test_CrossSiteXHR_cache.html] skip-if = toolkit == 'android' [test_CrossSiteXHR_origin.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(https not working, bug 907770) b2g-debug(https not working, bug 907770) b2g-desktop(https not working, bug 907770) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(https not working, bug 907770) b2g-debug(https not working, bug 907770) b2g-desktop(https not working, bug 907770) [test_DOMException.html] [test_EventSource_redirects.html] [test_NodeIterator_basics_filters.xhtml] @@ -230,7 +230,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(https not working, bug [test_XHR.html] [test_XHRDocURI.html] [test_XHRSendData.html] -skip-if = buildapp == 'b2g' # b2g(seems to stall) b2g-debug(seems to stall) b2g-desktop(seems to stall) +skip-if = buildapp == 'b2g' || e10s # b2g(seems to stall) b2g-debug(seems to stall) b2g-desktop(seems to stall) [test_XHR_anon.html] [test_XHR_header.html] [test_XHR_onuploadprogress.html] @@ -244,7 +244,7 @@ skip-if = buildapp == 'b2g' # b2g(flaky on B2G, bug 960743) b2g-debug(flaky on B [test_base.xhtml] [test_blobconstructor.html] [test_bug166235.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(clipboard undefined) b2g-debug(clipboard undefined) b2g-desktop(clipboard undefined) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(clipboard undefined) b2g-debug(clipboard undefined) b2g-desktop(clipboard undefined) [test_bug199959.html] [test_bug218236.html] [test_bug218277.html] @@ -254,6 +254,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(clipboard undefined) b [test_bug276037-1.html] [test_bug276037-2.xhtml] [test_bug282547.html] +skip-if = e10s [test_bug28293.html] [test_bug28293.xhtml] [test_bug298064.html] @@ -324,6 +325,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(https not working, bug [test_bug402150.html^headers^] [test_bug403841.html] [test_bug403852.html] +skip-if = e10s [test_bug403868.xml] [test_bug405182.html] [test_bug409380.html] @@ -347,7 +349,7 @@ skip-if = buildapp == 'b2g' # b2g(bug 901343, specialpowers.wrap issue [nsIChann [test_bug422403-2.xhtml] skip-if = buildapp == 'b2g' [test_bug422537.html] -skip-if = buildapp == 'b2g' # b2g(xmlhttprequest causes crash, bug 902271) b2g-debug(xmlhttprequest causes crash, bug 902271) b2g-desktop(xmlhttprequest causes crash, bug 902271) +skip-if = buildapp == 'b2g' || e10s # b2g(xmlhttprequest causes crash, bug 902271) b2g-debug(xmlhttprequest causes crash, bug 902271) b2g-desktop(xmlhttprequest causes crash, bug 902271) [test_bug424212.html] [test_bug424359-1.html] skip-if = buildapp == 'b2g' @@ -362,7 +364,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_bug429157.html] [test_bug431082.html] [test_bug431701.html] -skip-if = buildapp == 'b2g' # b2g(xmlhttprequest causes crash, bug 902271) b2g-debug(xmlhttprequest causes crash, bug 902271) b2g-desktop(xmlhttprequest causes crash, bug 902271) +skip-if = buildapp == 'b2g' || e10s # b2g(xmlhttprequest causes crash, bug 902271) b2g-debug(xmlhttprequest causes crash, bug 902271) b2g-desktop(xmlhttprequest causes crash, bug 902271) [test_bug431833.html] [test_bug433533.html] [test_bug433662.html] @@ -398,7 +400,7 @@ skip-if = buildapp == 'b2g' [test_bug475156.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 855762 # b2g(36 total - bug 902611) b2g-debug(36 total - bug 902611) b2g-desktop(36 total - bug 902611) [test_bug482935.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 855762 +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 855762 [test_bug484396.html] [test_bug493881.html] [test_bug493881.js] @@ -442,7 +444,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_bug564863.xhtml] [test_bug567350.html] [test_bug578096.html] -skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(debug-only failure; crash) b2g-desktop(Bug 931116, b2g desktop specific, initial triage) +skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || e10s # b2g-debug(debug-only failure; crash) b2g-desktop(Bug 931116, b2g desktop specific, initial triage) [test_bug585978.html] skip-if = (toolkit == 'gonk' && debug) #debug-only timeout [test_bug587931.html] @@ -525,7 +527,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' #needs plugin support # b2g(needs plugin support) b2g-debug(debug-only failure) b2g-desktop(needs plugin support) +skip-if = 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_bug868999.html] [test_bug869000.html] @@ -544,9 +546,9 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #needs plugin support # b2g( [test_classList.html] # This test fails on the Mac for some reason [test_copyimage.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit != 'gtk2' && toolkit != 'gtk3' && toolkit != 'windows' #b2g-desktop(Bug 931116, b2g desktop specific, initial triage) +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit != 'gtk2' && toolkit != 'gtk3' && toolkit != 'windows' || e10s #b2g-desktop(Bug 931116, b2g desktop specific, initial triage) [test_copypaste.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 904183 # b2g(clipboard undefined) b2g-debug(clipboard undefined) b2g-desktop(clipboard undefined) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 904183 # b2g(clipboard undefined) b2g-debug(clipboard undefined) b2g-desktop(clipboard undefined) [test_copypaste.xhtml] skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 904183 # b2g(bug 904183) b2g-debug(bug 904183) b2g-desktop(bug 904183) [test_createHTMLDocument.html] @@ -555,8 +557,9 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 904183 # b2g(bug 904183 [test_domparsing.html] [test_elementTraversal.html] [test_fileapi.html] +skip-if = e10s [test_fileapi_slice.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 775227 +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 775227 [test_getElementById.html] [test_html_colors_quirks.html] [test_html_colors_standards.html] @@ -572,27 +575,27 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 775227 [test_meta_viewport5.html] [test_meta_viewport6.html] [test_mixed_content_blocker.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT, SSL_REQUIRED +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED [test_mixed_content_blocker_bug803225.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT, SSL_REQUIRED +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED [test_mixed_content_blocker_frameNavigation.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT, SSL_REQUIRED +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED [test_mozfiledataurl.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT [test_mutationobservers.html] -skip-if = buildapp == 'b2g' # b2g(bug 901385, showmodaldialog) b2g-debug(bug 901385, showmodaldialog) b2g-desktop(bug 901385, showmodaldialog) +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' # b2g(needs plugin support) b2g-debug(needs plugin support) b2g-desktop(needs plugin support) +skip-if = 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' #CLICK_TO_PLAY +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #CLICK_TO_PLAY [test_processing_instruction_update_stylesheet.xhtml] [test_range_bounds.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_reentrant_flush.html] -skip-if = toolkit == 'android' #RANDOM +skip-if = toolkit == 'android' || e10s #RANDOM [test_sync_xhr_timer.xhtml] -skip-if = toolkit == 'android' #RANDOM +skip-if = toolkit == 'android' || e10s #RANDOM [test_text_wholeText.html] [test_textnode_normalize_in_selection.html] [test_textnode_split_in_selection.html] @@ -603,13 +606,13 @@ skip-if = toolkit == 'android' #RANDOM [test_w3element_traversal.xhtml] [test_w3element_traversal_svg.html] [test_websocket.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s [test_websocket_basic.html] skip-if = buildapp == 'b2g' || toolkit == 'android' [test_websocket_hello.html] skip-if = buildapp == 'b2g' || toolkit == 'android' [test_x-frame-options.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(observerservice issue) b2g-debug(observerservice issue) b2g-desktop(observerservice issue) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(observerservice issue) b2g-debug(observerservice issue) b2g-desktop(observerservice issue) [test_xbl_userdata.xhtml] [test_xhr_abort_after_load.html] skip-if = toolkit == 'android' diff --git a/content/base/test/websocket_hybi/mochitest.ini b/content/base/test/websocket_hybi/mochitest.ini index b3ce53452dcc..8e6a75704bed 100644 --- a/content/base/test/websocket_hybi/mochitest.ini +++ b/content/base/test/websocket_hybi/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = file_binary-frames_wsh.py file_check-binary-messages_wsh.py diff --git a/content/canvas/test/webgl/mochitest.ini b/content/canvas/test/webgl/mochitest.ini index 88012bb97e5e..42d49fab2b87 100644 --- a/content/canvas/test/webgl/mochitest.ini +++ b/content/canvas/test/webgl/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = 00_test_list.txt failing_tests_android.txt diff --git a/content/html/content/src/HTMLMediaElement.cpp b/content/html/content/src/HTMLMediaElement.cpp index 05117b7377e2..73adc54e0876 100644 --- a/content/html/content/src/HTMLMediaElement.cpp +++ b/content/html/content/src/HTMLMediaElement.cpp @@ -78,6 +78,8 @@ #include "mozilla/dom/power/PowerManagerService.h" #include "mozilla/dom/WakeLock.h" +#include "mozilla/dom/TextTrack.h" + #include "ImageContainer.h" #include "nsRange.h" #include @@ -3947,9 +3949,11 @@ HTMLMediaElement::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel, const nsAString& aLanguage) { - return mTextTrackManager ? mTextTrackManager->AddTextTrack(aKind, aLabel, - aLanguage) - : nullptr; + if (mTextTrackManager) { + return mTextTrackManager->AddTextTrack(aKind, aLabel, aLanguage, + TextTrackSource::AddTextTrack); + } + return nullptr; } void diff --git a/content/html/content/src/HTMLTrackElement.cpp b/content/html/content/src/HTMLTrackElement.cpp index 394cf8a8b65c..e98af97bd2be 100644 --- a/content/html/content/src/HTMLTrackElement.cpp +++ b/content/html/content/src/HTMLTrackElement.cpp @@ -153,7 +153,9 @@ HTMLTrackElement::CreateTextTrack() kind = TextTrackKind::Subtitles; } - mTrack = new TextTrack(OwnerDoc()->GetParentObject(), kind, label, srcLang); + mTrack = new TextTrack(OwnerDoc()->GetParentObject(), kind, label, srcLang, + TextTrackSource::Track); + mTrack->SetTrackElement(this); if (mMediaParent) { mMediaParent->AddTextTrack(mTrack); diff --git a/content/html/content/src/TextTrackManager.cpp b/content/html/content/src/TextTrackManager.cpp index 2cedc111a733..ce571d9da5ce 100644 --- a/content/html/content/src/TextTrackManager.cpp +++ b/content/html/content/src/TextTrackManager.cpp @@ -20,6 +20,59 @@ namespace mozilla { namespace dom { +CompareTextTracks::CompareTextTracks(HTMLMediaElement* aMediaElement) +{ + mMediaElement = aMediaElement; +} + +int32_t +CompareTextTracks::TrackChildPosition(TextTrack* aTextTrack) const { + HTMLTrackElement* trackElement = aTextTrack->GetTrackElement(); + if (!trackElement) { + return -1; + } + return mMediaElement->IndexOf(trackElement); +} + +bool +CompareTextTracks::Equals(TextTrack* aOne, TextTrack* aTwo) const { + // Two tracks can never be equal. If they have corresponding TrackElements + // they would need to occupy the same tree position (impossible) and in the + // case of tracks coming from AddTextTrack source we put the newest at the + // last position, so they won't be equal as well. + return false; +} + +bool +CompareTextTracks::LessThan(TextTrack* aOne, TextTrack* aTwo) const +{ + TextTrackSource sourceOne = aOne->GetTextTrackSource(); + TextTrackSource sourceTwo = aTwo->GetTextTrackSource(); + if (sourceOne != sourceTwo) { + return sourceOne == Track || + (sourceOne == AddTextTrack && sourceTwo == MediaResourceSpecific); + } + switch (sourceOne) { + case Track: { + int32_t positionOne = TrackChildPosition(aOne); + int32_t positionTwo = TrackChildPosition(aTwo); + // If either position one or positiontwo are -1 then something has gone + // wrong. In this case we should just put them at the back of the list. + return positionOne != -1 && positionTwo != -1 && + positionOne < positionTwo; + } + case AddTextTrack: + // For AddTextTrack sources the tracks will already be in the correct relative + // order in the source array. Assume we're called in iteration order and can + // therefore always report aOne < aTwo to maintain the original temporal ordering. + return true; + case MediaResourceSpecific: + // No rules for Media Resource Specific tracks yet. + break; + } + return true; +} + NS_IMPL_CYCLE_COLLECTION_3(TextTrackManager, mTextTracks, mPendingTextTracks, mNewCues) NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(TextTrackManager, AddRef) @@ -58,10 +111,15 @@ TextTrackManager::TextTracks() const already_AddRefed TextTrackManager::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel, - const nsAString& aLanguage) + const nsAString& aLanguage, + TextTrackSource aTextTrackSource) { + if (!mMediaElement) { + return nullptr; + } nsRefPtr ttrack = - mTextTracks->AddTextTrack(aKind, aLabel, aLanguage); + mTextTracks->AddTextTrack(aKind, aLabel, aLanguage, aTextTrackSource, + CompareTextTracks(mMediaElement)); ttrack->SetReadyState(HTMLTrackElement::READY_STATE_LOADED); AddCues(ttrack); return ttrack.forget(); @@ -70,7 +128,10 @@ TextTrackManager::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel, void TextTrackManager::AddTextTrack(TextTrack* aTextTrack) { - mTextTracks->AddTextTrack(aTextTrack); + if (!mMediaElement) { + return; + } + mTextTracks->AddTextTrack(aTextTrack, CompareTextTracks(mMediaElement)); AddCues(aTextTrack); } @@ -157,7 +218,8 @@ TextTrackManager::PopulatePendingList() TextTrack* ttrack = mTextTracks->IndexedGetter(index, dummy); if (ttrack && ttrack->Mode() != TextTrackMode::Disabled && ttrack->ReadyState() == HTMLTrackElement::READY_STATE_LOADING) { - mPendingTextTracks->AddTextTrack(ttrack); + mPendingTextTracks->AddTextTrack(ttrack, + CompareTextTracks(mMediaElement)); } } } diff --git a/content/html/content/src/TextTrackManager.h b/content/html/content/src/TextTrackManager.h index f0ffa55cf2fb..7d0f3a8bb5b6 100644 --- a/content/html/content/src/TextTrackManager.h +++ b/content/html/content/src/TextTrackManager.h @@ -19,6 +19,17 @@ namespace mozilla { namespace dom { class HTMLMediaElement; + +class CompareTextTracks { +private: + HTMLMediaElement* mMediaElement; +public: + CompareTextTracks(HTMLMediaElement* aMediaElement); + int32_t TrackChildPosition(TextTrack* aTrack) const; + bool Equals(TextTrack* aOne, TextTrack* aTwo) const; + bool LessThan(TextTrack* aOne, TextTrack* aTwo) const; +}; + class TextTrack; class TextTrackCue; @@ -34,7 +45,8 @@ public: TextTrackList* TextTracks() const; already_AddRefed AddTextTrack(TextTrackKind aKind, const nsAString& aLabel, - const nsAString& aLanguage); + const nsAString& aLanguage, + TextTrackSource aTextTrackSource); void AddTextTrack(TextTrack* aTextTrack); void RemoveTextTrack(TextTrack* aTextTrack, bool aPendingListOnly); void DidSeek(); diff --git a/content/html/content/test/forms/mochitest.ini b/content/html/content/test/forms/mochitest.ini index b2851db2464a..8af9557b5d92 100644 --- a/content/html/content/test/forms/mochitest.ini +++ b/content/html/content/test/forms/mochitest.ini @@ -54,10 +54,12 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_input_url.html] [test_label_control_attribute.html] [test_max_attribute.html] +skip-if = e10s [test_maxlength_attribute.html] [test_meter_element.html] [test_meter_pseudo-classes.html] [test_min_attribute.html] +skip-if = e10s [test_mozistextfield.html] [test_novalidate_attribute.html] [test_option_disabled.html] @@ -67,16 +69,18 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_pattern_attribute.html] [test_progress_element.html] [test_required_attribute.html] +skip-if = e10s [test_restore_form_elements.html] [test_save_restore_radio_groups.html] [test_select_selectedOptions.html] [test_set_range_text.html] [test_step_attribute.html] +skip-if = e10s [test_stepup_stepdown.html] [test_submit_invalid_file.html] [test_textarea_attributes_reflection.html] [test_validation.html] -skip-if = buildapp == 'b2g' # b2g(374 total, bug 901848, no keygen support) b2g-debug(374 total, bug 901848, no keygen support) b2g-desktop(374 total, bug 901848, no keygen support) +skip-if = buildapp == 'b2g' || e10s # b2g(374 total, bug 901848, no keygen support) b2g-debug(374 total, bug 901848, no keygen support) b2g-desktop(374 total, bug 901848, no keygen support) [test_valueAsDate_pref.html] [test_valueasdate_attribute.html] [test_valueasnumber_attribute.html] diff --git a/content/html/content/test/mochitest.ini b/content/html/content/test/mochitest.ini index 9e5b8fa93c78..8e61a9d99d88 100644 --- a/content/html/content/test/mochitest.ini +++ b/content/html/content/test/mochitest.ini @@ -246,7 +246,7 @@ skip-if = toolkit == 'android' [test_bug518122.html] [test_bug519987.html] [test_bug523771.html] -skip-if = buildapp == 'b2g' # b2g(onload of iframe not firing, because submit not working?) b2g-debug(onload of iframe not firing, because submit not working?) b2g-desktop(onload of iframe not firing, because submit not working?) +skip-if = buildapp == 'b2g' || e10s # b2g(onload of iframe not firing, because submit not working?) b2g-debug(onload of iframe not firing, because submit not working?) b2g-desktop(onload of iframe not firing, because submit not working?) [test_bug529819.html] [test_bug529859.html] [test_bug535043.html] @@ -270,7 +270,7 @@ skip-if = toolkit == 'android' #TIMED_OUT [test_bug560112.html] [test_bug561634.html] [test_bug561636.html] -skip-if = buildapp == 'b2g' # b2g(observerservice not working) b2g-debug(observerservice not working) b2g-desktop(observerservice not working) +skip-if = buildapp == 'b2g' || e10s # b2g(observerservice not working) b2g-debug(observerservice not working) b2g-desktop(observerservice not working) [test_bug561640.html] [test_bug564001.html] [test_bug566046.html] @@ -291,16 +291,19 @@ skip-if = buildapp == 'b2g' # b2g(observerservice not working) b2g-debug(observe [test_bug589.html] [test_bug590353-1.html] [test_bug590353-2.html] +skip-if = e10s [test_bug590363.html] [test_bug592802.html] [test_bug593689.html] [test_bug595429.html] +skip-if = e10s [test_bug595447.html] [test_bug595449.html] -skip-if = (toolkit == 'gonk' && debug) #debug-only failure +skip-if = (toolkit == 'gonk' && debug) || e10s #debug-only failure [test_bug596350.html] [test_bug596511.html] [test_bug598643.html] +skip-if = e10s [test_bug598833-1.html] [test_bug600155.html] [test_bug601030.html] @@ -316,7 +319,7 @@ skip-if = (toolkit == 'gonk' && debug) #debug-only failure [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) [test_bug613113.html] -skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer) +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] @@ -324,22 +327,29 @@ skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer 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) [test_bug617528.html] [test_bug618948.html] -skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer) +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_bug619278.html] -skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer) +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_bug622558.html] +skip-if = e10s [test_bug622597.html] -skip-if = buildapp == 'b2g' # b2g(bug 587671, need an invalidformsubmit observer) b2g-debug(bug 587671, need an invalidformsubmit observer) b2g-desktop(bug 587671, need an invalidformsubmit observer) +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_bug623291.html] +skip-if = e10s [test_bug6296.html] +skip-if = e10s [test_bug629801.html] +skip-if = e10s [test_bug633058.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_bug636336.html] +skip-if = e10s [test_bug641219.html] +skip-if = e10s [test_bug643051.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_bug646157.html] +skip-if = e10s [test_bug649134.html] # This extra subdirectory is needed due to the nature of this test. # With the bug, the test loads the base URL of the bug649134/file_*.sjs @@ -390,7 +400,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_bug839913.html] [test_bug840877.html] [test_bug841466.html] -skip-if = (toolkit == 'gonk' && debug) #debug-only failure +skip-if = (toolkit == 'gonk' && debug) || e10s #debug-only failure [test_bug845057.html] [test_bug869040.html] [test_bug870787.html] @@ -407,33 +417,35 @@ skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_embed_attributes_reflection.html] [test_formData.html] [test_formSubmission.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) b2g-debug(NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) b2g-desktop(NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) b2g-debug(NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) b2g-desktop(NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [test_formSubmission2.html] skip-if = toolkit == 'android' [test_formelements.html] [test_fullscreen-api.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #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 == '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] [test_iframe_sandbox_general.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_iframe_sandbox_inheritance.html] -skip-if = buildapp == 'b2g' # b2g(Crash, bug 904659) b2g-debug(Crash, bug 904659) b2g-desktop(Crash, bug 904659) +skip-if = buildapp == 'b2g' || e10s # b2g(Crash, bug 904659) b2g-debug(Crash, bug 904659) b2g-desktop(Crash, bug 904659) [test_iframe_sandbox_modal.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #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 == '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' # b2g(Crash, bug 904659) b2g-debug(Crash, bug 904659) b2g-desktop(Crash, bug 904659) +skip-if = buildapp == 'b2g' || e10s # b2g(Crash, bug 904659) b2g-debug(Crash, bug 904659) b2g-desktop(Crash, bug 904659) [test_iframe_sandbox_navigation2.html] -skip-if = buildapp == 'b2g' # b2g(Crash, bug 904659) b2g-debug(Crash, bug 904659) b2g-desktop(Crash, bug 904659) +skip-if = buildapp == 'b2g' || e10s # b2g(Crash, bug 904659) b2g-debug(Crash, bug 904659) b2g-desktop(Crash, bug 904659) [test_iframe_sandbox_plugins.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) +skip-if = 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) +skip-if = buildapp == 'b2g' || e10s # 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] -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) +skip-if = buildapp == 'b2g' || e10s # 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_same_origin.html] +skip-if = e10s [test_iframe_sandbox_workers.html] +skip-if = e10s [test_img_attributes_reflection.html] [test_imageSrcSet.html] [test_li_attributes_reflection.html] @@ -447,7 +459,7 @@ skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Perma- [test_nested_invalid_fieldsets.html] [test_object_attributes_reflection.html] [test_object_plugin_nav.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) +skip-if = 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 414b3d9eabb4..c6a262a0c8d1 100644 --- a/content/html/document/test/mochitest.ini +++ b/content/html/document/test/mochitest.ini @@ -25,9 +25,9 @@ support-files = [test_bug1823.html] [test_bug57600.html] [test_bug196523.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_bug199692.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #bug 811644 #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' || e10s #bug 811644 #Bug 931116, b2g desktop specific, initial triage [test_bug172261.html] [test_bug255820.html] [test_bug259332.html] @@ -38,10 +38,10 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #bug [test_bug340017.xhtml] [test_bug359657.html] [test_bug369370.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s [test_bug380383.html] [test_bug391777.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_bug402680.html] [test_bug403868.html] [test_bug403868.xhtml] @@ -71,10 +71,10 @@ skip-if = toolkit == 'android' [test_bug677495.html] [test_bug677495-1.html] [test_bug741266.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(needs control of popup window size) b2g-debug(needs control of popup window size) b2g-desktop(needs control of popup window size) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(needs control of popup window size) b2g-debug(needs control of popup window size) b2g-desktop(needs control of popup window size) [test_non-ascii-cookie.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s [test_bug765780.html] [test_bug871161.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage support-files = file_bug871161-1.html file_bug871161-2.html diff --git a/content/media/TextTrack.cpp b/content/media/TextTrack.cpp index a5cc694fac3e..15232897bb22 100644 --- a/content/media/TextTrack.cpp +++ b/content/media/TextTrack.cpp @@ -16,20 +16,22 @@ namespace mozilla { namespace dom { -NS_IMPL_CYCLE_COLLECTION_INHERITED_4(TextTrack, +NS_IMPL_CYCLE_COLLECTION_INHERITED_5(TextTrack, nsDOMEventTargetHelper, mParent, mCueList, mActiveCueList, - mTextTrackList) + mTextTrackList, + mTrackElement) NS_IMPL_ADDREF_INHERITED(TextTrack, nsDOMEventTargetHelper) NS_IMPL_RELEASE_INHERITED(TextTrack, nsDOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrack) NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) -TextTrack::TextTrack(nsISupports* aParent) +TextTrack::TextTrack(nsISupports* aParent, TextTrackSource aTextTrackSource) : mParent(aParent) + , mTextTrackSource(aTextTrackSource) { SetDefaultSettings(); SetIsDOMBinding(); @@ -38,8 +40,10 @@ TextTrack::TextTrack(nsISupports* aParent) TextTrack::TextTrack(nsISupports* aParent, TextTrackKind aKind, const nsAString& aLabel, - const nsAString& aLanguage) + const nsAString& aLanguage, + TextTrackSource aTextTrackSource) : mParent(aParent) + , mTextTrackSource(aTextTrackSource) { SetDefaultSettings(); mKind = aKind; @@ -52,9 +56,11 @@ TextTrack::TextTrack(nsISupports* aParent, TextTrackList* aTextTrackList, TextTrackKind aKind, const nsAString& aLabel, - const nsAString& aLanguage) + const nsAString& aLanguage, + TextTrackSource aTextTrackSource) : mParent(aParent) , mTextTrackList(aTextTrackList) + , mTextTrackSource(aTextTrackSource) { SetDefaultSettings(); mKind = aKind; @@ -211,5 +217,15 @@ TextTrack::SetTextTrackList(TextTrackList* aTextTrackList) mTextTrackList = aTextTrackList; } +HTMLTrackElement* +TextTrack::GetTrackElement() { + return mTrackElement; +} + +void +TextTrack::SetTrackElement(HTMLTrackElement* aTrackElement) { + mTrackElement = aTrackElement; +} + } // namespace dom } // namespace mozilla diff --git a/content/media/TextTrack.h b/content/media/TextTrack.h index 6d9a163e06c1..9d7096d106ab 100644 --- a/content/media/TextTrack.h +++ b/content/media/TextTrack.h @@ -20,6 +20,13 @@ class TextTrackList; class TextTrackCue; class TextTrackCueList; class TextTrackRegion; +class HTMLTrackElement; + +enum TextTrackSource { + Track, + AddTextTrack, + MediaResourceSpecific +}; class TextTrack MOZ_FINAL : public nsDOMEventTargetHelper { @@ -27,16 +34,19 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrack, nsDOMEventTargetHelper) - TextTrack(nsISupports* aParent); + TextTrack(nsISupports* aParent, + TextTrackSource aTextTrackSource); TextTrack(nsISupports* aParent, TextTrackKind aKind, const nsAString& aLabel, - const nsAString& aLanguage); + const nsAString& aLanguage, + TextTrackSource aTextTrackSource); TextTrack(nsISupports* aParent, TextTrackList* aTextTrackList, TextTrackKind aKind, const nsAString& aLabel, - const nsAString& aLanguage); + const nsAString& aLanguage, + TextTrackSource aTextTrackSource); void SetDefaultSettings(); @@ -99,6 +109,13 @@ public: IMPL_EVENT_HANDLER(cuechange) + HTMLTrackElement* GetTrackElement(); + void SetTrackElement(HTMLTrackElement* aTrackElement); + + TextTrackSource GetTextTrackSource() { + return mTextTrackSource; + } + private: void UpdateActiveCueList(); @@ -114,10 +131,14 @@ private: nsRefPtr mCueList; nsRefPtr mActiveCueList; + nsRefPtr mTrackElement; uint32_t mCuePos; uint16_t mReadyState; bool mDirty; + + // An enum that represents where the track was sourced from. + TextTrackSource mTextTrackSource; }; } // namespace dom diff --git a/content/media/TextTrackList.cpp b/content/media/TextTrackList.cpp index fde2e80caabd..6e01f74d6e56 100644 --- a/content/media/TextTrackList.cpp +++ b/content/media/TextTrackList.cpp @@ -64,17 +64,21 @@ TextTrackList::IndexedGetter(uint32_t aIndex, bool& aFound) already_AddRefed TextTrackList::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel, - const nsAString& aLanguage) + const nsAString& aLanguage, + TextTrackSource aTextTrackSource, + const CompareTextTracks& aCompareTT) { - nsRefPtr track = new TextTrack(mGlobal, this, aKind, aLabel, aLanguage); - AddTextTrack(track); + nsRefPtr track = new TextTrack(mGlobal, this, aKind, aLabel, aLanguage, + aTextTrackSource); + AddTextTrack(track, aCompareTT); return track.forget(); } void -TextTrackList::AddTextTrack(TextTrack* aTextTrack) +TextTrackList::AddTextTrack(TextTrack* aTextTrack, + const CompareTextTracks& aCompareTT) { - if (mTextTracks.AppendElement(aTextTrack)) { + if (mTextTracks.InsertElementSorted(aTextTrack, aCompareTT)) { aTextTrack->SetTextTrackList(this); CreateAndDispatchTrackEventRunner(aTextTrack, NS_LITERAL_STRING("addtrack")); } diff --git a/content/media/TextTrackList.h b/content/media/TextTrackList.h index fa0d54318b9f..8e0af46bc4c1 100644 --- a/content/media/TextTrackList.h +++ b/content/media/TextTrackList.h @@ -16,6 +16,7 @@ namespace dom { class HTMLMediaElement; class TextTrackManager; +class CompareTextTracks; class TrackEvent; class TrackEventRunner; @@ -48,10 +49,12 @@ public: already_AddRefed AddTextTrack(TextTrackKind aKind, const nsAString& aLabel, - const nsAString& aLanguage); + const nsAString& aLanguage, + TextTrackSource aTextTrackSource, + const CompareTextTracks& aCompareTT); TextTrack* GetTrackById(const nsAString& aId); - void AddTextTrack(TextTrack* aTextTrack); + void AddTextTrack(TextTrack* aTextTrack, const CompareTextTracks& aCompareTT); void RemoveTextTrack(TextTrack* aTrack); void DidSeek(); diff --git a/content/media/encoder/Makefile.in b/content/media/encoder/Makefile.in deleted file mode 100644 index 3f27e6e851fd..000000000000 --- a/content/media/encoder/Makefile.in +++ /dev/null @@ -1,13 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -include $(topsrcdir)/config/rules.mk - -# These includes are from Android JB, for use of MediaCodec. -INCLUDES += \ - -I$(topsrcdir)/ipc/chromium/src \ - -I$(ANDROID_SOURCE)/frameworks/native/opengl/include/ \ - -I$(ANDROID_SOURCE)/frameworks/native/include/ \ - -I$(ANDROID_SOURCE)/frameworks/av/include/media/ \ - $(NULL) diff --git a/content/media/encoder/moz.build b/content/media/encoder/moz.build index 2e6fee457dd5..e3f4768ee977 100644 --- a/content/media/encoder/moz.build +++ b/content/media/encoder/moz.build @@ -41,4 +41,14 @@ FAIL_ON_WARNINGS = True FINAL_LIBRARY = 'gklayout' +# These includes are from Android JB, for use of MediaCodec. +LOCAL_INCLUDES += ['/ipc/chromium/src'] +CXXFLAGS += [ + '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ + 'frameworks/native/opengl/include', + 'frameworks/native/include', + 'frameworks/av/include/media', + ] +] + include('/ipc/chromium/chromium-config.mozbuild') diff --git a/content/media/mediasource/test/mochitest.ini b/content/media/mediasource/test/mochitest.ini index 7bc811a42a24..7eb02a501c22 100644 --- a/content/media/mediasource/test/mochitest.ini +++ b/content/media/mediasource/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = seek.webm seek.webm^headers^ [test_MediaSource.html] diff --git a/content/media/omx/RtspOmxReader.cpp b/content/media/omx/RtspOmxReader.cpp index 92c762e66672..aed8ddcaff07 100644 --- a/content/media/omx/RtspOmxReader.cpp +++ b/content/media/omx/RtspOmxReader.cpp @@ -299,6 +299,18 @@ nsresult RtspOmxReader::Seek(int64_t aTime, int64_t aStartTime, return MediaOmxReader::Seek(aTime, aStartTime, aEndTime, aCurrentTime); } +nsresult +RtspOmxReader::ReadMetadata(MediaInfo* aInfo, + MetadataTags** aTags) +{ + nsresult rv = MediaOmxReader::ReadMetadata(aInfo, aTags); + NS_ENSURE_SUCCESS(rv, rv); + + SetActive(); + + return NS_OK; +} + void RtspOmxReader::SetIdle() { // Need to pause RTSP streaming OMXCodec decoding. if (mRtspResource) { @@ -319,7 +331,7 @@ void RtspOmxReader::SetActive() { nsIStreamingProtocolController* controller = mRtspResource->GetMediaStreamController(); if (controller) { - controller->Play(); + controller->Play(); } } diff --git a/content/media/omx/RtspOmxReader.h b/content/media/omx/RtspOmxReader.h index 80093662a9d8..0fd60b2dcd13 100644 --- a/content/media/omx/RtspOmxReader.h +++ b/content/media/omx/RtspOmxReader.h @@ -44,6 +44,9 @@ public: MOZ_COUNT_DTOR(RtspOmxReader); } + virtual nsresult ReadMetadata(MediaInfo* aInfo, + MetadataTags** aTags) MOZ_OVERRIDE; + // Implement a time-based seek instead of byte-based.. virtual nsresult Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime) MOZ_FINAL MOZ_OVERRIDE; diff --git a/content/media/omx/mediaresourcemanager/Makefile.in b/content/media/omx/mediaresourcemanager/Makefile.in deleted file mode 100644 index 8b62fbcf3e76..000000000000 --- a/content/media/omx/mediaresourcemanager/Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -include $(topsrcdir)/config/rules.mk - -CXXFLAGS += \ - -I$(ANDROID_SOURCE)/frameworks/base/include/ \ - -I$(ANDROID_SOURCE)/frameworks/base/include/binder/ \ - -I$(ANDROID_SOURCE)/frameworks/base/include/utils/ \ - -I$(ANDROID_SOURCE)/frameworks/base/include/media/ \ - -I$(ANDROID_SOURCE)/frameworks/base/include/media/stagefright/openmax \ - -I$(ANDROID_SOURCE)/frameworks/base/media/libstagefright/include/ \ - $(NULL) diff --git a/content/media/omx/mediaresourcemanager/moz.build b/content/media/omx/mediaresourcemanager/moz.build index a61f94a65f4f..b9ba9e2695af 100644 --- a/content/media/omx/mediaresourcemanager/moz.build +++ b/content/media/omx/mediaresourcemanager/moz.build @@ -14,4 +14,15 @@ SOURCES += [ include('/ipc/chromium/chromium-config.mozbuild') +CXXFLAGS += [ + '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ + 'frameworks/base/include', + 'frameworks/base/include/binder', + 'frameworks/base/include/utils', + 'frameworks/base/include/media/', + 'frameworks/base/include/media/stagefright/openmax', + 'frameworks/base/media/libstagefright/include', + ] +] + FINAL_LIBRARY = 'gklayout' diff --git a/content/media/test/mochitest.ini b/content/media/test/mochitest.ini index 8f01a79d75ae..df301b9434df 100644 --- a/content/media/test/mochitest.ini +++ b/content/media/test/mochitest.ini @@ -333,7 +333,7 @@ skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed [test_can_play_type_mpeg.html] skip-if = buildapp == 'b2g' # b2g(7 failures out of 27) b2g-debug(7 failures out of 27) b2g-desktop(7 failures out of 27) [test_can_play_type_ogg.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s [test_can_play_type_no_ogg.html] [test_closing_connections.html] [test_constants.html] diff --git a/content/media/test/test_texttrack.html b/content/media/test/test_texttrack.html index 5becbbdb8e34..7540c5abdf4a 100644 --- a/content/media/test/test_texttrack.html +++ b/content/media/test/test_texttrack.html @@ -27,11 +27,11 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]}, is(trackList.length, 0, "Length should be 0."); ok(typeof video.addTextTrack == "function", "HTMLMediaElement::AddTextTrack() function should be available.") - video.addTextTrack("subtitles", "label", "en-CA"); + video.addTextTrack("subtitles", "third", "en-CA"); is(trackList.length, 1, "Length should be 1."); var textTrack = video.textTracks[0]; - is(textTrack.label, "label", "Label should be set to label."); + is(textTrack.label, "third", "Label should be set to third."); is(textTrack.language, "en-CA", "Language should be en-CA."); is(textTrack.kind, "subtitles", "Default kind should be subtitles."); is(textTrack.mode, "hidden", "Default mode should be hidden."); @@ -47,7 +47,7 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]}, // All below are read-only properties and so should not allow setting. textTrack.label = "French subtitles"; - is(textTrack.label, "label", "Label is read-only so should still be \"label\"."); + is(textTrack.label, "third", "Label is read-only so should still be \"label\"."); textTrack.language = "en"; is(textTrack.language, "en-CA", "Language is read-only so should still be \"en-CA\"."); @@ -60,9 +60,50 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]}, is(textTrack.mode, value, message); } - SimpleTest.finish(); - } -); + // Test that text tracks are sorted correctly when being inserted on the + // MediaElements list of text tracks. For this test we add four tracks, the + // first one was at the start of the test, the next three are below. + var trackOne = document.createElement("track"); + trackOne.label = "first"; + trackOne.src = "basic.vtt"; + video.appendChild(trackOne); + + video.addTextTrack("subtitles", "fourth", "en-CA"); + + var trackTwo = document.createElement("track"); + trackTwo.label = "second"; + trackTwo.src = "basic.vtt"; + video.appendChild(trackTwo); + + video.src = "seek.webm"; + video.preload = "auto"; + + document.getElementById("content").appendChild(video); + + video.addEventListener("loadedmetadata", function run_tests() { + // Re-que run_tests() at the end of the event loop until the track + // element has loaded its data. + if (trackOne.readyState == 1 || trackTwo.readyState == 1) { + setTimeout(run_tests, 0); + return; + } + is(trackOne.readyState, 2, "First Track::ReadyState should be set to LOADED."); + is(trackTwo.readyState, 2, "Second Track::ReadyState should be set to LOADED."); + + // For the tracks to be sorted the first two tracks, added through a + // TrackElement, must occupy the first two indexes in their TrackElement + // tree order. The second two tracks, added through the 'addTextTrack' + // method, will occupy the last two indexes in the order that they were + // added in. + var labels = [ "first", "second", "third", "fourth" ]; + is(video.textTracks.length, labels.length, "TextTracks length should be " + labels.length); + for (var i = 0; i < video.textTracks.length; i++) { + isnot(video.textTracks[i], null, "Video should have a text track at " + i + " index."); + is(video.textTracks[i].label, labels[i], "Text track at " + i + " should be " + labels[i]); + } + SimpleTest.finish(); + }); +}); diff --git a/content/media/webspeech/recognition/test/mochitest.ini b/content/media/webspeech/recognition/test/mochitest.ini index 5e149e4c4802..d78f3af8baf4 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' # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_preference_enable.html] [test_recognition_service_error.html] skip-if = buildapp == 'b2g' # b2g(timed out) b2g-debug(timed out) b2g-desktop(timed out) diff --git a/content/media/webspeech/synth/ipc/test/mochitest.ini b/content/media/webspeech/synth/ipc/test/mochitest.ini index 1fa5f0fccc07..e7b66c207459 100644 --- a/content/media/webspeech/synth/ipc/test/mochitest.ini +++ b/content/media/webspeech/synth/ipc/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s [test_ipc.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 857673 # b2g(comp.classes['@mozilla.org/special-powers-observer;1'] is undefined) b2g-debug(comp.classes['@mozilla.org/special-powers-observer;1'] is undefined) b2g-desktop(comp.classes['@mozilla.org/special-powers-observer;1'] is undefined) diff --git a/content/media/webspeech/synth/test/mochitest.ini b/content/media/webspeech/synth/test/mochitest.ini index b1fc0a3cd6d3..52c9f9bcdc58 100644 --- a/content/media/webspeech/synth/test/mochitest.ini +++ b/content/media/webspeech/synth/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = common.js [test_setup.html] diff --git a/content/xml/document/test/mochitest.ini b/content/xml/document/test/mochitest.ini index 98a802842601..19ae0a743c9b 100644 --- a/content/xml/document/test/mochitest.ini +++ b/content/xml/document/test/mochitest.ini @@ -8,7 +8,7 @@ support-files = [test_bug343870.xhtml] [test_bug355213.xhtml] [test_bug392338.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s [test_bug399502.xhtml] [test_bug445330.html] [test_bug691215.html] diff --git a/docshell/test/iframesandbox/mochitest.ini b/docshell/test/iframesandbox/mochitest.ini index 574278f02199..7453b760bdb3 100644 --- a/docshell/test/iframesandbox/mochitest.ini +++ b/docshell/test/iframesandbox/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = file_other_auxiliary_navigation_by_location.html file_our_auxiliary_navigation_by_location.html diff --git a/docshell/test/mochitest.ini b/docshell/test/mochitest.ini index c183fc14474f..afd8e1133d50 100644 --- a/docshell/test/mochitest.ini +++ b/docshell/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = bug123696-subframe.html bug369814.jar diff --git a/docshell/test/navigation/mochitest.ini b/docshell/test/navigation/mochitest.ini index e1a00ffe12ff..b8d15e083990 100644 --- a/docshell/test/navigation/mochitest.ini +++ b/docshell/test/navigation/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = NavigationUtils.js blank.html diff --git a/dom/alarm/test/mochitest.ini b/dom/alarm/test/mochitest.ini index 0c883401a00d..5a1f6edb9961 100644 --- a/dom/alarm/test/mochitest.ini +++ b/dom/alarm/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s [test_alarm_add_data.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage diff --git a/dom/apps/tests/mochitest.ini b/dom/apps/tests/mochitest.ini index 85c3f7480fd0..40a6c5396c01 100644 --- a/dom/apps/tests/mochitest.ini +++ b/dom/apps/tests/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = toolkit=='gonk' #b2g(bug 972927, nearly perma-fail) b2g-debug(bug 972927, nearly perma-fail) +skip-if = toolkit=='gonk' || e10s #b2g(bug 972927, nearly perma-fail) b2g-debug(bug 972927, nearly perma-fail) support-files = file_app.sjs file_app.template.html diff --git a/dom/battery/test/mochitest.ini b/dom/battery/test/mochitest.ini index 55c5923692bb..010425ce82de 100644 --- a/dom/battery/test/mochitest.ini +++ b/dom/battery/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s [test_battery_basics.html] skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) diff --git a/dom/browser-element/mochitest/mochitest-oop.ini b/dom/browser-element/mochitest/mochitest-oop.ini index 2308c8a82bce..13ddfae3d89c 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)) +skip-if = os == "android" || (toolkit == "cocoa" && debug) || (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 c0ed29d9b5c7..0a7d0ff136aa 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)) +skip-if = (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 fcc5b7d06fb6..0ea1cba69514 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)) +skip-if = toolkit != "gtk2" || (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/contacts/tests/mochitest.ini b/dom/contacts/tests/mochitest.ini index ddb0b25b5a05..1c50ccd2c131 100644 --- a/dom/contacts/tests/mochitest.ini +++ b/dom/contacts/tests/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s [shared.js] [test_contacts_basics.html] diff --git a/dom/datastore/tests/mochitest.ini b/dom/datastore/tests/mochitest.ini index 8322a9cdfb8f..ac718be29691 100644 --- a/dom/datastore/tests/mochitest.ini +++ b/dom/datastore/tests/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = toolkit=='gonk' #b2g(bug 974270, frequent failures) b2g-debug(bug 974270, frequent failures) +skip-if = toolkit=='gonk' || e10s #b2g(bug 974270, frequent failures) b2g-debug(bug 974270, frequent failures) support-files = file_app_install.html file_readonly.html diff --git a/dom/devicestorage/ipc/mochitest.ini b/dom/devicestorage/ipc/mochitest.ini index b2e30a1e7420..37bb5f93bb6f 100644 --- a/dom/devicestorage/ipc/mochitest.ini +++ b/dom/devicestorage/ipc/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = toolkit == 'android' #bug 781789 & bug 782275 +skip-if = toolkit == 'android' || e10s #bug 781789 & bug 782275 support-files = ../test/devicestorage_common.js [test_ipc.html] diff --git a/dom/devicestorage/test/mochitest.ini b/dom/devicestorage/test/mochitest.ini index 0106c5cf7d90..f905a3631ba4 100644 --- a/dom/devicestorage/test/mochitest.ini +++ b/dom/devicestorage/test/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = toolkit == 'android' #bug 781789 & bug 782275 +skip-if = toolkit == 'android' || e10s #bug 781789 & bug 782275 support-files = devicestorage_common.js [test_823965.html] diff --git a/dom/encoding/test/mochitest.ini b/dom/encoding/test/mochitest.ini index 21266373c384..f0adace1ceae 100644 --- a/dom/encoding/test/mochitest.ini +++ b/dom/encoding/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = file_utf16_be_bom.css file_utf16_be_bom.js diff --git a/dom/encoding/test/unit/mochitest.ini b/dom/encoding/test/unit/mochitest.ini index 1e2419f0adcb..51e72dc1bf82 100644 --- a/dom/encoding/test/unit/mochitest.ini +++ b/dom/encoding/test/unit/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s [test_big5.js] [test_euc-jp.js] diff --git a/dom/events/test/mochitest.ini b/dom/events/test/mochitest.ini index 03f5f1acfd6d..7065633991ab 100644 --- a/dom/events/test/mochitest.ini +++ b/dom/events/test/mochitest.ini @@ -23,7 +23,7 @@ skip-if = buildapp == 'b2g' [test_bug299673-1.html] [test_bug299673-2.html] [test_bug322588.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_bug328885.html] [test_bug336682.js] [test_bug336682_1.html] @@ -37,9 +37,9 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_bug412567.html] [test_bug422132.html] -skip-if = buildapp == 'b2g' # 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) +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' # 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 == '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] @@ -56,7 +56,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_bug502818.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug508479.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #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 == '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] @@ -95,7 +95,7 @@ skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug650493.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug656379-1.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #TIMED_OUT #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' || e10s #TIMED_OUT #Bug 931116, b2g desktop specific, initial triage [test_bug656379-2.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_bug656954.html] @@ -131,14 +131,14 @@ skip-if = toolkit == "gonk" [test_clickevent_on_input.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_continuous_wheel_events.html] -skip-if = buildapp == 'b2g' # b2g(5535 passed, 108 failed - more tests running than desktop) b2g-debug(5535 passed, 108 failed - more tests running than desktop) b2g-desktop(5535 passed, 108 failed - more tests running than desktop) +skip-if = buildapp == 'b2g' || e10s # b2g(5535 passed, 108 failed - more tests running than desktop) b2g-debug(5535 passed, 108 failed - more tests running than desktop) b2g-desktop(5535 passed, 108 failed - more tests running than desktop) [test_dblclick_explicit_original_target.html] [test_dom_keyboard_event.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_dom_mouse_event.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_dom_wheel_event.html] -skip-if = buildapp == 'b2g' # b2g(456 failed out of 19873, mousewheel test) b2g-debug(456 failed out of 19873, mousewheel test) b2g-desktop(456 failed out of 19873, mousewheel test) +skip-if = buildapp == 'b2g' || e10s # b2g(456 failed out of 19873, mousewheel test) b2g-debug(456 failed out of 19873, mousewheel test) b2g-desktop(456 failed out of 19873, mousewheel test) [test_draggableprop.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_dragstart.html] @@ -151,4 +151,4 @@ skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_messageEvent.html] [test_moz_mouse_pixel_scroll_event.html] [test_wheel_default_action.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s diff --git a/dom/file/test/mochitest.ini b/dom/file/test/mochitest.ini index dbfcd6367939..1b3f35489a05 100644 --- a/dom/file/test/mochitest.ini +++ b/dom/file/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = dummy_worker.js helpers.js diff --git a/dom/indexedDB/ipc/mochitest.ini b/dom/indexedDB/ipc/mochitest.ini index d6903f5c61a5..4a55c62e16d7 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' #bug 783513 # b2g(nested ipc not working) b2g-debug(nested ipc not working) b2g-desktop(nested ipc not working) +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) diff --git a/dom/indexedDB/test/mochitest.ini b/dom/indexedDB/test/mochitest.ini index a54900d9aa0e..d8ffe94458b6 100644 --- a/dom/indexedDB/test/mochitest.ini +++ b/dom/indexedDB/test/mochitest.ini @@ -161,7 +161,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_overlapping_transactions.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_persistenceType.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_put_get_values.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_put_get_values_autoIncrement.html] diff --git a/dom/inputmethod/mochitest/mochitest.ini b/dom/inputmethod/mochitest/mochitest.ini index 8a064054941e..247119d844f0 100644 --- a/dom/inputmethod/mochitest/mochitest.ini +++ b/dom/inputmethod/mochitest/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = toolkit == 'android' #Not supported on Android +skip-if = toolkit == 'android' || e10s #Not supported on Android support-files = inputmethod_common.js file_inputmethod.html diff --git a/dom/media/tests/identity/mochitest.ini b/dom/media/tests/identity/mochitest.ini index 04338789f532..ad0deb546415 100644 --- a/dom/media/tests/identity/mochitest.ini +++ b/dom/media/tests/identity/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = /.well-known/idp-proxy/idp.html /.well-known/idp-proxy/idp-proxy.js diff --git a/dom/media/tests/ipc/mochitest.ini b/dom/media/tests/ipc/mochitest.ini index ab13960ea3a1..8081ab9e83e1 100644 --- a/dom/media/tests/ipc/mochitest.ini +++ b/dom/media/tests/ipc/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s [test_ipc.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 910661 # b2g(nested ipc not working) b2g-debug(debug-only failure) b2g-desktop(nested ipc not working) diff --git a/dom/mobilemessage/tests/mochitest.ini b/dom/mobilemessage/tests/mochitest.ini index 0495b70ba771..c0edbf36c774 100644 --- a/dom/mobilemessage/tests/mochitest.ini +++ b/dom/mobilemessage/tests/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s [test_sms_basics.html] skip-if = toolkit == 'android' #Bug 909036 diff --git a/dom/network/tests/mochitest.ini b/dom/network/tests/mochitest.ini index a8e007abde79..376acd805598 100644 --- a/dom/network/tests/mochitest.ini +++ b/dom/network/tests/mochitest.ini @@ -5,7 +5,7 @@ skip-if = toolkit == "gonk" [test_tcpsocket_enabled_no_perm.html] skip-if = toolkit == "gonk" [test_tcpsocket_enabled_with_perm.html] -skip-if = toolkit == "gonk" +skip-if = toolkit == "gonk" || e10s [test_networkstats_alarms.html] skip-if = toolkit != "gonk" [test_networkstats_basics.html] diff --git a/dom/permission/tests/mochitest.ini b/dom/permission/tests/mochitest.ini index 510c37d73cfe..30799ed5814b 100644 --- a/dom/permission/tests/mochitest.ini +++ b/dom/permission/tests/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = file_framework.js file_shim.html diff --git a/dom/phonenumberutils/tests/mochitest.ini b/dom/phonenumberutils/tests/mochitest.ini index 08e8cab5a204..163c31b15870 100644 --- a/dom/phonenumberutils/tests/mochitest.ini +++ b/dom/phonenumberutils/tests/mochitest.ini @@ -1,3 +1,4 @@ [DEFAULT] +skip-if = e10s [test_phonenumberutils_basics.html] diff --git a/dom/plugins/test/mochitest/mochitest.ini b/dom/plugins/test/mochitest/mochitest.ini index 12d61a76ffc8..c981b705affe 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') #b2g-desktop(tests that use plugins) +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #b2g-desktop(tests that use plugins) support-files = 307-xo-redirect.sjs crashing_subpage.html diff --git a/dom/power/test/mochitest.ini b/dom/power/test/mochitest.ini index f67425115068..75176dbbb91f 100644 --- a/dom/power/test/mochitest.ini +++ b/dom/power/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s [test_bug957893.html] [test_bug957899.html] diff --git a/dom/settings/tests/mochitest.ini b/dom/settings/tests/mochitest.ini index b8c7ad396b75..76b0281fb903 100644 --- a/dom/settings/tests/mochitest.ini +++ b/dom/settings/tests/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = (toolkit == 'gonk' && debug) #debug-only failure, bug 932878 +skip-if = (toolkit == 'gonk' && debug) || e10s #debug-only failure, bug 932878 [test_settings_basics.html] [test_settings_blobs.html] diff --git a/dom/src/json/test/mochitest.ini b/dom/src/json/test/mochitest.ini index aa4fb346506c..cf4ef53efd53 100644 --- a/dom/src/json/test/mochitest.ini +++ b/dom/src/json/test/mochitest.ini @@ -1,3 +1,4 @@ [DEFAULT] +skip-if = e10s [test_json.html] diff --git a/dom/src/jsurl/test/mochitest.ini b/dom/src/jsurl/test/mochitest.ini index 431bfb2c6307..ae62b8816c2c 100644 --- a/dom/src/jsurl/test/mochitest.ini +++ b/dom/src/jsurl/test/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = fail.html form-submit.html diff --git a/dom/tests/mochitest/ajax/jquery/mochitest.ini b/dom/tests/mochitest/ajax/jquery/mochitest.ini index 7f4fb67c4748..20cf876ea8f8 100644 --- a/dom/tests/mochitest/ajax/jquery/mochitest.ini +++ b/dom/tests/mochitest/ajax/jquery/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = manifest.json dist/jquery.js diff --git a/dom/tests/mochitest/ajax/mochikit/mochitest.ini b/dom/tests/mochitest/ajax/mochikit/mochitest.ini index 25f301e302be..1da6405da444 100644 --- a/dom/tests/mochitest/ajax/mochikit/mochitest.ini +++ b/dom/tests/mochitest/ajax/mochikit/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = manifest.json MochiKit/Async.js diff --git a/dom/tests/mochitest/ajax/mochikit/tests/mochitest.ini b/dom/tests/mochitest/ajax/mochikit/tests/mochitest.ini index e8043d69be60..10b19ec43d58 100644 --- a/dom/tests/mochitest/ajax/mochikit/tests/mochitest.ini +++ b/dom/tests/mochitest/ajax/mochikit/tests/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = FakeJSAN.js MochiKit-Async.html diff --git a/dom/tests/mochitest/ajax/offline/mochitest.ini b/dom/tests/mochitest/ajax/offline/mochitest.ini index 6577f28331df..5125653d943a 100644 --- a/dom/tests/mochitest/ajax/offline/mochitest.ini +++ b/dom/tests/mochitest/ajax/offline/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = toolkit == 'android' #SLOW_DIRECTORY +skip-if = toolkit == 'android' || e10s #SLOW_DIRECTORY support-files = 445544.cacheManifest 445544.cacheManifest^headers^ diff --git a/dom/tests/mochitest/ajax/prototype/mochitest.ini b/dom/tests/mochitest/ajax/prototype/mochitest.ini index e7d932bfc32d..5fec49563205 100644 --- a/dom/tests/mochitest/ajax/prototype/mochitest.ini +++ b/dom/tests/mochitest/ajax/prototype/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = manifest.json dist/prototype.js diff --git a/dom/tests/mochitest/ajax/scriptaculous/mochitest.ini b/dom/tests/mochitest/ajax/scriptaculous/mochitest.ini index 2bef57e2280c..aaa01d12aa63 100644 --- a/dom/tests/mochitest/ajax/scriptaculous/mochitest.ini +++ b/dom/tests/mochitest/ajax/scriptaculous/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = manifest.json lib/prototype.js diff --git a/dom/tests/mochitest/bugs/mochitest.ini b/dom/tests/mochitest/bugs/mochitest.ini index 9d5e4cf95723..17c91b20f2fd 100644 --- a/dom/tests/mochitest/bugs/mochitest.ini +++ b/dom/tests/mochitest/bugs/mochitest.ini @@ -38,13 +38,13 @@ support-files = [test_bug132255.html] [test_bug159849.html] [test_bug260264.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(dom.disable_open_during_load not implemented in b2g) b2g-debug(dom.disable_open_during_load not implemented in b2g) b2g-desktop(dom.disable_open_during_load not implemented in b2g) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(dom.disable_open_during_load not implemented in b2g) b2g-debug(dom.disable_open_during_load not implemented in b2g) b2g-desktop(dom.disable_open_during_load not implemented in b2g) [test_bug260264_nested.html] -skip-if = buildapp == 'b2g' # b2g(dom.disable_open_during_load not implemented in b2g) b2g-debug(dom.disable_open_during_load not implemented in b2g) b2g-desktop(dom.disable_open_during_load not implemented in b2g) +skip-if = buildapp == 'b2g' || e10s # b2g(dom.disable_open_during_load not implemented in b2g) b2g-debug(dom.disable_open_during_load not implemented in b2g) b2g-desktop(dom.disable_open_during_load not implemented in b2g) [test_bug265203.html] [test_bug291377.html] [test_bug291653.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_bug304459.html] [test_bug308856.html] [test_bug327891.html] @@ -57,7 +57,7 @@ skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_bug351601.html] [test_bug369306.html] -skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || toolkit == 'android' #TIMED_OUT # b2g-debug(test timed out, can't focus back from popup window to opener?) b2g-desktop(test timed out, can't focus back from popup window to opener?) +skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || toolkit == 'android' || e10s #TIMED_OUT # b2g-debug(test timed out, can't focus back from popup window to opener?) b2g-desktop(test timed out, can't focus back from popup window to opener?) [test_bug370098.html] [test_bug377539.html] [test_bug384122.html] @@ -72,16 +72,16 @@ skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) [test_bug400204.html] [test_bug404748.html] [test_bug406375.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s [test_bug411103.html] [test_bug414291.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_bug427744.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s [test_bug42976.html] [test_bug430276.html] [test_bug437361.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # 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 == '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] @@ -89,14 +89,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' # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = 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' #RANDOM # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #RANDOM # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_bug529328.html] [test_bug531176.html] [test_bug531542.html] @@ -115,9 +115,9 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_bug593174.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_bug597809.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug61098.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) [test_bug612267.html] [test_bug617296.html] [test_bug620947.html] @@ -125,7 +125,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(showmodaldialog) b2g-d skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_bug633133.html] [test_bug641552.html] -skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || toolkit == 'android' +skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || toolkit == 'android' || e10s [test_bug642026.html] [test_bug648465.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage @@ -154,14 +154,14 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec [test_bug876098.html] [test_bug927901.html] [test_devicemotion_multiple_listeners.html] -skip-if = toolkit == 'android' #bug 775227 +skip-if = toolkit == 'android' || e10s #bug 775227 [test_domparser_after_blank.html] [test_onerror_message.html] [test_protochains.html] [test_resize_move_windows.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #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 == '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' #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 == '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' +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s diff --git a/dom/tests/mochitest/crypto/mochitest-legacy.ini b/dom/tests/mochitest/crypto/mochitest-legacy.ini index fe4684e4794d..30274031e346 100644 --- a/dom/tests/mochitest/crypto/mochitest-legacy.ini +++ b/dom/tests/mochitest/crypto/mochitest-legacy.ini @@ -1 +1,2 @@ [test_legacy.html] +skip-if = e10s diff --git a/dom/tests/mochitest/crypto/mochitest-no-legacy.ini b/dom/tests/mochitest/crypto/mochitest-no-legacy.ini index 9e52490dcc76..5af2e777185b 100644 --- a/dom/tests/mochitest/crypto/mochitest-no-legacy.ini +++ b/dom/tests/mochitest/crypto/mochitest-no-legacy.ini @@ -1 +1,2 @@ [test_no_legacy.html] +skip-if = e10s diff --git a/dom/tests/mochitest/crypto/mochitest.ini b/dom/tests/mochitest/crypto/mochitest.ini index 8e23cb9c09fc..14e454cf3cb1 100644 --- a/dom/tests/mochitest/crypto/mochitest.ini +++ b/dom/tests/mochitest/crypto/mochitest.ini @@ -1,3 +1,4 @@ [DEFAULT] +skip-if = e10s [test_getRandomValues.html] diff --git a/dom/tests/mochitest/gamepad/mochitest.ini b/dom/tests/mochitest/gamepad/mochitest.ini index 342a6f96a64f..5c1d019900ed 100644 --- a/dom/tests/mochitest/gamepad/mochitest.ini +++ b/dom/tests/mochitest/gamepad/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = gamepad_frame.html gamepad_frame_state.html diff --git a/dom/tests/mochitest/general/mochitest.ini b/dom/tests/mochitest/general/mochitest.ini index 7216f9f70105..19716c6a4507 100644 --- a/dom/tests/mochitest/general/mochitest.ini +++ b/dom/tests/mochitest/general/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = 497633.html file_MozEnteredDomFullscreen.html diff --git a/dom/tests/mochitest/geolocation/mochitest.ini b/dom/tests/mochitest/geolocation/mochitest.ini index 78d13f359073..fd3d700e3924 100644 --- a/dom/tests/mochitest/geolocation/mochitest.ini +++ b/dom/tests/mochitest/geolocation/mochitest.ini @@ -10,7 +10,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(Bug 910235 [test_allowWatch.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_cachedPosition.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT [test_cancelCurrent.html] skip-if = buildapp == 'b2g' [test_cancelWatch.html] @@ -20,10 +20,10 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_clearWatch_invalid.html] skip-if = buildapp == 'b2g' [test_errorcheck.html] -skip-if = toolkit=='gonk' || toolkit == 'android' #TIMED_OUT # b2g-debug(debug-only timeout) +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' #Don't run modal tests on Android # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog) +skip-if = 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] @@ -35,15 +35,15 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_manyWindows.html] skip-if = buildapp == 'b2g' [test_mozsettings.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #mozSettings is undefined +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #mozSettings is undefined [test_mozsettingsWatch.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #mozSettings is undefined +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #mozSettings is undefined [test_optional_api_params.html] skip-if = buildapp == 'b2g' [test_shutdown.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_timerRestartWatch.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT [test_windowClose.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT [test_worseAccuracyDoesNotBlockCallback.html] diff --git a/dom/tests/mochitest/localstorage/mochitest.ini b/dom/tests/mochitest/localstorage/mochitest.ini index 69bc5004246d..3b3c50c4be3e 100644 --- a/dom/tests/mochitest/localstorage/mochitest.ini +++ b/dom/tests/mochitest/localstorage/mochitest.ini @@ -30,7 +30,7 @@ skip-if = toolkit=='gonk' # b2g(4 failures) b2g-debug(debug-only failure) [test_embededNulls.html] [test_keySync.html] [test_localStorageBase.html] -skip-if = buildapp == 'b2g' # b2g(no storage chrome event received) +skip-if = buildapp == 'b2g' || e10s # b2g(no storage chrome event received) [test_localStorageBaseSessionOnly.html] skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) [test_localStorageCookieSettings.html] diff --git a/dom/tests/mochitest/notification/mochitest.ini b/dom/tests/mochitest/notification/mochitest.ini index 62d79785a972..ac54da835798 100644 --- a/dom/tests/mochitest/notification/mochitest.ini +++ b/dom/tests/mochitest/notification/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = MockServices.js NotificationTest.js diff --git a/dom/tests/mochitest/orientation/mochitest.ini b/dom/tests/mochitest/orientation/mochitest.ini index 3a48e978b88c..0eaf710092da 100644 --- a/dom/tests/mochitest/orientation/mochitest.ini +++ b/dom/tests/mochitest/orientation/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = bug507902-frame.html [test_bug507902.html] diff --git a/dom/tests/mochitest/sessionstorage/mochitest.ini b/dom/tests/mochitest/sessionstorage/mochitest.ini index 95ac06f774fe..019dd1fd4c6c 100644 --- a/dom/tests/mochitest/sessionstorage/mochitest.ini +++ b/dom/tests/mochitest/sessionstorage/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = file_http.html file_https.html diff --git a/dom/tests/mochitest/storageevent/mochitest.ini b/dom/tests/mochitest/storageevent/mochitest.ini index e16d9cd2e965..f18fb840b1e7 100644 --- a/dom/tests/mochitest/storageevent/mochitest.ini +++ b/dom/tests/mochitest/storageevent/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = frameLocalStorageMaster.html frameLocalStorageSlaveEqual.html diff --git a/dom/tests/mochitest/webapps/mochitest.ini b/dom/tests/mochitest/webapps/mochitest.ini index f127c78eb5ef..fc17e6366932 100644 --- a/dom/tests/mochitest/webapps/mochitest.ini +++ b/dom/tests/mochitest/webapps/mochitest.ini @@ -1,4 +1,5 @@ [DEFAULT] +skip-if = e10s support-files = file_bug_779982.html file_bug_779982.js diff --git a/dom/tests/mochitest/whatwg/mochitest.ini b/dom/tests/mochitest/whatwg/mochitest.ini index 5c1ab2610399..5861db82690c 100644 --- a/dom/tests/mochitest/whatwg/mochitest.ini +++ b/dom/tests/mochitest/whatwg/mochitest.ini @@ -25,7 +25,7 @@ support-files = [test_MessageEvent.html] [test_postMessage_basehref.html] [test_postMessage_closed.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 894914 - wrong data - got FAIL, expected message # b2g(bug 894914 - wrong data - got FAIL, expected message) b2g-debug(bug 894914 - wrong data - got FAIL, expected message) b2g-desktop(Bug 931116, b2g desktop specific, initial triage) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 894914 - wrong data - got FAIL, expected message # b2g(bug 894914 - wrong data - got FAIL, expected message) b2g-debug(bug 894914 - wrong data - got FAIL, expected message) b2g-desktop(Bug 931116, b2g desktop specific, initial triage) [test_postMessage_hash.html] [test_postMessage.html] [test_postMessage_idn.xhtml] diff --git a/dom/workers/test/mochitest.ini b/dom/workers/test/mochitest.ini index 8bc317943482..8b37867ade95 100644 --- a/dom/workers/test/mochitest.ini +++ b/dom/workers/test/mochitest.ini @@ -120,7 +120,7 @@ skip-if = buildapp == 'b2g' # b2g(Failed to load script: relativeLoad_import.js) [test_sharedWorker.html] [test_simpleThread.html] [test_suspend.html] -skip-if = buildapp == 'b2g' # b2g(test timed out, might need more time) b2g-debug(test timed out, might need more time) b2g-desktop(test timed out, might need more time) +skip-if = buildapp == 'b2g' || e10s # b2g(test timed out, might need more time) b2g-debug(test timed out, might need more time) b2g-desktop(test timed out, might need more time) [test_terminate.html] [test_threadErrors.html] [test_threadTimeouts.html] @@ -137,12 +137,12 @@ skip-if = (toolkit == 'gonk' && debug) #debug-only crash, bug 931887 [test_xhr_headers.html] [test_xhr_implicit_cancel.html] [test_xhr_parameters.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s [test_xhr_parameters.js] [test_xhr_system.html] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s [test_xhr_system.js] [test_xhr_timeout.html] -skip-if = (os == "win") || (os == "mac") || toolkit == 'android' #bug 798220 +skip-if = (os == "win") || (os == "mac") || toolkit == 'android' || e10s #bug 798220 [test_url_exceptions.html] [test_urlSearchParams.html] diff --git a/editor/libeditor/base/tests/mochitest.ini b/editor/libeditor/base/tests/mochitest.ini index 2e999ea15c8e..acda8b810514 100644 --- a/editor/libeditor/base/tests/mochitest.ini +++ b/editor/libeditor/base/tests/mochitest.ini @@ -8,7 +8,7 @@ skip-if = toolkit == 'android' [test_bug514156.html] [test_bug567213.html] [test_bug586662.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug599983.html] [test_bug742261.html] [test_bug773262.html] diff --git a/editor/libeditor/html/tests/mochitest.ini b/editor/libeditor/html/tests/mochitest.ini index 762c48aa24f5..b8ed9aab3a9c 100644 --- a/editor/libeditor/html/tests/mochitest.ini +++ b/editor/libeditor/html/tests/mochitest.ini @@ -24,11 +24,11 @@ skip-if = os != "mac" skip-if = toolkit == 'android' [test_bug404320.html] [test_bug410986.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug414526.html] [test_bug417418.html] [test_bug432225.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug439808.html] [test_bug442186.html] [test_bug449243.html] @@ -37,20 +37,20 @@ skip-if = toolkit == 'android' [test_bug460740.html] [test_bug468353.html] [test_bug478725.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug480647.html] [test_bug480972.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug484181.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug487524.html] [test_bug520189.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug525389.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug537046.html] [test_bug549262.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug550434.html] [test_bug551704.html] [test_bug552782.html] @@ -60,7 +60,7 @@ skip-if = toolkit == 'android' [test_bug592592.html] [test_bug597784.html] [test_bug599322.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug607584.html] [test_bug611182.html] skip-if = toolkit == 'android' @@ -72,11 +72,12 @@ skip-if = toolkit == 'android' #TIMED_OUT skip-if = toolkit == 'android' #bug 957797 [test_bug629845.html] [test_bug640321.html] +skip-if = e10s [test_bug668599.html] [test_bug674770-1.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug674770-2.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug674861.html] [test_bug676401.html] [test_bug677752.html] @@ -102,5 +103,6 @@ skip-if = os != "win" [test_keypress_untrusted_event.html] [test_root_element_replacement.html] [test_select_all_without_body.html] +skip-if = e10s [test_spellcheck_pref.html] skip-if = toolkit == 'android' diff --git a/editor/libeditor/text/tests/mochitest.ini b/editor/libeditor/text/tests/mochitest.ini index 9ef793d1384f..429a1c9ae4b2 100644 --- a/editor/libeditor/text/tests/mochitest.ini +++ b/editor/libeditor/text/tests/mochitest.ini @@ -4,11 +4,11 @@ skip-if = buildapp == 'b2g' [test_bug318065.html] [test_bug471722.html] [test_bug527935.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug590554.html] [test_bug596001.html] [test_bug596333.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug596506.html] [test_bug597331.html] [test_bug600570.html] @@ -19,7 +19,7 @@ skip-if = toolkit == 'android' skip-if = toolkit == 'android' [test_bug625452.html] [test_bug629172.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s [test_bug638596.html] [test_bug641466.html] [test_bug645914.html] diff --git a/embedding/test/mochitest.ini b/embedding/test/mochitest.ini index 5a190eda46c2..2b0445c3fd81 100644 --- a/embedding/test/mochitest.ini +++ b/embedding/test/mochitest.ini @@ -12,4 +12,4 @@ skip-if = toolkit == 'android' [test_nsFind.html] [test_private_window_from_content.html] [test_window_open_units.html] -skip-if = toolkit == 'android' +skip-if = toolkit == 'android' || e10s diff --git a/extensions/cookie/test/mochitest.ini b/extensions/cookie/test/mochitest.ini index acfa523a5fde..794dce7d52e0 100644 --- a/extensions/cookie/test/mochitest.ini +++ b/extensions/cookie/test/mochitest.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s support-files = beltzner.jpg beltzner.jpg^headers^ diff --git a/gfx/gl/Makefile.in b/gfx/gl/Makefile.in index 3029a1f9593b..1ba6fcd179c1 100644 --- a/gfx/gl/Makefile.in +++ b/gfx/gl/Makefile.in @@ -4,10 +4,6 @@ include $(topsrcdir)/config/rules.mk -ifeq ($(MOZ_WIDGET_TOOLKIT),gonk) -CXXFLAGS += -I$(ANDROID_SOURCE)/hardware/libhardware/include -endif - DEFINES := $(filter-out -DUNICODE,$(DEFINES)) CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS) diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build index 533b71f1715c..04762ecb5427 100644 --- a/gfx/gl/moz.build +++ b/gfx/gl/moz.build @@ -84,6 +84,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp'] EXPORTS += ['SharedSurfaceGralloc.h'] LOCAL_INCLUDES += ['/widget/gonk'] + CXXFLAGS += ['-I%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')] if gl_provider == 'CGL': # These files include Mac headers that are unfriendly to unified builds diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index 785500c4fb4f..7be1120e48dd 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -250,9 +250,6 @@ public: // To pre-render a margin of 100 CSS pixels around the window, // { x = -100, y = - 100, // width = window.innerWidth + 200, height = window.innerHeight + 200 } - // - // This is only valid on the root layer. Nested iframes do not have a - // displayport set on them. See bug 775452. CSSRect mDisplayPort; // If non-empty, the area of a frame's contents that is considered critical diff --git a/gfx/layers/Makefile.in b/gfx/layers/Makefile.in index c4a71a603051..dac96cc6bfc0 100644 --- a/gfx/layers/Makefile.in +++ b/gfx/layers/Makefile.in @@ -5,13 +5,6 @@ include $(topsrcdir)/config/rules.mk -CXXFLAGS += \ - -I$(ANDROID_SOURCE)/frameworks/base/include/media/stagefright \ - -I$(ANDROID_SOURCE)/frameworks/base/include/media/stagefright/openmax \ - -I$(ANDROID_SOURCE)/frameworks/av/include/media/stagefright \ - -I$(ANDROID_SOURCE)/frameworks/native/include/media/openmax \ - $(NULL) - CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS) PremultiplyTables.h: $(srcdir)/genTables.py diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index a329624e09a0..95dcced38e0c 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -348,3 +348,12 @@ if CONFIG['MOZ_ENABLE_D3D10_LAYER']: GENERATED_FILES = [ 'PremultiplyTables.h', ] + +CXXFLAGS += [ + '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ + 'frameworks/base/include/media/stagefright', + 'frameworks/base/include/media/stagefright/openmax', + 'frameworks/av/include/media/stagefright', + 'frameworks/native/include/media/openmax', + ] +] diff --git a/gfx/tests/mochitest.ini b/gfx/tests/mochitest.ini index 283cfd019bad..8026f07c69bb 100644 --- a/gfx/tests/mochitest.ini +++ b/gfx/tests/mochitest.ini @@ -2,4 +2,5 @@ skip-if = buildapp == 'b2g' [mochitest/test_bug509244.html] [mochitest/test_bug513439.html] +skip-if = e10s [mochitest/test_acceleration.html] diff --git a/image/test/mochitest/mochitest.ini b/image/test/mochitest/mochitest.ini index 39f018815a15..380c578fdd43 100644 --- a/image/test/mochitest/mochitest.ini +++ b/image/test/mochitest/mochitest.ini @@ -57,6 +57,7 @@ support-files = [test_ImageContentLoaded.html] [test_bug399925.html] +skip-if = e10s # [test_bug435296.html] # disabled - See bug 578591 [test_bug466586.html] diff --git a/js/src/jit-test/tests/asm.js/testFloat32.js b/js/src/jit-test/tests/asm.js/testFloat32.js index 8eb5aaf6cb4b..b8f947bcf899 100644 --- a/js/src/jit-test/tests/asm.js/testFloat32.js +++ b/js/src/jit-test/tests/asm.js/testFloat32.js @@ -86,6 +86,9 @@ assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = UINT32_MAX = Math.pow(2, 32)-1; assertEq(asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = x|0; return toF(x >>> 0); } return f"), this)(-1), Math.fround(UINT32_MAX)); +var tof = asmLink(asmCompile('glob', USE_ASM + TO_FLOAT32 + "function f(x) { x = x|0; return toF(x>>>0) } return f"), this); +for (x of [0, 1, 10, 64, 1025, 65000, Math.pow(2,30), Math.pow(2,31), Math.pow(2,32)-2, Math.pow(2,32)-1]) + assertEq(tof(x), Math.fround(x)); // Global variables imports assertAsmTypeFail('glob', USE_ASM + "var x = toF(); function f() {} return f"); diff --git a/js/src/jit-test/tests/debug/bug980585.js b/js/src/jit-test/tests/debug/bug980585.js new file mode 100644 index 000000000000..68c894f70884 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug980585.js @@ -0,0 +1,10 @@ +var g = newGlobal(); +var dbg = new Debugger(g); + +try { + g.eval("function f() { var array = ['a', 'b']; [1].map(function () {}); return {array}; }"); +} catch (e) { + // Ignore the syntax error. +} + +dbg.findScripts(); diff --git a/js/src/jit/x86/MacroAssembler-x86.h b/js/src/jit/x86/MacroAssembler-x86.h index 69a1fd19e477..0caa1d82b73e 100644 --- a/js/src/jit/x86/MacroAssembler-x86.h +++ b/js/src/jit/x86/MacroAssembler-x86.h @@ -988,15 +988,8 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared // Note: this function clobbers the source register. void convertUInt32ToFloat32(const Register &src, const FloatRegister &dest) { - // src is [0, 2^32-1] - subl(Imm32(0x80000000), src); - - // Do it the GCC way - convertInt32ToFloat32(src, dest); - - // dest is now a double with the int range. - // correct the double value by adding 0x80000000. - addConstantFloat32(2147483648.f, dest); + convertUInt32ToDouble(src, dest); + convertDoubleToFloat32(dest, dest); } void inc64(AbsoluteAddress dest) { diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp index 076e63a59329..c6ecfe4ff72e 100644 --- a/js/src/jscompartment.cpp +++ b/js/src/jscompartment.cpp @@ -720,14 +720,17 @@ CreateLazyScriptsForCompartment(JSContext *cx) AutoObjectVector lazyFunctions(cx); // Find all live lazy scripts in the compartment, and via them all root - // lazy functions in the compartment: those which have not been compiled - // and which have a source object, indicating that their parent has been - // compiled. + // lazy functions in the compartment: those which have not been compiled, + // which have a source object, indicating that they have a parent, and + // which do not have an uncompiled enclosing script. The last condition is + // so that we don't compile lazy scripts whose enclosing scripts failed to + // compile, indicating that the lazy script did not escape the script. for (gc::CellIter i(cx->zone(), gc::FINALIZE_LAZY_SCRIPT); !i.done(); i.next()) { LazyScript *lazy = i.get(); JSFunction *fun = lazy->functionNonDelazifying(); if (fun->compartment() == cx->compartment() && - lazy->sourceObject() && !lazy->maybeScript()) + lazy->sourceObject() && !lazy->maybeScript() && + !lazy->hasUncompiledEnclosingScript()) { MOZ_ASSERT(fun->isInterpretedLazy()); MOZ_ASSERT(lazy == fun->lazyScriptOrNull()); diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp index b4e82709a29c..29b29c5e4915 100644 --- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -3673,6 +3673,24 @@ LazyScript::initRuntimeFields(uint64_t packedFields) p_.treatAsRunOnce = p.treatAsRunOnce; } +bool +LazyScript::hasUncompiledEnclosingScript() const +{ + // It can happen that we created lazy scripts while compiling an enclosing + // script, but we errored out while compiling that script. When we iterate + // over lazy script in a compartment, we might see lazy scripts that never + // escaped to script and should be ignored. + // + // If the enclosing scope is a function with a null script or has a script + // without code, it was not successfully compiled. + + if (!enclosingScope() || !enclosingScope()->is()) + return false; + + JSFunction &fun = enclosingScope()->as(); + return fun.isInterpreted() && (!fun.mutableScript() || !fun.nonLazyScript()->code()); +} + uint32_t LazyScript::staticLevel(JSContext *cx) const { diff --git a/js/src/jsscript.h b/js/src/jsscript.h index a0b8209ed6be..f80bad30a642 100644 --- a/js/src/jsscript.h +++ b/js/src/jsscript.h @@ -1825,6 +1825,7 @@ class LazyScript : public gc::BarrieredCell return column_; } + bool hasUncompiledEnclosingScript() const; uint32_t staticLevel(JSContext *cx) const; void markChildren(JSTracer *trc); diff --git a/layout/base/tests/mochitest.ini b/layout/base/tests/mochitest.ini index 82fa8cf8daea..3cb3967cf3c6 100644 --- a/layout/base/tests/mochitest.ini +++ b/layout/base/tests/mochitest.ini @@ -77,14 +77,14 @@ skip-if = true # Bug 492575 skip-if = buildapp == 'b2g' || true # bug 934301 # b2g(times out) b2g-debug(times out) b2g-desktop(times out) support-files = bug450930.xhtml [test_bug465448.xul] -skip-if = buildapp == 'b2g' +skip-if = buildapp == 'b2g' || e10s [test_bug469170.html] [test_bug471126.html] [test_bug435293-scale.html] [test_bug435293-interaction.html] [test_bug435293-skew.html] [test_reftests_with_caret.html] -skip-if = (toolkit == 'gonk' && debug) #debug-only timeout +skip-if = (toolkit == 'gonk' && debug) || e10s #debug-only timeout support-files = bug106855-1.html bug106855-2.html @@ -163,7 +163,7 @@ support-files = [test_bug582181-2.html] [test_bug588174.html] [test_bug607529.html] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage support-files = file_bug607529.html [test_bug667512.html] [test_bug677878.html] @@ -172,15 +172,15 @@ support-files = file_bug607529.html [test_event_target_iframe_oop.html] support-files = bug921928_event_target_iframe_apps_oop.html [test_mozPaintCount.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(depends on plugins support) b2g-debug(depends on plugins support) b2g-desktop(depends on plugins support) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(depends on plugins support) b2g-debug(depends on plugins support) b2g-desktop(depends on plugins support) [test_scroll_event_ordering.html] [test_bug583889.html] support-files = bug583889_inner1.html bug583889_inner2.html [test_bug582771.html] [test_bug603550.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(Components.classes[@mozilla.org/widget/dragservice;1] is undefined) b2g-debug(Components.classes[@mozilla.org/widget/dragservice;1] is undefined) b2g-desktop(Components.classes[@mozilla.org/widget/dragservice;1] is undefined) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(Components.classes[@mozilla.org/widget/dragservice;1] is undefined) b2g-debug(Components.classes[@mozilla.org/widget/dragservice;1] is undefined) b2g-desktop(Components.classes[@mozilla.org/widget/dragservice;1] is undefined) [test_bug629838.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(depends on plugins support) b2g-debug(depends on plugins support) b2g-desktop(depends on plugins support) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(depends on plugins support) b2g-debug(depends on plugins support) b2g-desktop(depends on plugins support) [test_bug646757.html] [test_bug718809.html] [test_bug725426.html] diff --git a/layout/forms/test/mochitest.ini b/layout/forms/test/mochitest.ini index f3a13963cd86..7ae01f88de56 100644 --- a/layout/forms/test/mochitest.ini +++ b/layout/forms/test/mochitest.ini @@ -8,8 +8,9 @@ support-files = [test_bug287446.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #bug 947789 [test_bug345267.html] +skip-if = e10s [test_bug348236.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(select form control popup) b2g-debug(select form control popup) b2g-desktop(select form control popup) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(select form control popup) b2g-debug(select form control popup) b2g-desktop(select form control popup) [test_bug353539.html] [test_bug365410.html] [test_bug378670.html] @@ -22,7 +23,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(needs copy support) b2 [test_bug477531.html] [test_bug477700.html] [test_bug478219.xhtml] -skip-if = buildapp == 'b2g' || toolkit == 'android' #window.closed not working, bug 907795 # b2g(window.closed not working, bug 907795) b2g-debug(window.closed not working, bug 907795) b2g-desktop(window.closed not working, bug 907795) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #window.closed not working, bug 907795 # b2g(window.closed not working, bug 907795) b2g-debug(window.closed not working, bug 907795) b2g-desktop(window.closed not working, bug 907795) [test_bug534785.html] [test_bug542914.html] skip-if = (toolkit == 'gonk' && debug) #debug-only failure @@ -30,7 +31,7 @@ skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_bug562447.html] [test_bug563642.html] [test_bug564115.html] -skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || toolkit == 'android' #TIMED_OUT # b2g-debug(times out on window.open and focus event) b2g-desktop(times out on window.open and focus event) +skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || toolkit == 'android' || e10s #TIMED_OUT # b2g-debug(times out on window.open and focus event) b2g-desktop(times out on window.open and focus event) [test_bug571352.html] skip-if = buildapp == 'b2g' || toolkit == 'android' #TIMED_OUT # b2g(shift-click multi-select not working?) b2g-debug(shift-click multi-select not working?) b2g-desktop(shift-click multi-select not working?) [test_bug572406.html] @@ -46,7 +47,7 @@ skip-if = toolkit == 'android' [test_bug717878_input_scroll.html] [test_bug869314.html] [test_bug903715.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' #select elements don't use an in-page popup on Android # b2g(select elements don't use an in-page popup in B2G) b2g-debug(select elements don't use an in-page popup in B2G) b2g-desktop(select elements don't use an in-page popup in B2G) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #select elements don't use an in-page popup on Android # b2g(select elements don't use an in-page popup in B2G) b2g-debug(select elements don't use an in-page popup in B2G) b2g-desktop(select elements don't use an in-page popup in B2G) [test_bug935876.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Esc key is consumed by another event handler only on desktop B2G [test_bug957562.html] diff --git a/layout/generic/nsBRFrame.cpp b/layout/generic/nsBRFrame.cpp index 3cf28195cf89..3f954ec036be 100644 --- a/layout/generic/nsBRFrame.cpp +++ b/layout/generic/nsBRFrame.cpp @@ -28,10 +28,10 @@ public: virtual ContentOffsets CalcContentOffsetsFromFramePoint(nsPoint aPoint) MOZ_OVERRIDE; - virtual bool PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; - virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset, + virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; + virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters = true) MOZ_OVERRIDE; - virtual bool PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, + virtual FrameSearchResult PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState* aState) MOZ_OVERRIDE; @@ -211,7 +211,7 @@ nsIFrame::ContentOffsets BRFrame::CalcContentOffsetsFromFramePoint(nsPoint aPoin return offsets; } -bool +nsIFrame::FrameSearchResult BRFrame::PeekOffsetNoAmount(bool aForward, int32_t* aOffset) { NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range"); @@ -219,28 +219,28 @@ BRFrame::PeekOffsetNoAmount(bool aForward, int32_t* aOffset) // If we hit the end of a BR going backwards, go to its beginning and stay there. if (!aForward && startOffset != 0) { *aOffset = 0; - return true; + return FOUND; } // Otherwise, stop if we hit the beginning, continue (forward) if we hit the end. - return (startOffset == 0); + return (startOffset == 0) ? FOUND : CONTINUE; } -bool +nsIFrame::FrameSearchResult BRFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters) { NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range"); // Keep going. The actual line jumping will stop us. - return false; + return CONTINUE; } -bool +nsIFrame::FrameSearchResult BRFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState* aState) { NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range"); // Keep going. The actual line jumping will stop us. - return false; + return CONTINUE; } #ifdef ACCESSIBILITY diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index dc5e8724532b..580ca3ea7960 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -361,21 +361,21 @@ nsContainerFrame::IsLeaf() const return false; } -bool +nsIFrame::FrameSearchResult nsContainerFrame::PeekOffsetNoAmount(bool aForward, int32_t* aOffset) { NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range"); // Don't allow the caret to stay in an empty (leaf) container frame. - return false; + return CONTINUE_EMPTY; } -bool +nsIFrame::FrameSearchResult nsContainerFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters) { NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range"); // Don't allow the caret to stay in an empty (leaf) container frame. - return false; + return CONTINUE_EMPTY; } ///////////////////////////////////////////////////////////////////////////// diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index 7b37d887dff9..0dd1a282301b 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -68,8 +68,8 @@ public: virtual void ChildIsDirty(nsIFrame* aChild) MOZ_OVERRIDE; virtual bool IsLeaf() const MOZ_OVERRIDE; - virtual bool PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; - virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset, + virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; + virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters = true) MOZ_OVERRIDE; #ifdef DEBUG_FRAME_DUMP diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 5f56656b22f5..b68b4f8a5198 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -6269,20 +6269,23 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos) case eSelectCluster: { bool eatingNonRenderableWS = false; - bool done = false; + nsIFrame::FrameSearchResult peekSearchState = CONTINUE; bool jumpedLine = false; + bool movedOverNonSelectableText = false; - while (!done) { + while (peekSearchState != FOUND) { bool movingInFrameDirection = IsMovingInFrameDirection(current, aPos->mDirection, aPos->mVisual); if (eatingNonRenderableWS) - done = current->PeekOffsetNoAmount(movingInFrameDirection, &offset); + peekSearchState = current->PeekOffsetNoAmount(movingInFrameDirection, &offset); else - done = current->PeekOffsetCharacter(movingInFrameDirection, &offset, + peekSearchState = current->PeekOffsetCharacter(movingInFrameDirection, &offset, aPos->mAmount == eSelectCluster); - if (!done) { + movedOverNonSelectableText |= (peekSearchState == CONTINUE_UNSELECTABLE); + + if (peekSearchState != FOUND) { result = current->GetFrameFromDirection(aPos->mDirection, aPos->mVisual, aPos->mJumpLines, aPos->mScrollViewStop, @@ -6295,6 +6298,15 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos) if (jumpedLine) eatingNonRenderableWS = true; } + + // Found frame, but because we moved over non selectable text we want the offset + // to be at the frame edge. + if (peekSearchState == FOUND && movedOverNonSelectableText) + { + int32_t start, end; + current->GetOffsets(start, end); + offset = aPos->mDirection == eDirNext ? 0 : end - start; + } } // Set outputs @@ -6362,7 +6374,7 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos) IsMovingInFrameDirection(current, aPos->mDirection, aPos->mVisual); done = current->PeekOffsetWord(movingInFrameDirection, wordSelectEatSpace, - aPos->mIsKeyboardSelect, &offset, &state); + aPos->mIsKeyboardSelect, &offset, &state) == FOUND; if (!done) { nsIFrame* nextFrame; @@ -6577,15 +6589,15 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos) return NS_OK; } -bool +nsIFrame::FrameSearchResult nsFrame::PeekOffsetNoAmount(bool aForward, int32_t* aOffset) { NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range"); // Sure, we can stop right here. - return true; + return FOUND; } -bool +nsIFrame::FrameSearchResult nsFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters) { @@ -6598,12 +6610,12 @@ nsFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, // We're before the frame and moving forward, or after it and moving backwards: // skip to the other side and we're done. *aOffset = 1 - startOffset; - return true; + return FOUND; } - return false; + return CONTINUE; } -bool +nsIFrame::FrameSearchResult nsFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState* aState) { @@ -6620,11 +6632,11 @@ nsFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboar if (aState->mLastCharWasPunctuation) { // We're not punctuation, so this is a punctuation boundary. if (BreakWordBetweenPunctuation(aState, aForward, false, false, aIsKeyboardSelect)) - return true; + return FOUND; } else { // This is not a punctuation boundary. if (aWordSelectEatSpace && aState->mSawBeforeType) - return true; + return FOUND; } } // Otherwise skip to the other side and note that we encountered non-whitespace. @@ -6635,7 +6647,7 @@ nsFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboar if (!aWordSelectEatSpace) aState->SetSawBeforeType(); } - return false; + return CONTINUE; } bool diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index 0ff3583970a8..d859cc3ff5ee 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -204,10 +204,10 @@ public: virtual nsresult GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon) MOZ_OVERRIDE; - virtual bool PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; - virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset, + virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; + virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters = true) MOZ_OVERRIDE; - virtual bool PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, + virtual FrameSearchResult PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState *aState) MOZ_OVERRIDE; /** * Check whether we should break at a boundary between punctuation and diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index dd0b3262be51..25b7c8314425 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -439,6 +439,19 @@ public: * removal and destruction. */ void Destroy() { DestroyFrom(this); } + + /** Flags for PeekOffsetCharacter, PeekOffsetNoAmount, PeekOffsetWord return values. + */ + enum FrameSearchResult { + // Peek found a appropriate offset within frame. + FOUND = 0x00, + // try next frame for offset. + CONTINUE = 0x1, + // offset not found because the frame was empty of text. + CONTINUE_EMPTY = 0x2 | CONTINUE, + // offset not found because the frame didn't contain any text that could be selected. + CONTINUE_UNSELECTABLE = 0x4 | CONTINUE, + }; protected: /** @@ -3040,11 +3053,12 @@ protected: * @param aForward [in] Are we moving forward (or backward) in content order. * @param aOffset [in/out] At what offset into the frame to start looking. * on output - what offset was reached (whether or not we found a place to stop). - * @return true: An appropriate offset was found within this frame, + * @return STOP: An appropriate offset was found within this frame, * and is given by aOffset. - * false: Not found within this frame, need to try the next frame. + * CONTINUE: Not found within this frame, need to try the next frame. + * see enum FrameSearchResult for more details. */ - virtual bool PeekOffsetNoAmount(bool aForward, int32_t* aOffset) = 0; + virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) = 0; /** * Search the frame for the next character @@ -3054,11 +3068,12 @@ protected: * @param aRespectClusters [in] Whether to restrict result to valid cursor locations * (between grapheme clusters) - default TRUE maintains "normal" behavior, * FALSE is used for selection by "code unit" (instead of "character") - * @return true: An appropriate offset was found within this frame, + * @return STOP: An appropriate offset was found within this frame, * and is given by aOffset. - * false: Not found within this frame, need to try the next frame. + * CONTINUE: Not found within this frame, need to try the next frame. + * see enum FrameSearchResult for more details. */ - virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset, + virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters = true) = 0; /** @@ -3112,7 +3127,7 @@ protected: mAtStart = false; } }; - virtual bool PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, + virtual FrameSearchResult PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState* aState) = 0; /** diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index e06d7d4879da..d344871c9326 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -155,7 +155,7 @@ nsInlineFrame::IsEmpty() return true; } -bool +nsIFrame::FrameSearchResult nsInlineFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters) { @@ -169,7 +169,7 @@ nsInlineFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, // skip to the other side, but keep going. *aOffset = 1 - startOffset; } - return false; + return CONTINUE; } void diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h index 58cfe1804a4a..1a9899ea5bff 100644 --- a/layout/generic/nsInlineFrame.h +++ b/layout/generic/nsInlineFrame.h @@ -59,7 +59,7 @@ public: virtual bool IsEmpty() MOZ_OVERRIDE; virtual bool IsSelfEmpty() MOZ_OVERRIDE; - virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset, + virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters = true) MOZ_OVERRIDE; // nsIHTMLReflow overrides diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 410aecc0caaf..f0e21e747b7c 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -6505,19 +6505,19 @@ nsTextFrame::GetChildFrameContainingOffset(int32_t aContentOffset, return NS_OK; } -bool +nsIFrame::FrameSearchResult nsTextFrame::PeekOffsetNoAmount(bool aForward, int32_t* aOffset) { NS_ASSERTION(aOffset && *aOffset <= GetContentLength(), "aOffset out of range"); gfxSkipCharsIterator iter = EnsureTextRun(nsTextFrame::eInflated); if (!mTextRun) - return false; + return CONTINUE_EMPTY; TrimmedOffsets trimmed = GetTrimmedOffsets(mContent->GetText(), true); // Check whether there are nonskipped characters in the trimmmed range - return iter.ConvertOriginalToSkipped(trimmed.GetEnd()) > - iter.ConvertOriginalToSkipped(trimmed.mStart); + return (iter.ConvertOriginalToSkipped(trimmed.GetEnd()) > + iter.ConvertOriginalToSkipped(trimmed.mStart)) ? FOUND : CONTINUE; } /** @@ -6575,7 +6575,7 @@ IsAcceptableCaretPosition(const gfxSkipCharsIterator& aIter, return true; } -bool +nsIFrame::FrameSearchResult nsTextFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters) { @@ -6586,11 +6586,11 @@ nsTextFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, uint8_t selectStyle; IsSelectable(&selectable, &selectStyle); if (selectStyle == NS_STYLE_USER_SELECT_ALL) - return false; + return CONTINUE_UNSELECTABLE; gfxSkipCharsIterator iter = EnsureTextRun(nsTextFrame::eInflated); if (!mTextRun) - return false; + return CONTINUE_EMPTY; TrimmedOffsets trimmed = GetTrimmedOffsets(mContent->GetText(), false); @@ -6604,7 +6604,7 @@ nsTextFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, iter.SetOriginalOffset(i); if (IsAcceptableCaretPosition(iter, aRespectClusters, mTextRun, this)) { *aOffset = i - mContentOffset; - return true; + return FOUND; } } *aOffset = 0; @@ -6621,14 +6621,14 @@ nsTextFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, if (i == trimmed.GetEnd() || IsAcceptableCaretPosition(iter, aRespectClusters, mTextRun, this)) { *aOffset = i - mContentOffset; - return true; + return FOUND; } } } *aOffset = contentLength; } - return false; + return CONTINUE; } bool @@ -6746,7 +6746,7 @@ ClusterIterator::ClusterIterator(nsTextFrame* aTextFrame, int32_t aPosition, } } -bool +nsIFrame::FrameSearchResult nsTextFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState* aState) { @@ -6757,13 +6757,13 @@ nsTextFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKey uint8_t selectStyle; IsSelectable(&selectable, &selectStyle); if (selectStyle == NS_STYLE_USER_SELECT_ALL) - return false; + return CONTINUE_UNSELECTABLE; int32_t offset = GetContentOffset() + (*aOffset < 0 ? contentLength : *aOffset); ClusterIterator cIter(this, offset, aForward ? 1 : -1, aState->mContext); if (!cIter.NextCluster()) - return false; + return CONTINUE_EMPTY; do { bool isPunctuation = cIter.IsPunctuation(); @@ -6794,14 +6794,14 @@ nsTextFrame::PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKey } if (canBreak) { *aOffset = cIter.GetBeforeOffset() - mContentOffset; - return true; + return FOUND; } } aState->Update(isPunctuation, isWhitespace); } while (cIter.NextCluster()); *aOffset = cIter.GetAfterOffset() - mContentOffset; - return false; + return CONTINUE; } // TODO this needs to be deCOMtaminated with the interface fixed in @@ -6819,7 +6819,7 @@ nsTextFrame::CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, for (nsTextFrame* f = this; f; f = static_cast(GetNextContinuation())) { int32_t dummyOffset = 0; - if (f->PeekOffsetNoAmount(true, &dummyOffset)) { + if (f->PeekOffsetNoAmount(true, &dummyOffset) == FOUND) { *aRetval = true; return NS_OK; } diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 4fe523aedac1..a3b6fd98a717 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -140,10 +140,10 @@ public: void SetSelectedRange(uint32_t aStart, uint32_t aEnd, bool aSelected, SelectionType aType); - virtual bool PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; - virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset, + virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE; + virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, bool aRespectClusters = true) MOZ_OVERRIDE; - virtual bool PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, + virtual FrameSearchResult PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect, int32_t* aOffset, PeekWordState* aState) MOZ_OVERRIDE; virtual nsresult CheckVisibility(nsPresContext* aContext, int32_t aStartIndex, int32_t aEndIndex, bool aRecurse, bool *aFinished, bool *_retval) MOZ_OVERRIDE; diff --git a/layout/generic/test/mochitest.ini b/layout/generic/test/mochitest.ini index b3f4dcf12e3d..1a91145d3866 100644 --- a/layout/generic/test/mochitest.ini +++ b/layout/generic/test/mochitest.ini @@ -92,12 +92,13 @@ skip-if = buildapp == 'b2g' # b2g(Target should not have scrolled - got 114.1000 [test_bug841361.html] [test_bug904810.html] [test_bug938772.html] +[test_bug970363.html] [test_contained_plugin_transplant.html] -skip-if = os=='win' +skip-if = os=='win' || e10s [test_image_selection.html] [test_image_selection_2.html] [test_invalidate_during_plugin_paint.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) [test_movement_by_characters.html] [test_movement_by_words.html] # Disable the caret movement by word test on Linux because the shortcut keys @@ -108,18 +109,19 @@ skip-if = (toolkit == "gtk2") || (toolkit == "gtk3") || (os == "win") skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(opened window too small?) b2g-desktop(opened window too small?) support-files = page_scroll_with_fixed_pos_window.html [test_plugin_clipping.xhtml] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_plugin_clipping2.xhtml] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_plugin_clipping_transformed.xhtml] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_plugin_clipping_table.xhtml] -skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || e10s #Bug 931116, b2g desktop specific, initial triage [test_plugin_focus.html] -skip-if = buildapp == 'b2g' # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) +skip-if = buildapp == 'b2g' || e10s # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) [test_plugin_mouse_coords.html] -skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) +skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) [test_plugin_position.xhtml] +skip-if = e10s [test_selection_expanding.html] skip-if = buildapp == 'b2g' # b2g(mouse selection not working) b2g-debug(mouse selection not working) b2g-desktop(mouse selection not working) support-files = selection_expanding_xbl.xml diff --git a/layout/generic/test/test_bug970363.html b/layout/generic/test/test_bug970363.html new file mode 100644 index 000000000000..e0ac0370aca6 --- /dev/null +++ b/layout/generic/test/test_bug970363.html @@ -0,0 +1,51 @@ + + + + + + Test for Bug 970363 + + + + + +Mozilla Bug 970363 +

+ +
+
SreadonlyE
+
+
+
+ 
+
+
+ + diff --git a/layout/reftests/bugs/359903-2-ref.html b/layout/reftests/bugs/359903-2-ref.html index 94bf5a2912fd..9cc839f4c37d 100644 --- a/layout/reftests/bugs/359903-2-ref.html +++ b/layout/reftests/bugs/359903-2-ref.html @@ -3,7 +3,7 @@ diff --git a/layout/reftests/bugs/359903-2.html b/layout/reftests/bugs/359903-2.html index d113e4ea5c6a..ca66ab7fd76c 100644 --- a/layout/reftests/bugs/359903-2.html +++ b/layout/reftests/bugs/359903-2.html @@ -3,7 +3,7 @@ diff --git a/layout/reftests/bugs/983084-1-ref.html b/layout/reftests/bugs/983084-1-ref.html new file mode 100644 index 000000000000..6c808407ae24 --- /dev/null +++ b/layout/reftests/bugs/983084-1-ref.html @@ -0,0 +1,6 @@ + + +
+
+ + diff --git a/layout/reftests/bugs/983084-1.html b/layout/reftests/bugs/983084-1.html new file mode 100644 index 000000000000..486196d1faba --- /dev/null +++ b/layout/reftests/bugs/983084-1.html @@ -0,0 +1,17 @@ + + + + + +
+
+ + diff --git a/layout/reftests/bugs/983084-2-ref.html b/layout/reftests/bugs/983084-2-ref.html new file mode 100644 index 000000000000..2f7d3b12ed30 --- /dev/null +++ b/layout/reftests/bugs/983084-2-ref.html @@ -0,0 +1,6 @@ + + +
+
+ + diff --git a/layout/reftests/bugs/983084-2.html b/layout/reftests/bugs/983084-2.html new file mode 100644 index 000000000000..f4012757a027 --- /dev/null +++ b/layout/reftests/bugs/983084-2.html @@ -0,0 +1,24 @@ + + + + + + +
+
+ + diff --git a/layout/reftests/bugs/983084-3.html b/layout/reftests/bugs/983084-3.html new file mode 100644 index 000000000000..931a78d16fd3 --- /dev/null +++ b/layout/reftests/bugs/983084-3.html @@ -0,0 +1,24 @@ + + + + + + +
+
+ + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 540a669e4cf9..082fc93d7db9 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1799,3 +1799,6 @@ pref(layout.css.overflow-clip-box.enabled,true) fuzzy(50,10) == 966992-1.html 96 skip-if(Android) == 966510-1.html 966510-1-ref.html # scrollable elements other than the root probably won't work well on android until bug 776030 is fixed skip-if(Android) == 966510-2.html 966510-2-ref.html # same as above == 978911-1.svg 978911-1-ref.svg +== 983084-1.html 983084-1-ref.html +== 983084-2.html 983084-2-ref.html +== 983084-3.html 983084-1-ref.html diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index b35e0b98081f..e8ac7646338a 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -2493,7 +2493,15 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const nsChangeHint_RepaintFrame)); if (mOpacity != aOther.mOpacity) { - NS_UpdateHint(hint, nsChangeHint_UpdateOpacityLayer); + // If we're going from the optimized >=0.99 opacity value to 1.0 or back, then + // repaint the frame because DLBI will not catch the invalidation. Otherwise, + // just update the opacity layer. + if ((mOpacity >= 0.99f && mOpacity < 1.0f && aOther.mOpacity == 1.0f) || + (aOther.mOpacity >= 0.99f && aOther.mOpacity < 1.0f && mOpacity == 1.0f)) { + NS_UpdateHint(hint, nsChangeHint_RepaintFrame); + } else { + NS_UpdateHint(hint, nsChangeHint_UpdateOpacityLayer); + } } /* If we've added or removed the transform property, we need to reconstruct the frame to add diff --git a/layout/style/test/mochitest.ini b/layout/style/test/mochitest.ini index 9a4d86048185..bb1fc01b4378 100644 --- a/layout/style/test/mochitest.ini +++ b/layout/style/test/mochitest.ini @@ -160,7 +160,7 @@ support-files = file_position_sticky.html [test_priority_preservation.html] [test_property_syntax_errors.html] [test_pseudoelement_state.html] -skip-if = (toolkit == 'gonk' && debug) #debug-only failure +skip-if = (toolkit == 'gonk' && debug) || e10s #debug-only failure [test_pseudoelement_parsing.html] [test_redundant_font_download.html] support-files = redundant_font_download.sjs diff --git a/media/libcubeb/src/Makefile.in b/media/libcubeb/src/Makefile.in index fd2b8db6097a..4c14494a344d 100644 --- a/media/libcubeb/src/Makefile.in +++ b/media/libcubeb/src/Makefile.in @@ -9,8 +9,3 @@ CFLAGS += \ $(MOZ_ALSA_CFLAGS) \ $(MOZ_PULSEAUDIO_CFLAGS) \ $(NULL) - -ifeq ($(MOZ_WIDGET_TOOLKIT),gonk) -LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/frameworks/wilhelm/include \ - -I$(ANDROID_SOURCE)/system/media/wilhelm/include -endif diff --git a/media/libcubeb/src/moz.build b/media/libcubeb/src/moz.build index 46d79adb0a14..507360b84fda 100644 --- a/media/libcubeb/src/moz.build +++ b/media/libcubeb/src/moz.build @@ -59,3 +59,11 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']: NO_VISIBILITY_FLAGS = True FINAL_LIBRARY = 'gkmedias' + +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': + CFLAGS += [ + '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ + 'frameworks/wilhelm/include', + 'system/media/wilhelm/include', + ] + ] diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_socket.c b/media/mtransport/third_party/nICEr/src/ice/ice_socket.c index 0b0b3d95c083..c72d1bbaadb7 100644 --- a/media/mtransport/third_party/nICEr/src/ice/ice_socket.c +++ b/media/mtransport/third_party/nICEr/src/ice/ice_socket.c @@ -81,7 +81,7 @@ static void nr_ice_socket_readable_cb(NR_SOCKET s, int how, void *cb_arg) #ifdef USE_TURN re_process: #endif /* USE_TURN */ - r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): Read %d bytes from %s",sock->ctx->label,len,addr.as_string); + r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): Read %d bytes %sfrom %s",sock->ctx->label,len,(processed_indication ? "relayed " : ""),addr.as_string); /* First question: is this STUN or not? */ is_stun=nr_is_stun_message(buf,len); diff --git a/mobile/android/base/background/announcements/AnnouncementsConstants.java.in b/mobile/android/base/background/announcements/AnnouncementsConstants.java.in index 41f9e5ed73ca..f782f64e1109 100644 --- a/mobile/android/base/background/announcements/AnnouncementsConstants.java.in +++ b/mobile/android/base/background/announcements/AnnouncementsConstants.java.in @@ -45,6 +45,6 @@ public class AnnouncementsConstants { public static long LATEST_ACCEPTED_LAUNCH_TIMESTAMP_MSEC = GlobalConstants.BUILD_TIMESTAMP_MSEC + 4 * 365 * MILLISECONDS_PER_DAY; - public static String ANNOUNCE_USER_AGENT = "Firefox Announcements " + GlobalConstants.MOZ_APP_VERSION; + public static String USER_AGENT = "Firefox Announcements " + GlobalConstants.MOZ_APP_VERSION; public static String ANNOUNCE_CHANNEL = GlobalConstants.MOZ_UPDATE_CHANNEL.replace("default", GlobalConstants.MOZ_OFFICIAL_BRANDING ? "release" : "dev"); } diff --git a/mobile/android/base/background/announcements/AnnouncementsFetchResourceDelegate.java b/mobile/android/base/background/announcements/AnnouncementsFetchResourceDelegate.java index 764bf9eaec06..c110e43e52ef 100644 --- a/mobile/android/base/background/announcements/AnnouncementsFetchResourceDelegate.java +++ b/mobile/android/base/background/announcements/AnnouncementsFetchResourceDelegate.java @@ -46,12 +46,16 @@ public class AnnouncementsFetchResourceDelegate extends BaseResourceDelegate { this.delegate = delegate; } + @Override + public String getUserAgent() { + return delegate.getUserAgent(); + } + @Override public void addHeaders(HttpRequestBase request, DefaultHttpClient client) { super.addHeaders(request, client); // The basics. - request.addHeader("User-Agent", delegate.getUserAgent()); request.addHeader("Accept-Language", delegate.getLocale().toString()); request.addHeader("Accept", ACCEPT_HEADER); @@ -176,4 +180,4 @@ public class AnnouncementsFetchResourceDelegate extends BaseResourceDelegate { public AuthHeaderProvider getAuthHeaderProvider() { return null; } -} \ No newline at end of file +} diff --git a/mobile/android/base/background/announcements/AnnouncementsService.java b/mobile/android/base/background/announcements/AnnouncementsService.java index f369fe63bc22..dd7798c2994a 100644 --- a/mobile/android/base/background/announcements/AnnouncementsService.java +++ b/mobile/android/base/background/announcements/AnnouncementsService.java @@ -167,6 +167,7 @@ public class AnnouncementsService extends BackgroundService implements Announcem this.getSharedPreferences().edit().putLong(AnnouncementsConstants.PREF_LAST_FETCH_LOCAL_TIME, fetch).commit(); } + @Override public long getLastFetch() { return this.getSharedPreferences().getLong(AnnouncementsConstants.PREF_LAST_FETCH_LOCAL_TIME, 0L); } @@ -225,7 +226,7 @@ public class AnnouncementsService extends BackgroundService implements Announcem @Override public String getUserAgent() { - return AnnouncementsConstants.ANNOUNCE_USER_AGENT; + return AnnouncementsConstants.USER_AGENT; } protected void persistTimes(long fetched, String date) { diff --git a/mobile/android/base/background/bagheera/BagheeraClient.java b/mobile/android/base/background/bagheera/BagheeraClient.java index 8c6e55d96a73..f8a3d6c4e576 100644 --- a/mobile/android/base/background/bagheera/BagheeraClient.java +++ b/mobile/android/base/background/bagheera/BagheeraClient.java @@ -166,6 +166,11 @@ public class BagheeraClient { this.delegate = delegate; } + @Override + public String getUserAgent() { + return delegate.getUserAgent(); + } + @Override public int socketTimeout() { return DEFAULT_SOCKET_TIMEOUT_MSEC; diff --git a/mobile/android/base/background/bagheera/BagheeraRequestDelegate.java b/mobile/android/base/background/bagheera/BagheeraRequestDelegate.java index dc80c9ed2425..19a45dcc32ba 100644 --- a/mobile/android/base/background/bagheera/BagheeraRequestDelegate.java +++ b/mobile/android/base/background/bagheera/BagheeraRequestDelegate.java @@ -10,4 +10,6 @@ public interface BagheeraRequestDelegate { void handleSuccess(int status, String namespace, String id, HttpResponse response); void handleError(Exception e); void handleFailure(int status, String namespace, HttpResponse response); + + public String getUserAgent(); } diff --git a/mobile/android/base/background/fxa/FxAccountClient10.java b/mobile/android/base/background/fxa/FxAccountClient10.java index 26066e60f575..639d6d0e2b79 100644 --- a/mobile/android/base/background/fxa/FxAccountClient10.java +++ b/mobile/android/base/background/fxa/FxAccountClient10.java @@ -20,6 +20,7 @@ import javax.crypto.Mac; import org.json.simple.JSONObject; import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientMalformedResponseException; import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientRemoteException; +import org.mozilla.gecko.fxa.FxAccountConstants; import org.mozilla.gecko.sync.ExtendedJSONObject; import org.mozilla.gecko.sync.Utils; import org.mozilla.gecko.sync.crypto.HKDF; @@ -205,6 +206,11 @@ public class FxAccountClient10 { return super.getAuthHeaderProvider(); } + @Override + public String getUserAgent() { + return FxAccountConstants.USER_AGENT; + } + @Override public void handleHttpResponse(HttpResponse response) { try { diff --git a/mobile/android/base/background/fxa/FxAccountUtils.java b/mobile/android/base/background/fxa/FxAccountUtils.java index a82e748211f4..f1498cf90fc5 100644 --- a/mobile/android/base/background/fxa/FxAccountUtils.java +++ b/mobile/android/base/background/fxa/FxAccountUtils.java @@ -12,12 +12,16 @@ import java.security.GeneralSecurityException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; +import org.mozilla.gecko.background.common.log.Logger; +import org.mozilla.gecko.background.nativecode.NativeCrypto; import org.mozilla.gecko.sync.Utils; import org.mozilla.gecko.sync.crypto.HKDF; import org.mozilla.gecko.sync.crypto.KeyBundle; import org.mozilla.gecko.sync.crypto.PBKDF2; public class FxAccountUtils { + private static final String LOG_TAG = FxAccountUtils.class.getSimpleName(); + public static final int SALT_LENGTH_BYTES = 32; public static final int SALT_LENGTH_HEX = 2 * SALT_LENGTH_BYTES; @@ -106,7 +110,13 @@ public class FxAccountUtils { */ public static byte[] generateQuickStretchedPW(byte[] emailUTF8, byte[] passwordUTF8) throws GeneralSecurityException, UnsupportedEncodingException { byte[] S = FxAccountUtils.KWE("quickStretch", emailUTF8); - return PBKDF2.pbkdf2SHA256(passwordUTF8, S, NUMBER_OF_QUICK_STRETCH_ROUNDS, 32); + try { + return NativeCrypto.pbkdf2SHA256(passwordUTF8, S, NUMBER_OF_QUICK_STRETCH_ROUNDS, 32); + } catch (Throwable t) { + // Important to catch Throwable's; we expressly want to catch UnsatisfiedLinkError instances. + Logger.warn(LOG_TAG, "Got throwable stretching password using native pbkdf2SHA256 implementation; ignoring and using Java implementation.", t); + return PBKDF2.pbkdf2SHA256(passwordUTF8, S, NUMBER_OF_QUICK_STRETCH_ROUNDS, 32); + } } /** diff --git a/mobile/android/base/background/healthreport/HealthReportConstants.java.in b/mobile/android/base/background/healthreport/HealthReportConstants.java.in index 3c74bd4fb416..f91ca2a999ec 100644 --- a/mobile/android/base/background/healthreport/HealthReportConstants.java.in +++ b/mobile/android/base/background/healthreport/HealthReportConstants.java.in @@ -11,6 +11,8 @@ public class HealthReportConstants { public static final String HEALTH_AUTHORITY = "@ANDROID_PACKAGE_NAME@.health"; public static final String GLOBAL_LOG_TAG = "GeckoHealth"; + public static final String USER_AGENT = "Firefox-Android-HealthReport/ (" + GlobalConstants.MOZ_APP_DISPLAYNAME + " " + GlobalConstants.MOZ_APP_VERSION + ")"; + /** * The earliest allowable value for the last ping time, corresponding to May 2nd 2013. * Used for sanity checks. diff --git a/mobile/android/base/background/healthreport/upload/AndroidSubmissionClient.java b/mobile/android/base/background/healthreport/upload/AndroidSubmissionClient.java index fdf82c6cee9f..67a19d743aba 100644 --- a/mobile/android/base/background/healthreport/upload/AndroidSubmissionClient.java +++ b/mobile/android/base/background/healthreport/upload/AndroidSubmissionClient.java @@ -204,6 +204,11 @@ public class AndroidSubmissionClient implements SubmissionClient { this.id = id; } + @Override + public String getUserAgent() { + return HealthReportConstants.USER_AGENT; + } + @Override public void handleSuccess(int status, String namespace, String id, HttpResponse response) { BaseResource.consumeEntity(response); diff --git a/mobile/android/base/browserid/verifier/BrowserIDRemoteVerifierClient.java b/mobile/android/base/browserid/verifier/BrowserIDRemoteVerifierClient.java index a07eb5fcea60..14109498bb35 100644 --- a/mobile/android/base/browserid/verifier/BrowserIDRemoteVerifierClient.java +++ b/mobile/android/base/browserid/verifier/BrowserIDRemoteVerifierClient.java @@ -9,7 +9,6 @@ import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.security.GeneralSecurityException; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -37,6 +36,11 @@ public class BrowserIDRemoteVerifierClient implements BrowserIDVerifierClient { this.delegate = delegate; } + @Override + public String getUserAgent() { + return null; + } + @Override public void handleHttpResponse(HttpResponse response) { SyncResponse res = new SyncResponse(response); diff --git a/mobile/android/base/fxa/FxAccountConstants.java.in b/mobile/android/base/fxa/FxAccountConstants.java.in index c6ece3af247a..096c0f2d0c53 100644 --- a/mobile/android/base/fxa/FxAccountConstants.java.in +++ b/mobile/android/base/fxa/FxAccountConstants.java.in @@ -5,6 +5,7 @@ package org.mozilla.gecko.fxa; +import org.mozilla.gecko.background.common.GlobalConstants; import org.mozilla.gecko.background.common.log.Logger; public class FxAccountConstants { @@ -31,4 +32,6 @@ public class FxAccountConstants { // You must wait 15 minutes after failing an age check before trying to create a different account. public static final long MINIMUM_TIME_TO_WAIT_AFTER_AGE_CHECK_FAILED_IN_MILLISECONDS = 15 * 60 * 1000; + + public static final String USER_AGENT = "Firefox-Android-FxAccounts/ (" + GlobalConstants.MOZ_APP_DISPLAYNAME + " " + GlobalConstants.MOZ_APP_VERSION + ")"; } diff --git a/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java b/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java index dfe0d88186fe..403a7f2dcdef 100644 --- a/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java +++ b/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java @@ -14,6 +14,7 @@ import org.mozilla.gecko.background.fxa.FxAccountClient20.LoginResponse; import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientRemoteException; import org.mozilla.gecko.background.fxa.FxAccountUtils; import org.mozilla.gecko.background.fxa.PasswordStretcher; +import org.mozilla.gecko.background.fxa.QuickPasswordStretcher; import org.mozilla.gecko.fxa.FxAccountConstants; import org.mozilla.gecko.fxa.activities.FxAccountSetupTask.ProgressDisplay; import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount; @@ -26,7 +27,6 @@ import org.mozilla.gecko.sync.setup.activities.ActivityUtils; import android.accounts.AccountManager; import android.content.Intent; import android.text.Editable; -import android.text.InputType; import android.text.TextWatcher; import android.text.method.PasswordTransformationMethod; import android.text.method.SingleLineTransformationMethod; @@ -303,4 +303,13 @@ abstract public class FxAccountAbstractSetupActivity extends FxAccountAbstractAc finish(); } } + + /** + * Factory function that produces a new PasswordStretcher instance. + * + * @return PasswordStretcher instance. + */ + protected PasswordStretcher makePasswordStretcher(String password) { + return new QuickPasswordStretcher(password); + } } diff --git a/mobile/android/base/fxa/activities/FxAccountCreateAccountActivity.java b/mobile/android/base/fxa/activities/FxAccountCreateAccountActivity.java index 2cab5acace7e..9d94e1709ce0 100644 --- a/mobile/android/base/fxa/activities/FxAccountCreateAccountActivity.java +++ b/mobile/android/base/fxa/activities/FxAccountCreateAccountActivity.java @@ -20,7 +20,6 @@ import org.mozilla.gecko.background.fxa.FxAccountClient20; import org.mozilla.gecko.background.fxa.FxAccountClient20.LoginResponse; import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientRemoteException; import org.mozilla.gecko.background.fxa.PasswordStretcher; -import org.mozilla.gecko.background.fxa.QuickPasswordStretcher; import org.mozilla.gecko.fxa.FxAccountConstants; import org.mozilla.gecko.fxa.activities.FxAccountSetupTask.FxAccountCreateAccountTask; @@ -196,7 +195,7 @@ public class FxAccountCreateAccountActivity extends FxAccountAbstractSetupActivi final AlertDialog dialog = new AlertDialog.Builder(FxAccountCreateAccountActivity.this) .setTitle(R.string.fxaccount_create_account_year_of_birth) .setItems(yearItems, listener) - .setIcon(R.drawable.fxaccount_icon) + .setIcon(R.drawable.icon) .create(); dialog.show(); @@ -206,7 +205,7 @@ public class FxAccountCreateAccountActivity extends FxAccountAbstractSetupActivi public void createAccount(String email, String password, Map engines) { String serverURI = FxAccountConstants.DEFAULT_AUTH_SERVER_ENDPOINT; - PasswordStretcher passwordStretcher = new QuickPasswordStretcher(password); + PasswordStretcher passwordStretcher = makePasswordStretcher(password); // This delegate creates a new Android account on success, opens the // appropriate "success!" activity, and finishes this activity. RequestDelegate delegate = new AddAccountDelegate(email, passwordStretcher, serverURI, engines) { diff --git a/mobile/android/base/fxa/activities/FxAccountSignInActivity.java b/mobile/android/base/fxa/activities/FxAccountSignInActivity.java index 698e0c6d9643..733df255f731 100644 --- a/mobile/android/base/fxa/activities/FxAccountSignInActivity.java +++ b/mobile/android/base/fxa/activities/FxAccountSignInActivity.java @@ -15,7 +15,6 @@ import org.mozilla.gecko.background.fxa.FxAccountClient20; import org.mozilla.gecko.background.fxa.FxAccountClient20.LoginResponse; import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientRemoteException; import org.mozilla.gecko.background.fxa.PasswordStretcher; -import org.mozilla.gecko.background.fxa.QuickPasswordStretcher; import org.mozilla.gecko.fxa.FxAccountConstants; import org.mozilla.gecko.fxa.activities.FxAccountSetupTask.FxAccountSignInTask; import org.mozilla.gecko.sync.setup.activities.ActivityUtils; @@ -103,7 +102,7 @@ public class FxAccountSignInActivity extends FxAccountAbstractSetupActivity { public void signIn(String email, String password) { String serverURI = FxAccountConstants.DEFAULT_AUTH_SERVER_ENDPOINT; - PasswordStretcher passwordStretcher = new QuickPasswordStretcher(password); + PasswordStretcher passwordStretcher = makePasswordStretcher(password); // This delegate creates a new Android account on success, opens the // appropriate "success!" activity, and finishes this activity. RequestDelegate delegate = new AddAccountDelegate(email, passwordStretcher, serverURI) { diff --git a/mobile/android/base/fxa/activities/FxAccountUpdateCredentialsActivity.java b/mobile/android/base/fxa/activities/FxAccountUpdateCredentialsActivity.java index 280edb9a1a70..4fef6ae5c495 100644 --- a/mobile/android/base/fxa/activities/FxAccountUpdateCredentialsActivity.java +++ b/mobile/android/base/fxa/activities/FxAccountUpdateCredentialsActivity.java @@ -16,7 +16,6 @@ import org.mozilla.gecko.background.fxa.FxAccountClient20.LoginResponse; import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientRemoteException; import org.mozilla.gecko.background.fxa.FxAccountUtils; import org.mozilla.gecko.background.fxa.PasswordStretcher; -import org.mozilla.gecko.background.fxa.QuickPasswordStretcher; import org.mozilla.gecko.fxa.FxAccountConstants; import org.mozilla.gecko.fxa.activities.FxAccountSetupTask.FxAccountSignInTask; import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount; @@ -157,7 +156,7 @@ public class FxAccountUpdateCredentialsActivity extends FxAccountAbstractSetupAc String serverURI = fxAccount.getAccountServerURI(); Executor executor = Executors.newSingleThreadExecutor(); FxAccountClient client = new FxAccountClient20(serverURI, executor); - PasswordStretcher passwordStretcher = new QuickPasswordStretcher(password); + PasswordStretcher passwordStretcher = makePasswordStretcher(password); try { hideRemoteError(); RequestDelegate delegate = new UpdateCredentialsDelegate(email, passwordStretcher, serverURI); diff --git a/mobile/android/base/fxa/sync/FxAccountSyncAdapter.java b/mobile/android/base/fxa/sync/FxAccountSyncAdapter.java index 645e52fc31b0..7802d3cb45d8 100644 --- a/mobile/android/base/fxa/sync/FxAccountSyncAdapter.java +++ b/mobile/android/base/fxa/sync/FxAccountSyncAdapter.java @@ -297,6 +297,11 @@ public class FxAccountSyncAdapter extends AbstractThreadedSyncAdapter { final TokenServerClientDelegate delegate = new TokenServerClientDelegate() { private boolean didReceiveBackoff = false; + @Override + public String getUserAgent() { + return FxAccountConstants.USER_AGENT; + } + @Override public void handleSuccess(final TokenServerToken token) { FxAccountConstants.pii(LOG_TAG, "Got token! uid is " + token.uid + " and endpoint is " + token.endpoint + "."); diff --git a/mobile/android/base/locales/en-US/sync_strings.dtd b/mobile/android/base/locales/en-US/sync_strings.dtd index 2fc5e8d49a2d..31d09b44d5f8 100644 --- a/mobile/android/base/locales/en-US/sync_strings.dtd +++ b/mobile/android/base/locales/en-US/sync_strings.dtd @@ -105,7 +105,7 @@ - + + @@ -130,12 +135,12 @@ - + etc). The account remains a "Firefox Account". --> + - + @@ -147,7 +152,7 @@ - + @@ -166,7 +171,7 @@ - + @@ -178,16 +183,22 @@ + + + + itself for a Firefox Account. Don't localize this. --> + Account. --> @@ -208,5 +219,5 @@ + with the Firefox Account's email address. --> diff --git a/mobile/android/base/resources/drawable-hdpi/fxaccount_icon.png b/mobile/android/base/resources/drawable-hdpi/fxaccount_icon.png deleted file mode 100755 index 131f05dd288a..000000000000 Binary files a/mobile/android/base/resources/drawable-hdpi/fxaccount_icon.png and /dev/null differ diff --git a/mobile/android/base/resources/drawable-hdpi/fxaccount_intro.png b/mobile/android/base/resources/drawable-hdpi/fxaccount_intro.png old mode 100755 new mode 100644 index dba656bd09b8..2f3868bb9dc4 Binary files a/mobile/android/base/resources/drawable-hdpi/fxaccount_intro.png and b/mobile/android/base/resources/drawable-hdpi/fxaccount_intro.png differ diff --git a/mobile/android/base/resources/drawable-ldpi/fxaccount_intro.png b/mobile/android/base/resources/drawable-ldpi/fxaccount_intro.png new file mode 100644 index 000000000000..5599f931a917 Binary files /dev/null and b/mobile/android/base/resources/drawable-ldpi/fxaccount_intro.png differ diff --git a/mobile/android/base/resources/drawable-mdpi/fxaccount_icon.png b/mobile/android/base/resources/drawable-mdpi/fxaccount_icon.png deleted file mode 100644 index b6e7595e0bf7..000000000000 Binary files a/mobile/android/base/resources/drawable-mdpi/fxaccount_icon.png and /dev/null differ diff --git a/mobile/android/base/resources/drawable-mdpi/fxaccount_intro.png b/mobile/android/base/resources/drawable-mdpi/fxaccount_intro.png index 983d8a654a4d..89caec5c1311 100644 Binary files a/mobile/android/base/resources/drawable-mdpi/fxaccount_intro.png and b/mobile/android/base/resources/drawable-mdpi/fxaccount_intro.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi/fxaccount_intro.png b/mobile/android/base/resources/drawable-xhdpi/fxaccount_intro.png new file mode 100644 index 000000000000..d734d8be45d0 Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi/fxaccount_intro.png differ diff --git a/mobile/android/base/resources/layout/fxaccount_create_account.xml b/mobile/android/base/resources/layout/fxaccount_create_account.xml index d339e770faf0..f56dae6b68dd 100644 --- a/mobile/android/base/resources/layout/fxaccount_create_account.xml +++ b/mobile/android/base/resources/layout/fxaccount_create_account.xml @@ -43,6 +43,8 @@ style="@style/FxAccountLinkifiedItem" android:layout_marginBottom="0dp" android:layout_marginTop="10dp" + android:layout_marginLeft="10dp" + android:layout_marginRight="10dp" android:text="@string/fxaccount_create_account_policy_text" android:textColorLink="@color/fxaccount_linkified_textColorLinkSubdued" /> @@ -56,11 +58,7 @@ + style="@style/FxAccountProgress" />