Merge mozilla-central to b2g-inbound

This commit is contained in:
Carsten "Tomcat" Book 2014-03-14 12:43:37 +01:00
Родитель 55bdc27c28 36c4f3f93d
Коммит dba6443bb5
303 изменённых файлов: 2885 добавлений и 1444 удалений

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

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

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

@ -404,14 +404,9 @@
<image class="sync-panel-icon"/>
<vbox class="sync-panel-inner">
<description id="sync-start-panel-title"
value="&syncStartPanel.heading;"/>
<description id="sync-start-panel-subtitle">
#ifdef XP_UNIX
&syncStartPanel.subTitleUnix;
#else
&syncStartPanel.subTitle;
#endif
</description>
value="&syncStartPanel2.heading;"/>
<description id="sync-start-panel-subtitle"
value="&syncStartPanel2.subTitle;"/>
</vbox>
</hbox>
</panel>

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

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

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

@ -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);
}
]]></body>
</method>
@ -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);
}
]]></body>
</method>

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

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

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

@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || e10s
support-files =
audio.ogg
bug364677-data.xml

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

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

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

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

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

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

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

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

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

@ -207,4 +207,5 @@ registerCleanupFunction(function() {
gDebuggee = null;
gPanel = null;
gDebugger = null;
gVariables = null;
});

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -18,24 +18,21 @@ function test() {
waitForFocus(setupTest, content);
}, true);
content.location = "data:text/html,<h1>foo</h1><h2>bar</h2>";
content.location = "data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>";
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() {

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

@ -91,7 +91,7 @@ function test()
}
function finishUp() {
doc = nodes = null;
doc = nodes = inspector = null;
gBrowser.removeCurrentTab();
finish();
}

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

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

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

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

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

@ -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,<p>bug 699308 - test iframe navigation" +
"<iframe src='data:text/html,hello world'></iframe>";
content.location = "data:text/html;charset=utf-8," +
"<p>bug 699308 - test iframe navigation</p>" +
"<iframe src='data:text/html;charset=utf-8,hello world'></iframe>";
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -30,31 +30,31 @@
<div id="main">
<div id="margins" tooltip="&margins.tooltip;">
<div id="borders" tooltip="&borders.tooltip;">
<div id="padding" tooltip="&padding.tooltip;">
<div id="content" tooltip="&content.tooltip;">
<div id="margins" data-box="margin" tooltip="&margins.tooltip;">
<div id="borders" data-box="border" tooltip="&borders.tooltip;">
<div id="padding" data-box="padding" tooltip="&padding.tooltip;">
<div id="content" data-box="content" tooltip="&content.tooltip;">
</div>
</div>
</div>
</div>
<p class="border top"><span tooltip="border-top"></span></p>
<p class="border right"><span tooltip="border-right"></span></p>
<p class="border bottom"><span tooltip="border-bottom"></span></p>
<p class="border left"><span tooltip="border-left"></span></p>
<p class="border top"><span data-box="border" tooltip="border-top"></span></p>
<p class="border right"><span data-box="border" tooltip="border-right"></span></p>
<p class="border bottom"><span data-box="border" tooltip="border-bottom"></span></p>
<p class="border left"><span data-box="border" tooltip="border-left"></span></p>
<p class="margin top"><span tooltip="margin-top"></span></p>
<p class="margin right"><span tooltip="margin-right"></span></p>
<p class="margin bottom"><span tooltip="margin-bottom"></span></p>
<p class="margin left"><span tooltip="margin-left"></span></p>
<p class="margin top"><span data-box="margin" tooltip="margin-top"></span></p>
<p class="margin right"><span data-box="margin" tooltip="margin-right"></span></p>
<p class="margin bottom"><span data-box="margin" tooltip="margin-bottom"></span></p>
<p class="margin left"><span data-box="margin" tooltip="margin-left"></span></p>
<p class="padding top"><span tooltip="padding-top"></span></p>
<p class="padding right"><span tooltip="padding-right"></span></p>
<p class="padding bottom"><span tooltip="padding-bottom"></span></p>
<p class="padding left"><span tooltip="padding-left"></span></p>
<p class="padding top"><span data-box="padding" tooltip="padding-top"></span></p>
<p class="padding right"><span data-box="padding" tooltip="padding-right"></span></p>
<p class="padding bottom"><span data-box="padding" tooltip="padding-bottom"></span></p>
<p class="padding left"><span data-box="padding" tooltip="padding-left"></span></p>
<p class="size"><span tooltip="&content.tooltip;"></span></p>
<p class="size"><span data-box="content" tooltip="&content.tooltip;"></span></p>
<span class="tooltip"></span>

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

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

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

@ -15,7 +15,7 @@ function test() {
waitForFocus(startTests, content);
}, true);
content.location = "data:text/html,<p>Select me!</p>";
content.location = "data:text/html;charset=utf-8,<p>Select me!</p>";
}
function startTests(aInspector, aToolbox) {

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

@ -15,7 +15,7 @@ function test() {
waitForFocus(startTests, content);
}, true);
content.location = "data:text/html,<p>It's going to be legen....</p>";
content.location = "data:text/html;charset=utf-8,<p>It's going to be legen....</p>";
}
function startTests(aInspector, aToolbox) {

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

@ -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*") {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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,<?xml version='1.0'?>" +

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

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

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

@ -135,7 +135,7 @@ RuleViewTool.prototype = {
delete this.doc;
delete this.inspector;
}
}
};
function ComputedViewTool(aInspector, aWindow, aIFrame)
{

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -84,5 +84,10 @@ function onVariablesViewReady(aEvent, aView)
{
findVariableViewProperties(aView, [
{ name: "body", value: "<body>" },
], { webconsole: gHUD }).then(finishTest);
], { webconsole: gHUD }).then(finishUp);
}
function finishUp() {
gHUD = null;
finishTest();
}

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

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

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

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

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

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

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

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

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

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

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

@ -98,9 +98,8 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY fxaSignIn.label "Sign in to &syncBrand.shortName.label;">
<!ENTITY fxaSignInError.label "Reconnect to &syncBrand.shortName.label;">
<!ENTITY syncStartPanel.heading "&brandShortName; is now syncing">
<!ENTITY syncStartPanel.subTitle "You can manage &syncBrand.shortName.label; in Options.">
<!ENTITY syncStartPanel.subTitleUnix "You can manage &syncBrand.shortName.label; in Preferences.">
<!ENTITY syncStartPanel2.heading "&syncBrand.shortName.label; enabled">
<!ENTITY syncStartPanel2.subTitle "&brandShortName; will begin syncing momentarily.">
<!ENTITY syncErrorPanel.heading "Cannot connect to &syncBrand.shortName.label;">
<!ENTITY syncErrorPanel.subTitle "Please sign in to resume syncing.">
<!ENTITY syncErrorPanel.signInButton.label "Sign In">

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = e10s
support-files =
file_CSP.css
file_CSP.sjs

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

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

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

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = e10s
support-files =
file_binary-frames_wsh.py
file_check-binary-messages_wsh.py

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

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = e10s
support-files =
00_test_list.txt
failing_tests_android.txt

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

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

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

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

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

@ -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<TextTrack>
TextTrackManager::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel,
const nsAString& aLanguage)
const nsAString& aLanguage,
TextTrackSource aTextTrackSource)
{
if (!mMediaElement) {
return nullptr;
}
nsRefPtr<TextTrack> 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));
}
}
}

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

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

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

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

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

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

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

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

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

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

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

@ -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<TextTrackCueList> mCueList;
nsRefPtr<TextTrackCueList> mActiveCueList;
nsRefPtr<HTMLTrackElement> mTrackElement;
uint32_t mCuePos;
uint16_t mReadyState;
bool mDirty;
// An enum that represents where the track was sourced from.
TextTrackSource mTextTrackSource;
};
} // namespace dom

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

@ -64,17 +64,21 @@ TextTrackList::IndexedGetter(uint32_t aIndex, bool& aFound)
already_AddRefed<TextTrack>
TextTrackList::AddTextTrack(TextTrackKind aKind,
const nsAString& aLabel,
const nsAString& aLanguage)
const nsAString& aLanguage,
TextTrackSource aTextTrackSource,
const CompareTextTracks& aCompareTT)
{
nsRefPtr<TextTrack> track = new TextTrack(mGlobal, this, aKind, aLabel, aLanguage);
AddTextTrack(track);
nsRefPtr<TextTrack> 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"));
}

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

@ -16,6 +16,7 @@ namespace dom {
class HTMLMediaElement;
class TextTrackManager;
class CompareTextTracks;
class TrackEvent;
class TrackEventRunner;
@ -48,10 +49,12 @@ public:
already_AddRefed<TextTrack> 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();

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

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

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

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

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

@ -1,4 +1,5 @@
[DEFAULT]
skip-if = e10s
support-files = seek.webm seek.webm^headers^
[test_MediaSource.html]

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

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

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

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

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

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

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше