mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Merge m-c to b2ginbound, a=merge CLOSED TREE
This commit is contained in:
commit
0801283501
@ -116,7 +116,9 @@ pref("mozilla.widget.force-24bpp", true);
|
||||
pref("mozilla.widget.use-buffer-pixmap", true);
|
||||
pref("mozilla.widget.disable-native-theme", true);
|
||||
pref("layout.reflow.synthMouseMove", false);
|
||||
#ifndef MOZ_X11
|
||||
pref("layers.enable-tiles", true);
|
||||
#endif
|
||||
pref("layers.low-precision-buffer", true);
|
||||
pref("layers.low-precision-opacity", "0.5");
|
||||
pref("layers.progressive-paint", true);
|
||||
|
@ -60,11 +60,8 @@ MOZ_B2G=1
|
||||
if test "$OS_TARGET" = "Android"; then
|
||||
MOZ_NUWA_PROCESS=1
|
||||
MOZ_B2G_LOADER=1
|
||||
# Warnings-as-errors cannot be enabled on Lollipop until bug 1119980 is fixed.
|
||||
if test "$PLATFORM_SDK_VERSION" -lt 21; then
|
||||
MOZ_ENABLE_WARNINGS_AS_ERRORS=1
|
||||
fi
|
||||
fi
|
||||
|
||||
MOZ_JSDOWNLOADS=1
|
||||
|
||||
|
@ -6414,97 +6414,32 @@ function BrowserOpenApps() {
|
||||
switchToTabHavingURI(appsURL, true)
|
||||
}
|
||||
|
||||
function GetSearchFieldBookmarkData(node) {
|
||||
var charset = node.ownerDocument.characterSet;
|
||||
|
||||
var formBaseURI = makeURI(node.form.baseURI,
|
||||
charset);
|
||||
|
||||
var formURI = makeURI(node.form.getAttribute("action"),
|
||||
charset,
|
||||
formBaseURI);
|
||||
|
||||
var spec = formURI.spec;
|
||||
|
||||
var isURLEncoded =
|
||||
(node.form.method.toUpperCase() == "POST"
|
||||
&& (node.form.enctype == "application/x-www-form-urlencoded" ||
|
||||
node.form.enctype == ""));
|
||||
|
||||
var title = gNavigatorBundle.getFormattedString("addKeywordTitleAutoFill",
|
||||
[node.ownerDocument.title]);
|
||||
var description = PlacesUIUtils.getDescriptionFromDocument(node.ownerDocument);
|
||||
|
||||
var formData = [];
|
||||
|
||||
function escapeNameValuePair(aName, aValue, aIsFormUrlEncoded) {
|
||||
if (aIsFormUrlEncoded)
|
||||
return escape(aName + "=" + aValue);
|
||||
else
|
||||
return escape(aName) + "=" + escape(aValue);
|
||||
}
|
||||
|
||||
for (let el of node.form.elements) {
|
||||
if (!el.type) // happens with fieldsets
|
||||
continue;
|
||||
|
||||
if (el == node) {
|
||||
formData.push((isURLEncoded) ? escapeNameValuePair(el.name, "%s", true) :
|
||||
// Don't escape "%s", just append
|
||||
escapeNameValuePair(el.name, "", false) + "%s");
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = el.type.toLowerCase();
|
||||
|
||||
if (((el instanceof HTMLInputElement && el.mozIsTextField(true)) ||
|
||||
type == "hidden" || type == "textarea") ||
|
||||
((type == "checkbox" || type == "radio") && el.checked)) {
|
||||
formData.push(escapeNameValuePair(el.name, el.value, isURLEncoded));
|
||||
} else if (el instanceof HTMLSelectElement && el.selectedIndex >= 0) {
|
||||
for (var j=0; j < el.options.length; j++) {
|
||||
if (el.options[j].selected)
|
||||
formData.push(escapeNameValuePair(el.name, el.options[j].value,
|
||||
isURLEncoded));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var postData;
|
||||
|
||||
if (isURLEncoded)
|
||||
postData = formData.join("&");
|
||||
else {
|
||||
let separator = spec.includes("?") ? "&" : "?";
|
||||
spec += separator + formData.join("&");
|
||||
}
|
||||
|
||||
return {
|
||||
spec: spec,
|
||||
title: title,
|
||||
description: description,
|
||||
postData: postData,
|
||||
charSet: charset
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function AddKeywordForSearchField() {
|
||||
let bookmarkData = GetSearchFieldBookmarkData(gContextMenu.target);
|
||||
let mm = gBrowser.selectedBrowser.messageManager;
|
||||
|
||||
PlacesUIUtils.showBookmarkDialog({ action: "add"
|
||||
, type: "bookmark"
|
||||
, uri: makeURI(bookmarkData.spec)
|
||||
, title: bookmarkData.title
|
||||
, description: bookmarkData.description
|
||||
, keyword: ""
|
||||
, postData: bookmarkData.postData
|
||||
, charSet: bookmarkData.charset
|
||||
, hiddenRows: [ "location"
|
||||
, "description"
|
||||
, "tags"
|
||||
, "loadInSidebar" ]
|
||||
}, window);
|
||||
let onMessage = (message) => {
|
||||
mm.removeMessageListener("ContextMenu:SearchFieldBookmarkData:Result", onMessage);
|
||||
|
||||
let bookmarkData = message.data;
|
||||
let title = gNavigatorBundle.getFormattedString("addKeywordTitleAutoFill",
|
||||
[bookmarkData.title]);
|
||||
PlacesUIUtils.showBookmarkDialog({ action: "add"
|
||||
, type: "bookmark"
|
||||
, uri: makeURI(bookmarkData.spec)
|
||||
, title: title
|
||||
, description: bookmarkData.description
|
||||
, keyword: ""
|
||||
, postData: bookmarkData.postData
|
||||
, charSet: bookmarkData.charset
|
||||
, hiddenRows: [ "location"
|
||||
, "description"
|
||||
, "tags"
|
||||
, "loadInSidebar" ]
|
||||
}, window);
|
||||
}
|
||||
mm.addMessageListener("ContextMenu:SearchFieldBookmarkData:Result", onMessage);
|
||||
|
||||
mm.sendAsyncMessage("ContextMenu:SearchFieldBookmarkData", {}, { target: gContextMenu.target });
|
||||
}
|
||||
|
||||
function convertFromUnicode(charset, str)
|
||||
|
@ -664,3 +664,73 @@ addMessageListener("ContextMenu:BookmarkFrame", (message) => {
|
||||
{ title: frame.title,
|
||||
description: PlacesUIUtils.getDescriptionFromDocument(frame) });
|
||||
});
|
||||
|
||||
addMessageListener("ContextMenu:SearchFieldBookmarkData", (message) => {
|
||||
let node = message.objects.target;
|
||||
|
||||
let charset = node.ownerDocument.characterSet;
|
||||
|
||||
let formBaseURI = BrowserUtils.makeURI(node.form.baseURI,
|
||||
charset);
|
||||
|
||||
let formURI = BrowserUtils.makeURI(node.form.getAttribute("action"),
|
||||
charset,
|
||||
formBaseURI);
|
||||
|
||||
let spec = formURI.spec;
|
||||
|
||||
let isURLEncoded =
|
||||
(node.form.method.toUpperCase() == "POST"
|
||||
&& (node.form.enctype == "application/x-www-form-urlencoded" ||
|
||||
node.form.enctype == ""));
|
||||
|
||||
let title = node.ownerDocument.title;
|
||||
let description = PlacesUIUtils.getDescriptionFromDocument(node.ownerDocument);
|
||||
|
||||
let formData = [];
|
||||
|
||||
function escapeNameValuePair(aName, aValue, aIsFormUrlEncoded) {
|
||||
if (aIsFormUrlEncoded)
|
||||
return escape(aName + "=" + aValue);
|
||||
else
|
||||
return escape(aName) + "=" + escape(aValue);
|
||||
}
|
||||
|
||||
for (let el of node.form.elements) {
|
||||
if (!el.type) // happens with fieldsets
|
||||
continue;
|
||||
|
||||
if (el == node) {
|
||||
formData.push((isURLEncoded) ? escapeNameValuePair(el.name, "%s", true) :
|
||||
// Don't escape "%s", just append
|
||||
escapeNameValuePair(el.name, "", false) + "%s");
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = el.type.toLowerCase();
|
||||
|
||||
if (((el instanceof content.HTMLInputElement && el.mozIsTextField(true)) ||
|
||||
type == "hidden" || type == "textarea") ||
|
||||
((type == "checkbox" || type == "radio") && el.checked)) {
|
||||
formData.push(escapeNameValuePair(el.name, el.value, isURLEncoded));
|
||||
} else if (el instanceof content.HTMLSelectElement && el.selectedIndex >= 0) {
|
||||
for (let j=0; j < el.options.length; j++) {
|
||||
if (el.options[j].selected)
|
||||
formData.push(escapeNameValuePair(el.name, el.options[j].value,
|
||||
isURLEncoded));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let postData;
|
||||
|
||||
if (isURLEncoded)
|
||||
postData = formData.join("&");
|
||||
else {
|
||||
let separator = spec.includes("?") ? "&" : "?";
|
||||
spec += separator + formData.join("&");
|
||||
}
|
||||
|
||||
sendAsyncMessage("ContextMenu:SearchFieldBookmarkData:Result",
|
||||
{ spec, title, description, postData, charset });
|
||||
});
|
||||
|
@ -1,49 +1,82 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
let testData = [
|
||||
/* baseURI, field name, expected */
|
||||
[ 'http://example.com/', 'q', 'http://example.com/?q=%s' ],
|
||||
[ 'http://example.com/new-path-here/', 'q', 'http://example.com/new-path-here/?q=%s' ],
|
||||
[ '', 'q', 'http://example.org/browser/browser/base/content/test/general/dummy_page.html?q=%s' ],
|
||||
// Tests for proper behaviour when called on a form whose action contains a question mark.
|
||||
[ 'http://example.com/search?oe=utf-8', 'q', 'http://example.com/search?oe=utf-8&q=%s' ],
|
||||
];
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab("http://example.org/browser/browser/base/content/test/general/dummy_page.html");
|
||||
let mm = gBrowser.selectedBrowser.messageManager;
|
||||
|
||||
gBrowser.selectedBrowser.addEventListener("load", function runTests() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", runTests, true);
|
||||
add_task(function*() {
|
||||
yield BrowserTestUtils.withNewTab({
|
||||
gBrowser,
|
||||
url: "http://example.org/browser/browser/base/content/test/general/dummy_page.html",
|
||||
}, function* (browser) {
|
||||
yield ContentTask.spawn(browser, null, function* () {
|
||||
let doc = content.document;
|
||||
let base = doc.createElement("base");
|
||||
doc.head.appendChild(base);
|
||||
});
|
||||
|
||||
let doc = gBrowser.contentDocument;
|
||||
let base = doc.createElement("base");
|
||||
doc.head.appendChild(base);
|
||||
for (let [baseURI, fieldName, expected] of testData) {
|
||||
let popupShownPromise = BrowserTestUtils.waitForEvent(document.getElementById("contentAreaContextMenu"),
|
||||
"popupshown");
|
||||
|
||||
let check = function (baseURI, fieldName, expected) {
|
||||
base.href = baseURI;
|
||||
yield ContentTask.spawn(browser, { baseURI, fieldName }, function* (args) {
|
||||
let doc = content.document;
|
||||
|
||||
let form = doc.createElement("form");
|
||||
let element = doc.createElement("input");
|
||||
element.setAttribute("type", "text");
|
||||
element.setAttribute("name", fieldName);
|
||||
form.appendChild(element);
|
||||
doc.body.appendChild(form);
|
||||
let base = doc.querySelector('head > base');
|
||||
base.href = args.baseURI;
|
||||
|
||||
let data = GetSearchFieldBookmarkData(element);
|
||||
is(data.spec, expected, "Bookmark spec for search field named " + fieldName + " and baseURI " + baseURI + " incorrect");
|
||||
let form = doc.createElement("form");
|
||||
form.id = "keyword-form";
|
||||
let element = doc.createElement("input");
|
||||
element.setAttribute("type", "text");
|
||||
element.setAttribute("name", args.fieldName);
|
||||
form.appendChild(element);
|
||||
doc.body.appendChild(form);
|
||||
|
||||
doc.body.removeChild(form);
|
||||
/* Open context menu so chrome can access the element */
|
||||
const domWindowUtils =
|
||||
content.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
let rect = element.getBoundingClientRect();
|
||||
let left = rect.left + rect.width / 2;
|
||||
let top = rect.top + rect.height / 2;
|
||||
domWindowUtils.sendMouseEvent("contextmenu", left, top, 2,
|
||||
1, 0, false, 0, 0, true);
|
||||
});
|
||||
|
||||
yield popupShownPromise;
|
||||
|
||||
let target = gContextMenuContentData.popupNode;
|
||||
|
||||
let urlCheck = new Promise((resolve, reject) => {
|
||||
let onMessage = (message) => {
|
||||
mm.removeMessageListener("ContextMenu:SearchFieldBookmarkData:Result", onMessage);
|
||||
|
||||
is(message.data.spec, expected,
|
||||
`Bookmark spec for search field named ${fieldName} and baseURI ${baseURI} incorrect`);
|
||||
resolve();
|
||||
};
|
||||
mm.addMessageListener("ContextMenu:SearchFieldBookmarkData:Result", onMessage);
|
||||
|
||||
mm.sendAsyncMessage("ContextMenu:SearchFieldBookmarkData", null, { target });
|
||||
});
|
||||
|
||||
yield urlCheck;
|
||||
|
||||
document.getElementById("contentAreaContextMenu").hidePopup();
|
||||
|
||||
yield ContentTask.spawn(browser, null, function* () {
|
||||
let doc = content.document;
|
||||
doc.body.removeChild(doc.getElementById("keyword-form"));
|
||||
});
|
||||
}
|
||||
|
||||
let testData = [
|
||||
/* baseURI, field name, expected */
|
||||
[ 'http://example.com/', 'q', 'http://example.com/?q=%s' ],
|
||||
[ 'http://example.com/new-path-here/', 'q', 'http://example.com/new-path-here/?q=%s' ],
|
||||
[ '', 'q', 'http://example.org/browser/browser/base/content/test/general/dummy_page.html?q=%s' ],
|
||||
// Tests for proper behaviour when called on a form whose action contains a question mark.
|
||||
[ 'http://example.com/search?oe=utf-8', 'q', 'http://example.com/search?oe=utf-8&q=%s' ],
|
||||
]
|
||||
|
||||
for (let data of testData) {
|
||||
check(data[0], data[1], data[2]);
|
||||
}
|
||||
|
||||
// cleanup
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
}, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -81,7 +81,7 @@
|
||||
height: 40px;
|
||||
background-color: #ccc;
|
||||
border-radius: 50%;
|
||||
margin-right: 10px;
|
||||
-moz-margin-end: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
|
||||
background-image: url("../shared/img/audio-call-avatar.svg");
|
||||
@ -134,6 +134,11 @@
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
body[dir="rtl"] .contact > .details > .username > i.icon-google {
|
||||
left: 1rem;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.contact > .details > .email {
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
@ -143,7 +148,7 @@
|
||||
.icons {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
margin-left: auto;
|
||||
-moz-margin-start: auto;
|
||||
padding: 10px;
|
||||
border-radius: 2px;
|
||||
background-color: #5bc0a4;
|
||||
@ -188,6 +193,11 @@
|
||||
left: auto;
|
||||
}
|
||||
|
||||
body[dir="rtl"] .contact > .dropdown-menu {
|
||||
right: auto;
|
||||
left: 3em;
|
||||
}
|
||||
|
||||
.contact > .dropdown-menu-up {
|
||||
bottom: 10px;
|
||||
top: auto;
|
||||
@ -201,6 +211,10 @@
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
body[dir="rtl"] .contact > .dropdown-menu > .dropdown-menu-item > .icon {
|
||||
background-position: center right;
|
||||
}
|
||||
|
||||
.contact > .dropdown-menu > .dropdown-menu-item > .icon-audio-call {
|
||||
background-image: url("../shared/img/icons-16x16.svg#audio");
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ body[dir=rtl] .new-room-view > .context > .context-content > .context-preview {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
margin-right: .3rem;
|
||||
-moz-margin-end: .3rem;
|
||||
}
|
||||
|
||||
.room-list > .room-entry.room-active > h2 > .room-notification {
|
||||
@ -383,7 +383,8 @@ body[dir=rtl] .new-room-view > .context > .context-content > .context-preview {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
margin: .1em .1em .1em .5em; /* relative to _this_ line's font, not the document's */
|
||||
margin: .1em; /* relative to _this_ line's font, not the document's */
|
||||
-moz-margin-start: .5em;
|
||||
background-color: transparent; /* override browser default for button tags */
|
||||
top: -15px;
|
||||
}
|
||||
@ -424,7 +425,7 @@ body[dir=rtl] .new-room-view > .context > .context-content > .context-preview {
|
||||
.room-entry-context-item {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-left: 1rem;
|
||||
-moz-margin-start: 1rem;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
@ -752,11 +753,19 @@ body[dir=rtl] .generate-url-spinner {
|
||||
right: 14px;
|
||||
}
|
||||
|
||||
body[dir="rtl"] .settings-menu .dropdown-menu {
|
||||
/* This is specified separately rather than using -moz-margin-start etc, as
|
||||
we need to override .dropdown-menu's values which can't use the gecko
|
||||
specific extensions. */
|
||||
left: 14px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.settings-menu .icon {
|
||||
background-size: contain;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 1em;
|
||||
-moz-margin-end: 1em;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
|
@ -1027,10 +1027,6 @@ body[dir=rtl] .share-service-dropdown .share-panel-header {
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
body[dir=rtl] .room-context-thumbnail {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.room-context-thumbnail[src=""] {
|
||||
display: none;
|
||||
}
|
||||
@ -1041,10 +1037,6 @@ body[dir=rtl] .room-context-thumbnail {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
body[dir=rtl] .room-context-content {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.room-context-content > .error-display-area.error {
|
||||
display: block;
|
||||
background-color: rgba(215,67,69,.8);
|
||||
|
@ -67,8 +67,28 @@ loop.store.ActiveRoomStore = (function() {
|
||||
this._isDesktop = options.isDesktop || false;
|
||||
},
|
||||
|
||||
/**
|
||||
* This is a list of states that need resetting when the room is left,
|
||||
* due to user choice, failure or other reason. It is a subset of
|
||||
* getInitialStoreState as some items (e.g. roomState, failureReason,
|
||||
* context information) can persist across room exit & re-entry.
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
_statesToResetOnLeave: [
|
||||
"audioMuted",
|
||||
"localVideoDimensions",
|
||||
"receivingScreenShare",
|
||||
"remoteVideoDimensions",
|
||||
"screenSharingState",
|
||||
"videoMuted"
|
||||
],
|
||||
|
||||
/**
|
||||
* Returns initial state data for this active room.
|
||||
*
|
||||
* When adding states, consider if _statesToResetOnLeave needs updating
|
||||
* as well.
|
||||
*/
|
||||
getInitialStoreState: function() {
|
||||
return {
|
||||
@ -750,6 +770,15 @@ loop.store.ActiveRoomStore = (function() {
|
||||
// We probably don't need to end screen share separately, but lets be safe.
|
||||
this._sdkDriver.disconnectSession();
|
||||
|
||||
// Reset various states.
|
||||
var originalStoreState = this.getInitialStoreState();
|
||||
var newStoreState = {};
|
||||
|
||||
this._statesToResetOnLeave.forEach(function(state) {
|
||||
newStoreState[state] = originalStoreState[state];
|
||||
});
|
||||
this.setStoreState(newStoreState);
|
||||
|
||||
if (this._timeout) {
|
||||
clearTimeout(this._timeout);
|
||||
delete this._timeout;
|
||||
@ -768,12 +797,16 @@ loop.store.ActiveRoomStore = (function() {
|
||||
},
|
||||
|
||||
/**
|
||||
* When feedback is complete, we reset the room to the initial state.
|
||||
* When feedback is complete, we go back to the ready state, rather than
|
||||
* init or gather, as we don't need to get the data from the server again.
|
||||
*/
|
||||
feedbackComplete: function() {
|
||||
// Note, that we want some values, such as the windowId, so we don't
|
||||
// do a full reset here.
|
||||
this.setStoreState(this.getInitialStoreState());
|
||||
this.setStoreState({
|
||||
roomState: ROOM_STATES.READY,
|
||||
// Reset the used state here as the user has now given feedback and the
|
||||
// next time they enter the room, the other person might not be there.
|
||||
used: false
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -493,18 +493,26 @@ describe("loop.store.ActiveRoomStore", function () {
|
||||
});
|
||||
|
||||
describe("#feedbackComplete", function() {
|
||||
it("should reset the room store state", function() {
|
||||
var initialState = store.getInitialStoreState();
|
||||
it("should set the room state to READY", function() {
|
||||
store.setStoreState({
|
||||
roomState: ROOM_STATES.ENDED,
|
||||
audioMuted: true,
|
||||
videoMuted: true,
|
||||
failureReason: "foo"
|
||||
used: true
|
||||
});
|
||||
|
||||
store.feedbackComplete(new sharedActions.FeedbackComplete());
|
||||
|
||||
expect(store.getStoreState()).eql(initialState);
|
||||
expect(store.getStoreState().roomState).eql(ROOM_STATES.READY);
|
||||
});
|
||||
|
||||
it("should reset the 'used' state", function() {
|
||||
store.setStoreState({
|
||||
roomState: ROOM_STATES.ENDED,
|
||||
used: true
|
||||
});
|
||||
|
||||
store.feedbackComplete(new sharedActions.FeedbackComplete());
|
||||
|
||||
expect(store.getStoreState().used).eql(false);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1302,6 +1310,38 @@ describe("loop.store.ActiveRoomStore", function () {
|
||||
|
||||
expect(store._storeState.roomState).eql(ROOM_STATES.ENDED);
|
||||
});
|
||||
|
||||
it("should reset various store states", function() {
|
||||
store.setStoreState({
|
||||
audioMuted: true,
|
||||
localVideoDimensions: { x: 10 },
|
||||
receivingScreenShare: true,
|
||||
remoteVideoDimensions: { y: 10 },
|
||||
screenSharingState: true,
|
||||
videoMuted: true
|
||||
});
|
||||
|
||||
store.leaveRoom();
|
||||
|
||||
expect(store._storeState.audioMuted).eql(false);
|
||||
expect(store._storeState.localVideoDimensions).eql({});
|
||||
expect(store._storeState.receivingScreenShare).eql(false);
|
||||
expect(store._storeState.remoteVideoDimensions).eql({});
|
||||
expect(store._storeState.screenSharingState).eql(SCREEN_SHARE_STATES.INACTIVE);
|
||||
expect(store._storeState.videoMuted).eql(false);
|
||||
});
|
||||
|
||||
it("should not reset the room context", function() {
|
||||
store.setStoreState({
|
||||
roomContextUrls: [{ fake: 1 }],
|
||||
roomName: "fred"
|
||||
});
|
||||
|
||||
store.leaveRoom();
|
||||
|
||||
expect(store._storeState.roomName).eql("fred");
|
||||
expect(store._storeState.roomContextUrls).eql([{ fake: 1 }]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#_handleSocialShareUpdate", function() {
|
||||
|
@ -375,7 +375,7 @@ BrowserGlue.prototype = {
|
||||
case "handle-xul-text-link":
|
||||
let linkHandled = subject.QueryInterface(Ci.nsISupportsPRBool);
|
||||
if (!linkHandled.data) {
|
||||
let win = this.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
if (win) {
|
||||
win.openUILinkIn(data, "tab");
|
||||
linkHandled.data = true;
|
||||
@ -393,7 +393,7 @@ BrowserGlue.prototype = {
|
||||
// browser.js:BrowserSearch.recordSearchInHealthReport(). The code could
|
||||
// be consolidated if there is will. We need the observer in
|
||||
// nsBrowserGlue to prevent double counting.
|
||||
let win = this.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
BrowserUITelemetry.countSearchEvent("urlbar", win.gURLBar.value);
|
||||
|
||||
let engine = null;
|
||||
@ -813,7 +813,7 @@ BrowserGlue.prototype = {
|
||||
},
|
||||
|
||||
_showSlowStartupNotification: function () {
|
||||
let win = this.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
if (!win)
|
||||
return;
|
||||
|
||||
@ -847,7 +847,7 @@ BrowserGlue.prototype = {
|
||||
* Show a notification bar offering a reset if the profile has been unused for some time.
|
||||
*/
|
||||
_resetUnusedProfileNotification: function () {
|
||||
let win = this.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
if (!win)
|
||||
return;
|
||||
|
||||
@ -877,7 +877,7 @@ BrowserGlue.prototype = {
|
||||
},
|
||||
|
||||
_notifyUnsignedAddonsDisabled: function () {
|
||||
let win = this.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
if (!win)
|
||||
return;
|
||||
|
||||
@ -1075,7 +1075,7 @@ BrowserGlue.prototype = {
|
||||
// them to the user.
|
||||
let changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED);
|
||||
if (changedIDs.length > 0) {
|
||||
let win = this.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
AddonManager.getAddonsByIDs(changedIDs, function(aAddons) {
|
||||
aAddons.forEach(function(aAddon) {
|
||||
// If the add-on isn't user disabled or can't be enabled then skip it.
|
||||
@ -1115,7 +1115,7 @@ BrowserGlue.prototype = {
|
||||
|
||||
if (shouldCheck && !isDefault && !willRecoverSession) {
|
||||
Services.tm.mainThread.dispatch(function() {
|
||||
DefaultBrowserCheck.prompt(this.getMostRecentBrowserWindow());
|
||||
DefaultBrowserCheck.prompt(RecentWindow.getMostRecentBrowserWindow());
|
||||
}.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
|
||||
}
|
||||
}
|
||||
@ -1339,7 +1339,7 @@ BrowserGlue.prototype = {
|
||||
let key = getNotifyString({propName: "notificationButtonAccessKey",
|
||||
stringName: "pu.notifyButton.accesskey"});
|
||||
|
||||
let win = this.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
let notifyBox = win.document.getElementById("high-priority-global-notificationbox");
|
||||
|
||||
let buttons = [
|
||||
@ -1380,12 +1380,11 @@ BrowserGlue.prototype = {
|
||||
let url = getNotifyString({propName: "alertURL",
|
||||
prefName: "startup.homepage_override_url"});
|
||||
|
||||
var self = this;
|
||||
function clickCallback(subject, topic, data) {
|
||||
// This callback will be called twice but only once with this topic
|
||||
if (topic != "alertclickcallback")
|
||||
return;
|
||||
let win = self.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
win.openUILinkIn(data, "tab");
|
||||
}
|
||||
|
||||
@ -1406,7 +1405,7 @@ BrowserGlue.prototype = {
|
||||
getService(Ci.nsIURLFormatter);
|
||||
var updateUrl = formatter.formatURLPref(PREF_PLUGINS_UPDATEURL);
|
||||
|
||||
var win = this.getMostRecentBrowserWindow();
|
||||
var win = RecentWindow.getMostRecentBrowserWindow();
|
||||
win.openUILinkIn(updateUrl, "tab");
|
||||
},
|
||||
|
||||
@ -1655,7 +1654,7 @@ BrowserGlue.prototype = {
|
||||
formatURLPref("app.support.baseURL");
|
||||
url += helpTopic;
|
||||
|
||||
var win = this.getMostRecentBrowserWindow();
|
||||
var win = RecentWindow.getMostRecentBrowserWindow();
|
||||
|
||||
var buttons = [
|
||||
{
|
||||
@ -2201,11 +2200,6 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}),
|
||||
|
||||
// this returns the most recent non-popup browser window
|
||||
getMostRecentBrowserWindow: function BG_getMostRecentBrowserWindow() {
|
||||
return RecentWindow.getMostRecentBrowserWindow();
|
||||
},
|
||||
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
/**
|
||||
* Called as an observer when Sync's "display URI" notification is fired.
|
||||
@ -2252,7 +2246,7 @@ BrowserGlue.prototype = {
|
||||
Services.prefs.setBoolPref("dom.ipc.plugins.flash.disable-protected-mode", true);
|
||||
Services.prefs.setBoolPref("browser.flash-protected-mode-flip.done", true);
|
||||
|
||||
let win = this.getMostRecentBrowserWindow();
|
||||
let win = RecentWindow.getMostRecentBrowserWindow();
|
||||
if (!win) {
|
||||
return;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ interface nsIDOMWindow;
|
||||
*
|
||||
*/
|
||||
|
||||
[scriptable, uuid(ea083cb7-6b9d-4695-8b34-2e8f6ce2a860)]
|
||||
[scriptable, uuid(b0e7c156-d00c-4605-a77d-27c7418f23ae)]
|
||||
interface nsIBrowserGlue : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -34,9 +34,4 @@ interface nsIBrowserGlue : nsISupports
|
||||
*
|
||||
*/
|
||||
void sanitize(in nsIDOMWindow aParentWindow);
|
||||
|
||||
/**
|
||||
* Gets the most recent window that's a browser (but not a popup)
|
||||
*/
|
||||
nsIDOMWindow getMostRecentBrowserWindow();
|
||||
};
|
||||
|
@ -102,21 +102,6 @@ let SessionHistoryInternal = {
|
||||
return data;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines whether a given session history entry has been added dynamically.
|
||||
*
|
||||
* @param shEntry
|
||||
* The session history entry.
|
||||
* @return bool
|
||||
*/
|
||||
isDynamic: function (shEntry) {
|
||||
// shEntry.isDynamicallyAdded() is true for dynamically added
|
||||
// <iframe> and <frameset>, but also for <html> (the root of the
|
||||
// document) so we use shEntry.parent to ensure that we're not looking
|
||||
// at the root of the document
|
||||
return shEntry.parent && shEntry.isDynamicallyAdded();
|
||||
},
|
||||
|
||||
/**
|
||||
* Get an object that is a serialized representation of a History entry.
|
||||
*
|
||||
@ -195,12 +180,12 @@ let SessionHistoryInternal = {
|
||||
return entry;
|
||||
}
|
||||
|
||||
if (shEntry.childCount > 0) {
|
||||
if (shEntry.childCount > 0 && !shEntry.hasDynamicallyAddedChild()) {
|
||||
let children = [];
|
||||
for (let i = 0; i < shEntry.childCount; i++) {
|
||||
let child = shEntry.GetChildAt(i);
|
||||
|
||||
if (child && !this.isDynamic(child)) {
|
||||
if (child) {
|
||||
// Don't try to restore framesets containing wyciwyg URLs.
|
||||
// (cf. bug 424689 and bug 450595)
|
||||
if (child.URI.schemeIs("wyciwyg")) {
|
||||
|
@ -175,17 +175,8 @@ function createTabWithStorageData(urls, win = window) {
|
||||
});
|
||||
}
|
||||
|
||||
function waitForStorageEvent(browser) {
|
||||
return promiseContentMessage(browser, "ss-test:MozStorageChanged");
|
||||
}
|
||||
|
||||
function sendQuitApplicationRequested() {
|
||||
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
|
||||
.createInstance(Ci.nsISupportsPRBool);
|
||||
Services.obs.notifyObservers(cancelQuit, "quit-application-requested", null);
|
||||
}
|
||||
|
||||
function modifySessionStorage(browser, data) {
|
||||
browser.messageManager.sendAsyncMessage("ss-test:modifySessionStorage", data);
|
||||
return waitForStorageEvent(browser);
|
||||
}
|
||||
|
@ -66,11 +66,7 @@ add_task(function () {
|
||||
|
||||
// Check URLs.
|
||||
ok(entries[0].url.startsWith("data:text/html"), "correct root url");
|
||||
is(entries[0].children[0].url, "about:mozilla", "correct url for static frame");
|
||||
|
||||
// Check the number of children.
|
||||
is(entries.length, 1, "there is one root entry ...");
|
||||
is(entries[0].children.length, 1, "... with a single child entry");
|
||||
ok(!entries[0].children, "no children collected");
|
||||
|
||||
// Navigate the subframe.
|
||||
browser.messageManager.sendAsyncMessage("ss-test:click", {id: "lnk"});
|
||||
@ -82,13 +78,9 @@ add_task(function () {
|
||||
// Check URLs.
|
||||
ok(entries[0].url.startsWith("data:text/html"), "correct 1st root url");
|
||||
ok(entries[1].url.startsWith("data:text/html"), "correct 2nd root url");
|
||||
is(entries[0].children[0].url, "about:mozilla", "correct url for 1st static frame");
|
||||
is(entries[1].children[0].url, "about:robots", "correct url for 2ns static frame");
|
||||
|
||||
// Check the number of children.
|
||||
is(entries.length, 2, "there are two root entries ...");
|
||||
is(entries[0].children.length, 1, "... with a single child entry ...");
|
||||
is(entries[1].children.length, 1, "... each");
|
||||
ok(!entries.children, "no children collected");
|
||||
ok(!entries[0].children, "no children collected");
|
||||
ok(!entries[1].children, "no children collected");
|
||||
|
||||
// Cleanup.
|
||||
gBrowser.removeTab(tab);
|
||||
|
@ -30,7 +30,7 @@ add_task(function session_storage() {
|
||||
"sessionStorage data for mochi.test has been serialized correctly");
|
||||
|
||||
// Ensure that modifying sessionStore values works for the inner frame only.
|
||||
yield modifySessionStorage2(browser, {test: "modified1"});
|
||||
yield modifySessionStorage(browser, {test: "modified1"}, {frameIndex: 0});
|
||||
yield TabStateFlusher.flush(browser);
|
||||
|
||||
({storage} = JSON.parse(ss.getTabState(tab)));
|
||||
@ -41,7 +41,7 @@ add_task(function session_storage() {
|
||||
|
||||
// Ensure that modifying sessionStore values works for both frames.
|
||||
yield modifySessionStorage(browser, {test: "modified"});
|
||||
yield modifySessionStorage2(browser, {test: "modified2"});
|
||||
yield modifySessionStorage(browser, {test: "modified2"}, {frameIndex: 0});
|
||||
yield TabStateFlusher.flush(browser);
|
||||
|
||||
({storage} = JSON.parse(ss.getTabState(tab)));
|
||||
@ -176,20 +176,6 @@ add_task(function respect_privacy_level() {
|
||||
"https sessionStorage data has been saved");
|
||||
});
|
||||
|
||||
function waitForStorageEvent(browser) {
|
||||
return promiseContentMessage(browser, "ss-test:MozStorageChanged");
|
||||
}
|
||||
|
||||
function modifySessionStorage(browser, data) {
|
||||
browser.messageManager.sendAsyncMessage("ss-test:modifySessionStorage", data);
|
||||
return waitForStorageEvent(browser);
|
||||
}
|
||||
|
||||
function modifySessionStorage2(browser, data) {
|
||||
browser.messageManager.sendAsyncMessage("ss-test:modifySessionStorage2", data);
|
||||
return waitForStorageEvent(browser);
|
||||
}
|
||||
|
||||
function purgeDomainData(browser, domain) {
|
||||
return sendMessage(browser, "ss-test:purgeDomainData", domain);
|
||||
}
|
||||
|
@ -79,26 +79,6 @@ addEventListener("hashchange", function () {
|
||||
sendAsyncMessage("ss-test:hashchange");
|
||||
});
|
||||
|
||||
addEventListener("MozStorageChanged", function () {
|
||||
// It's possible that this event handler runs before the one in
|
||||
// content-sessionStore.js. We run ours a little later to make sure
|
||||
// that the session store code has seen the event before we allow
|
||||
// the test to proceed.
|
||||
executeSoon(() => sendAsyncMessage("ss-test:MozStorageChanged"));
|
||||
}, true);
|
||||
|
||||
addMessageListener("ss-test:modifySessionStorage", function (msg) {
|
||||
for (let key of Object.keys(msg.data)) {
|
||||
content.sessionStorage[key] = msg.data[key];
|
||||
}
|
||||
});
|
||||
|
||||
addMessageListener("ss-test:modifySessionStorage2", function (msg) {
|
||||
for (let key of Object.keys(msg.data)) {
|
||||
content.frames[0].sessionStorage[key] = msg.data[key];
|
||||
}
|
||||
});
|
||||
|
||||
addMessageListener("ss-test:purgeDomainData", function ({data: domain}) {
|
||||
Services.obs.notifyObservers(null, "browser:purge-domain-data", domain);
|
||||
content.setTimeout(() => sendAsyncMessage("ss-test:purgeDomainData"));
|
||||
|
@ -637,3 +637,33 @@ function crashBrowser(browser) {
|
||||
is(tab.getAttribute("crashed"), "true", "Tab should be marked as crashed");
|
||||
});
|
||||
}
|
||||
|
||||
// Write DOMSessionStorage data to the given browser.
|
||||
function modifySessionStorage(browser, data, options = {}) {
|
||||
return ContentTask.spawn(browser, [data, options], function* ([data, options]) {
|
||||
let frame = content;
|
||||
if (options && "frameIndex" in options) {
|
||||
frame = content.frames[options.frameIndex];
|
||||
}
|
||||
|
||||
let keys = new Set(Object.keys(data));
|
||||
let storage = frame.sessionStorage;
|
||||
|
||||
return new Promise(resolve => {
|
||||
addEventListener("MozStorageChanged", function onStorageChanged(event) {
|
||||
if (event.storageArea == storage) {
|
||||
keys.delete(event.key);
|
||||
}
|
||||
|
||||
if (keys.size == 0) {
|
||||
removeEventListener("MozStorageChanged", onStorageChanged, true);
|
||||
resolve();
|
||||
}
|
||||
}, true);
|
||||
|
||||
for (let key of keys) {
|
||||
frame.sessionStorage[key] = data[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ function waitForUpdate() {
|
||||
}
|
||||
|
||||
function changeManifestValue(key, value) {
|
||||
return Task.spawn(function() {
|
||||
return Task.spawn(function*() {
|
||||
let propElem = gManifestWindow.document
|
||||
.querySelector("[id ^= '" + key + "']");
|
||||
is(propElem.querySelector(".name").value, key,
|
||||
@ -74,7 +74,7 @@ function changeManifestValue(key, value) {
|
||||
}
|
||||
|
||||
function changeManifestValueBad(key, value) {
|
||||
return Task.spawn(function() {
|
||||
return Task.spawn(function*() {
|
||||
let propElem = gManifestWindow.document
|
||||
.querySelector("[id ^= '" + key + "']");
|
||||
is(propElem.querySelector(".name").value, key,
|
||||
@ -102,7 +102,7 @@ function changeManifestValueBad(key, value) {
|
||||
|
||||
function addNewManifestProperty(parent, key, value) {
|
||||
info("Adding new property - parent: " + parent + "; key: " + key + "; value: " + value + "\n\n");
|
||||
return Task.spawn(function() {
|
||||
return Task.spawn(function*() {
|
||||
let parentElem = gManifestWindow.document
|
||||
.querySelector("[id ^= '" + parent + "']");
|
||||
ok(parentElem, "Found parent element: " + parentElem.id);
|
||||
@ -143,7 +143,7 @@ function addNewManifestProperty(parent, key, value) {
|
||||
}
|
||||
|
||||
function addNewManifestPropertyBad(parent, key, value) {
|
||||
return Task.spawn(function() {
|
||||
return Task.spawn(function*() {
|
||||
let parentElem = gManifestWindow.document
|
||||
.querySelector("[id ^= '" + parent + "']");
|
||||
ok(parentElem,
|
||||
@ -176,7 +176,7 @@ function addNewManifestPropertyBad(parent, key, value) {
|
||||
function removeManifestProperty(parent, key) {
|
||||
info("*** Remove property test ***");
|
||||
|
||||
return Task.spawn(function() {
|
||||
return Task.spawn(function*() {
|
||||
let parentElem = gManifestWindow.document
|
||||
.querySelector("[id ^= '" + parent + "']");
|
||||
ok(parentElem, "Found parent element");
|
||||
|
@ -127,7 +127,7 @@ function waitForProjectsPanel(deferred = promise.defer()) {
|
||||
}
|
||||
|
||||
function selectProjectsPanel() {
|
||||
return Task.spawn(function() {
|
||||
return Task.spawn(function*() {
|
||||
let projectsButton = content.document.querySelector(".projects-button");
|
||||
EventUtils.sendMouseEvent({ type: "click" }, projectsButton, content);
|
||||
|
||||
@ -144,7 +144,7 @@ function waitForProjectSelection() {
|
||||
}
|
||||
|
||||
function selectFirstProject() {
|
||||
return Task.spawn(function() {
|
||||
return Task.spawn(function*() {
|
||||
let projectsFrame = content.document.querySelector(".projects-panel");
|
||||
let projectsWindow = projectsFrame.contentWindow;
|
||||
let projectsDoc = projectsWindow.document;
|
||||
@ -156,7 +156,7 @@ function selectFirstProject() {
|
||||
}
|
||||
|
||||
function showSampleProjectDetails() {
|
||||
return Task.spawn(function() {
|
||||
return Task.spawn(function*() {
|
||||
yield selectProjectsPanel();
|
||||
yield selectFirstProject();
|
||||
});
|
||||
|
@ -25,7 +25,7 @@ function* spawnTest() {
|
||||
pbWin.close();
|
||||
}
|
||||
|
||||
function addTabWithToolbarRunTests(win) {
|
||||
function* addTabWithToolbarRunTests(win) {
|
||||
let options = yield helpers.openTab(TEST_URI, { chromeWindow: win });
|
||||
yield helpers.openToolbar(options);
|
||||
|
||||
|
@ -70,10 +70,7 @@ function initialChecks() {
|
||||
is(objectVar.expanded, false,
|
||||
"The 'largeObject' variable shouldn't be expanded.");
|
||||
|
||||
let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_PROPERTIES, 2);
|
||||
arrayVar.expand();
|
||||
objectVar.expand();
|
||||
return finished;
|
||||
return promise.all([arrayVar.expand(),objectVar.expand()]);
|
||||
}
|
||||
|
||||
function verifyFirstLevel() {
|
||||
@ -96,55 +93,56 @@ function verifyFirstLevel() {
|
||||
"The 'largeObject' should contain all the created non-enumerable elements.");
|
||||
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[0].getAttribute("value"),
|
||||
0 + gEllipsis + 1999, "The first page in the 'largeArray' is named correctly.");
|
||||
"[0" + gEllipsis + "2499]", "The first page in the 'largeArray' is named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[0].getAttribute("value"),
|
||||
"", "The first page in the 'largeArray' should not have a corresponding value.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[1].getAttribute("value"),
|
||||
2000 + gEllipsis + 3999, "The second page in the 'largeArray' is named correctly.");
|
||||
"[2500" + gEllipsis + "4999]", "The second page in the 'largeArray' is named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[1].getAttribute("value"),
|
||||
"", "The second page in the 'largeArray' should not have a corresponding value.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[2].getAttribute("value"),
|
||||
4000 + gEllipsis + 5999, "The third page in the 'largeArray' is named correctly.");
|
||||
"[5000" + gEllipsis + "7499]", "The third page in the 'largeArray' is named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[2].getAttribute("value"),
|
||||
"", "The third page in the 'largeArray' should not have a corresponding value.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[3].getAttribute("value"),
|
||||
6000 + gEllipsis + 9999, "The fourth page in the 'largeArray' is named correctly.");
|
||||
"[7500" + gEllipsis + "9999]", "The fourth page in the 'largeArray' is named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[3].getAttribute("value"),
|
||||
"", "The fourth page in the 'largeArray' should not have a corresponding value.");
|
||||
|
||||
is(objectVar.target.querySelectorAll(".variables-view-property .name")[0].getAttribute("value"),
|
||||
0 + gEllipsis + 1999, "The first page in the 'largeObject' is named correctly.");
|
||||
"[0" + gEllipsis + "2499]", "The first page in the 'largeObject' is named correctly.");
|
||||
is(objectVar.target.querySelectorAll(".variables-view-property .value")[0].getAttribute("value"),
|
||||
"", "The first page in the 'largeObject' should not have a corresponding value.");
|
||||
is(objectVar.target.querySelectorAll(".variables-view-property .name")[1].getAttribute("value"),
|
||||
2000 + gEllipsis + 3999, "The second page in the 'largeObject' is named correctly.");
|
||||
"[2500" + gEllipsis + "4999]", "The second page in the 'largeObject' is named correctly.");
|
||||
is(objectVar.target.querySelectorAll(".variables-view-property .value")[1].getAttribute("value"),
|
||||
"", "The second page in the 'largeObject' should not have a corresponding value.");
|
||||
is(objectVar.target.querySelectorAll(".variables-view-property .name")[2].getAttribute("value"),
|
||||
4000 + gEllipsis + 5999, "The thrid page in the 'largeObject' is named correctly.");
|
||||
"[5000" + gEllipsis + "7499]", "The thrid page in the 'largeObject' is named correctly.");
|
||||
is(objectVar.target.querySelectorAll(".variables-view-property .value")[2].getAttribute("value"),
|
||||
"", "The thrid page in the 'largeObject' should not have a corresponding value.");
|
||||
is(objectVar.target.querySelectorAll(".variables-view-property .name")[3].getAttribute("value"),
|
||||
6000 + gEllipsis + 9999, "The fourth page in the 'largeObject' is named correctly.");
|
||||
"[7500" + gEllipsis + "9999]", "The fourth page in the 'largeObject' is named correctly.");
|
||||
is(objectVar.target.querySelectorAll(".variables-view-property .value")[3].getAttribute("value"),
|
||||
"", "The fourth page in the 'largeObject' should not have a corresponding value.");
|
||||
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[4].getAttribute("value"),
|
||||
"length", "The other properties 'largeArray' are named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[4].getAttribute("value"),
|
||||
"10000", "The other properties 'largeArray' have the correct value.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[5].getAttribute("value"),
|
||||
"buffer", "The other properties 'largeArray' are named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[5].getAttribute("value"),
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[4].getAttribute("value"),
|
||||
"ArrayBuffer", "The other properties 'largeArray' have the correct value.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[6].getAttribute("value"),
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[5].getAttribute("value"),
|
||||
"byteLength", "The other properties 'largeArray' are named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[6].getAttribute("value"),
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[5].getAttribute("value"),
|
||||
"10000", "The other properties 'largeArray' have the correct value.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[7].getAttribute("value"),
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[6].getAttribute("value"),
|
||||
"byteOffset", "The other properties 'largeArray' are named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[7].getAttribute("value"),
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[6].getAttribute("value"),
|
||||
"0", "The other properties 'largeArray' have the correct value.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[7].getAttribute("value"),
|
||||
"length", "The other properties 'largeArray' are named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[7].getAttribute("value"),
|
||||
"10000", "The other properties 'largeArray' have the correct value.");
|
||||
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .name")[8].getAttribute("value"),
|
||||
"__proto__", "The other properties 'largeArray' are named correctly.");
|
||||
is(arrayVar.target.querySelectorAll(".variables-view-property .value")[8].getAttribute("value"),
|
||||
@ -160,10 +158,13 @@ function verifyNextLevels() {
|
||||
let localScope = gVariables.getScopeAtIndex(0);
|
||||
let objectVar = localScope.get("largeObject");
|
||||
|
||||
let lastPage1 = objectVar.get(6000 + gEllipsis + 9999);
|
||||
let lastPage1 = objectVar.get("[7500" + gEllipsis + "9999]");
|
||||
ok(lastPage1, "The last page in the first level was retrieved successfully.");
|
||||
lastPage1.expand();
|
||||
return lastPage1.expand()
|
||||
.then(verifyNextLevels2.bind(null, lastPage1));
|
||||
}
|
||||
|
||||
function verifyNextLevels2(lastPage1) {
|
||||
let pageEnums1 = lastPage1.target.querySelector(".variables-view-element-details.enum").childNodes;
|
||||
let pageNonEnums1 = lastPage1.target.querySelector(".variables-view-element-details.nonenum").childNodes;
|
||||
is(pageEnums1.length, 0,
|
||||
@ -172,61 +173,44 @@ function verifyNextLevels() {
|
||||
"The last page in the first level should contain all the created non-enumerable elements.");
|
||||
|
||||
is(lastPage1._nonenum.querySelectorAll(".variables-view-property .name")[0].getAttribute("value"),
|
||||
6000 + gEllipsis + 6999, "The first page in this level named correctly (1).");
|
||||
"[7500" + gEllipsis + "8124]", "The first page in this level named correctly (1).");
|
||||
is(lastPage1._nonenum.querySelectorAll(".variables-view-property .name")[1].getAttribute("value"),
|
||||
7000 + gEllipsis + 7999, "The second page in this level named correctly (1).");
|
||||
"[8125" + gEllipsis + "8749]", "The second page in this level named correctly (1).");
|
||||
is(lastPage1._nonenum.querySelectorAll(".variables-view-property .name")[2].getAttribute("value"),
|
||||
8000 + gEllipsis + 8999, "The third page in this level named correctly (1).");
|
||||
"[8750" + gEllipsis + "9374]", "The third page in this level named correctly (1).");
|
||||
is(lastPage1._nonenum.querySelectorAll(".variables-view-property .name")[3].getAttribute("value"),
|
||||
9000 + gEllipsis + 9999, "The fourth page in this level named correctly (1).");
|
||||
"[9375" + gEllipsis + "9999]", "The fourth page in this level named correctly (1).");
|
||||
|
||||
let lastPage2 = lastPage1.get(9000 + gEllipsis + 9999);
|
||||
let lastPage2 = lastPage1.get("[9375" + gEllipsis + "9999]");
|
||||
ok(lastPage2, "The last page in the second level was retrieved successfully.");
|
||||
lastPage2.expand();
|
||||
return lastPage2.expand()
|
||||
.then(verifyNextLevels3.bind(null, lastPage2));
|
||||
}
|
||||
|
||||
function verifyNextLevels3(lastPage2) {
|
||||
let pageEnums2 = lastPage2.target.querySelector(".variables-view-element-details.enum").childNodes;
|
||||
let pageNonEnums2 = lastPage2.target.querySelector(".variables-view-element-details.nonenum").childNodes;
|
||||
is(pageEnums2.length, 0,
|
||||
"The last page in the second level shouldn't contain any enumerable elements.");
|
||||
is(pageNonEnums2.length, 4,
|
||||
"The last page in the second level should contain all the created non-enumerable elements.");
|
||||
|
||||
is(lastPage2._nonenum.querySelectorAll(".variables-view-property .name")[0].getAttribute("value"),
|
||||
9000 + gEllipsis + 9199, "The first page in this level named correctly (2).");
|
||||
is(lastPage2._nonenum.querySelectorAll(".variables-view-property .name")[1].getAttribute("value"),
|
||||
9200 + gEllipsis + 9399, "The second page in this level named correctly (2).");
|
||||
is(lastPage2._nonenum.querySelectorAll(".variables-view-property .name")[2].getAttribute("value"),
|
||||
9400 + gEllipsis + 9599, "The third page in this level named correctly (2).");
|
||||
is(lastPage2._nonenum.querySelectorAll(".variables-view-property .name")[3].getAttribute("value"),
|
||||
9600 + gEllipsis + 9999, "The fourth page in this level named correctly (2).");
|
||||
|
||||
let lastPage3 = lastPage2.get(9600 + gEllipsis + 9999);
|
||||
ok(lastPage3, "The last page in the third level was retrieved successfully.");
|
||||
lastPage3.expand();
|
||||
|
||||
let pageEnums3 = lastPage3.target.querySelector(".variables-view-element-details.enum").childNodes;
|
||||
let pageNonEnums3 = lastPage3.target.querySelector(".variables-view-element-details.nonenum").childNodes;
|
||||
is(pageEnums3.length, 400,
|
||||
is(pageEnums2.length, 625,
|
||||
"The last page in the third level should contain all the created enumerable elements.");
|
||||
is(pageNonEnums3.length, 0,
|
||||
is(pageNonEnums2.length, 0,
|
||||
"The last page in the third level shouldn't contain any non-enumerable elements.");
|
||||
|
||||
is(lastPage3._enum.querySelectorAll(".variables-view-property .name")[0].getAttribute("value"),
|
||||
9600, "The properties in this level are named correctly (3).");
|
||||
is(lastPage3._enum.querySelectorAll(".variables-view-property .name")[1].getAttribute("value"),
|
||||
9601, "The properties in this level are named correctly (3).");
|
||||
is(lastPage3._enum.querySelectorAll(".variables-view-property .name")[398].getAttribute("value"),
|
||||
is(lastPage2._enum.querySelectorAll(".variables-view-property .name")[0].getAttribute("value"),
|
||||
9375, "The properties in this level are named correctly (3).");
|
||||
is(lastPage2._enum.querySelectorAll(".variables-view-property .name")[1].getAttribute("value"),
|
||||
9376, "The properties in this level are named correctly (3).");
|
||||
is(lastPage2._enum.querySelectorAll(".variables-view-property .name")[623].getAttribute("value"),
|
||||
9998, "The properties in this level are named correctly (3).");
|
||||
is(lastPage3._enum.querySelectorAll(".variables-view-property .name")[399].getAttribute("value"),
|
||||
is(lastPage2._enum.querySelectorAll(".variables-view-property .name")[624].getAttribute("value"),
|
||||
9999, "The properties in this level are named correctly (3).");
|
||||
|
||||
is(lastPage3._enum.querySelectorAll(".variables-view-property .value")[0].getAttribute("value"),
|
||||
399, "The properties in this level have the correct value (3).");
|
||||
is(lastPage3._enum.querySelectorAll(".variables-view-property .value")[1].getAttribute("value"),
|
||||
398, "The properties in this level have the correct value (3).");
|
||||
is(lastPage3._enum.querySelectorAll(".variables-view-property .value")[398].getAttribute("value"),
|
||||
is(lastPage2._enum.querySelectorAll(".variables-view-property .value")[0].getAttribute("value"),
|
||||
624, "The properties in this level have the correct value (3).");
|
||||
is(lastPage2._enum.querySelectorAll(".variables-view-property .value")[1].getAttribute("value"),
|
||||
623, "The properties in this level have the correct value (3).");
|
||||
is(lastPage2._enum.querySelectorAll(".variables-view-property .value")[623].getAttribute("value"),
|
||||
1, "The properties in this level have the correct value (3).");
|
||||
is(lastPage3._enum.querySelectorAll(".variables-view-property .value")[399].getAttribute("value"),
|
||||
is(lastPage2._enum.querySelectorAll(".variables-view-property .value")[624].getAttribute("value"),
|
||||
0, "The properties in this level have the correct value (3).");
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,9 @@ function TargetEventsHandler() {
|
||||
}
|
||||
|
||||
TargetEventsHandler.prototype = {
|
||||
get target() NetMonitorController._target,
|
||||
get target() {
|
||||
return NetMonitorController._target;
|
||||
},
|
||||
|
||||
/**
|
||||
* Listen for events emitted by the current tab target.
|
||||
@ -448,8 +450,13 @@ function NetworkEventsHandler() {
|
||||
}
|
||||
|
||||
NetworkEventsHandler.prototype = {
|
||||
get client() NetMonitorController._target.client,
|
||||
get webConsoleClient() NetMonitorController.webConsoleClient,
|
||||
get client() {
|
||||
return NetMonitorController._target.client;
|
||||
},
|
||||
|
||||
get webConsoleClient() {
|
||||
return NetMonitorController.webConsoleClient;
|
||||
},
|
||||
|
||||
/**
|
||||
* Connect to the current target client.
|
||||
@ -763,7 +770,9 @@ NetMonitorController.NetworkEventsHandler = new NetworkEventsHandler();
|
||||
*/
|
||||
Object.defineProperties(window, {
|
||||
"gNetwork": {
|
||||
get: function() NetMonitorController.NetworkEventsHandler,
|
||||
get: function() {
|
||||
return NetMonitorController.NetworkEventsHandler;
|
||||
},
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
|
@ -948,19 +948,21 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
||||
/**
|
||||
* Returns an object with all the filter predicates as [key: function] pairs.
|
||||
*/
|
||||
get _allFilterPredicates() ({
|
||||
all: () => true,
|
||||
html: this.isHtml,
|
||||
css: this.isCss,
|
||||
js: this.isJs,
|
||||
xhr: this.isXHR,
|
||||
fonts: this.isFont,
|
||||
images: this.isImage,
|
||||
media: this.isMedia,
|
||||
flash: this.isFlash,
|
||||
other: this.isOther,
|
||||
freetext: this.isFreetextMatch
|
||||
}),
|
||||
get _allFilterPredicates() {
|
||||
return {
|
||||
all: () => true,
|
||||
html: this.isHtml,
|
||||
css: this.isCss,
|
||||
js: this.isJs,
|
||||
xhr: this.isXHR,
|
||||
fonts: this.isFont,
|
||||
images: this.isImage,
|
||||
media: this.isMedia,
|
||||
flash: this.isFlash,
|
||||
other: this.isOther,
|
||||
freetext: this.isFreetextMatch
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Sorts all network requests in this container by a specified detail.
|
||||
@ -1074,52 +1076,72 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
||||
* @return boolean
|
||||
* True if the item should be visible, false otherwise.
|
||||
*/
|
||||
isHtml: function({ attachment: { mimeType } })
|
||||
mimeType && mimeType.includes("/html"),
|
||||
isHtml: function({ attachment: { mimeType } }) {
|
||||
return mimeType && mimeType.includes("/html");
|
||||
},
|
||||
|
||||
isCss: function({ attachment: { mimeType } })
|
||||
mimeType && mimeType.includes("/css"),
|
||||
isCss: function({ attachment: { mimeType } }) {
|
||||
return mimeType && mimeType.includes("/css");
|
||||
},
|
||||
|
||||
isJs: function({ attachment: { mimeType } })
|
||||
mimeType && (
|
||||
isJs: function({ attachment: { mimeType } }) {
|
||||
return mimeType && (
|
||||
mimeType.includes("/ecmascript") ||
|
||||
mimeType.includes("/javascript") ||
|
||||
mimeType.includes("/x-javascript")),
|
||||
mimeType.includes("/x-javascript"));
|
||||
},
|
||||
|
||||
isXHR: function({ attachment: { isXHR } })
|
||||
isXHR,
|
||||
isXHR: function({ attachment: { isXHR } }) {
|
||||
return isXHR;
|
||||
},
|
||||
|
||||
isFont: function({ attachment: { url, mimeType } }) // Fonts are a mess.
|
||||
(mimeType && (
|
||||
mimeType.includes("font/") ||
|
||||
mimeType.includes("/font"))) ||
|
||||
url.includes(".eot") ||
|
||||
url.includes(".ttf") ||
|
||||
url.includes(".otf") ||
|
||||
url.includes(".woff"),
|
||||
isFont: function({ attachment: { url, mimeType } }) {
|
||||
// Fonts are a mess.
|
||||
return (mimeType && (
|
||||
mimeType.includes("font/") ||
|
||||
mimeType.includes("/font"))) ||
|
||||
url.includes(".eot") ||
|
||||
url.includes(".ttf") ||
|
||||
url.includes(".otf") ||
|
||||
url.includes(".woff");
|
||||
},
|
||||
|
||||
isImage: function({ attachment: { mimeType } })
|
||||
mimeType && mimeType.includes("image/"),
|
||||
isImage: function({ attachment: { mimeType } }) {
|
||||
return mimeType && mimeType.includes("image/");
|
||||
},
|
||||
|
||||
isMedia: function({ attachment: { mimeType } }) // Not including images.
|
||||
mimeType && (
|
||||
isMedia: function({ attachment: { mimeType } }) {
|
||||
// Not including images.
|
||||
return mimeType && (
|
||||
mimeType.includes("audio/") ||
|
||||
mimeType.includes("video/") ||
|
||||
mimeType.includes("model/")),
|
||||
mimeType.includes("model/"));
|
||||
},
|
||||
|
||||
isFlash: function({ attachment: { url, mimeType } }) // Flash is a mess.
|
||||
(mimeType && (
|
||||
mimeType.includes("/x-flv") ||
|
||||
mimeType.includes("/x-shockwave-flash"))) ||
|
||||
url.includes(".swf") ||
|
||||
url.includes(".flv"),
|
||||
isFlash: function({ attachment: { url, mimeType } }) {
|
||||
// Flash is a mess.
|
||||
return (mimeType && (
|
||||
mimeType.includes("/x-flv") ||
|
||||
mimeType.includes("/x-shockwave-flash"))) ||
|
||||
url.includes(".swf") ||
|
||||
url.includes(".flv");
|
||||
},
|
||||
|
||||
isOther: function(e)
|
||||
!this.isHtml(e) && !this.isCss(e) && !this.isJs(e) && !this.isXHR(e) &&
|
||||
!this.isFont(e) && !this.isImage(e) && !this.isMedia(e) && !this.isFlash(e),
|
||||
isOther: function(e) {
|
||||
return !this.isHtml(e) &&
|
||||
!this.isCss(e) &&
|
||||
!this.isJs(e) &&
|
||||
!this.isXHR(e) &&
|
||||
!this.isFont(e) &&
|
||||
!this.isImage(e) &&
|
||||
!this.isMedia(e) &&
|
||||
!this.isFlash(e);
|
||||
},
|
||||
|
||||
isFreetextMatch: function({ attachment: { url } }, text) //no text is a positive match
|
||||
!text || url.includes(text),
|
||||
isFreetextMatch: function({ attachment: { url } }, text) {
|
||||
//no text is a positive match
|
||||
return !text || url.includes(text);
|
||||
},
|
||||
|
||||
/**
|
||||
* Predicates used when sorting items.
|
||||
@ -1133,18 +1155,21 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
||||
* 0 to leave aFirst and aSecond unchanged with respect to each other
|
||||
* 1 to sort aSecond to a lower index than aFirst
|
||||
*/
|
||||
_byTiming: function({ attachment: first }, { attachment: second })
|
||||
first.startedMillis > second.startedMillis,
|
||||
_byTiming: function({ attachment: first }, { attachment: second }) {
|
||||
return first.startedMillis > second.startedMillis;
|
||||
},
|
||||
|
||||
_byStatus: function({ attachment: first }, { attachment: second })
|
||||
first.status == second.status
|
||||
? first.startedMillis > second.startedMillis
|
||||
: first.status > second.status,
|
||||
_byStatus: function({ attachment: first }, { attachment: second }) {
|
||||
return first.status == second.status
|
||||
? first.startedMillis > second.startedMillis
|
||||
: first.status > second.status;
|
||||
},
|
||||
|
||||
_byMethod: function({ attachment: first }, { attachment: second })
|
||||
first.method == second.method
|
||||
? first.startedMillis > second.startedMillis
|
||||
: first.method > second.method,
|
||||
_byMethod: function({ attachment: first }, { attachment: second }) {
|
||||
return first.method == second.method
|
||||
? first.startedMillis > second.startedMillis
|
||||
: first.method > second.method;
|
||||
},
|
||||
|
||||
_byFile: function({ attachment: first }, { attachment: second }) {
|
||||
let firstUrl = this._getUriNameWithQuery(first.url).toLowerCase();
|
||||
@ -3256,8 +3281,8 @@ PerformanceStatisticsView.prototype = {
|
||||
/**
|
||||
* DOM query helper.
|
||||
*/
|
||||
function $(aSelector, aTarget = document) aTarget.querySelector(aSelector);
|
||||
function $all(aSelector, aTarget = document) aTarget.querySelectorAll(aSelector);
|
||||
let $ = (aSelector, aTarget = document) => aTarget.querySelector(aSelector);
|
||||
let $all = (aSelector, aTarget = document) => aTarget.querySelectorAll(aSelector);
|
||||
|
||||
/**
|
||||
* Helper for getting an nsIURL instance out of a string.
|
||||
@ -3352,7 +3377,7 @@ function parseRequestText(aText, aName, aDivider) {
|
||||
* List of headers in text format
|
||||
*/
|
||||
function writeHeaderText(aHeaders) {
|
||||
return [(name + ": " + value) for ({name, value} of aHeaders)].join("\n");
|
||||
return aHeaders.map(({name, value}) => name + ": " + value).join("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3364,7 +3389,7 @@ function writeHeaderText(aHeaders) {
|
||||
* List of query params in text format
|
||||
*/
|
||||
function writeQueryText(aParams) {
|
||||
return [(name + "=" + value) for ({name, value} of aParams)].join("\n");
|
||||
return aParams.map(({name, value}) => name + "=" + value).join("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3376,7 +3401,7 @@ function writeQueryText(aParams) {
|
||||
* Query string that can be appended to a url.
|
||||
*/
|
||||
function writeQueryString(aParams) {
|
||||
return [(name + "=" + value) for ({name, value} of aParams)].join("&");
|
||||
return aParams.map(({name, value}) => name + "=" + value).join("&");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +56,9 @@ NetMonitorPanel.prototype = {
|
||||
|
||||
// DevToolPanel API
|
||||
|
||||
get target() this._toolbox.target,
|
||||
get target() {
|
||||
return this._toolbox.target;
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
// Make sure this panel is not already destroyed.
|
||||
|
@ -16,7 +16,7 @@ function test() {
|
||||
RequestsMenu.lazyUpdate = false;
|
||||
NetworkDetails._params.lazyEmpty = false;
|
||||
|
||||
Task.spawn(function () {
|
||||
Task.spawn(function*() {
|
||||
yield waitForNetworkEvents(aMonitor, 1, 6);
|
||||
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" },
|
||||
|
@ -14,7 +14,7 @@ function test() {
|
||||
let TAB_UPDATED = aMonitor.panelWin.EVENTS.TAB_UPDATED;
|
||||
RequestsMenu.lazyUpdate = false;
|
||||
|
||||
Task.spawn(function () {
|
||||
Task.spawn(function*() {
|
||||
yield waitForNetworkEvents(aMonitor, 1);
|
||||
is(RequestsMenu.selectedItem, null,
|
||||
"There shouldn't be any selected item in the requests menu.");
|
||||
@ -174,7 +174,7 @@ function test() {
|
||||
EventUtils.sendMouseEvent({ type: "mousedown" },
|
||||
document.querySelectorAll("#details-pane tab")[3]);
|
||||
|
||||
return Task.spawn(function () {
|
||||
return Task.spawn(function*() {
|
||||
yield waitFor(aMonitor.panelWin, TAB_UPDATED);
|
||||
|
||||
let tab = document.querySelectorAll("#details-pane tab")[3];
|
||||
|
@ -404,7 +404,7 @@ function testFilterButtons(aMonitor, aFilterType) {
|
||||
let buttons = doc.querySelectorAll(".requests-menu-footer-button");
|
||||
|
||||
// Only target should be checked.
|
||||
let checkStatus = [(button == target) ? 1 : 0 for (button of buttons)]
|
||||
let checkStatus = [...buttons].map(button => button == target ? 1 : 0);
|
||||
testFilterButtonsCustom(aMonitor, checkStatus);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,9 @@ PerformancePanel.prototype = {
|
||||
|
||||
// DevToolPanel API
|
||||
|
||||
get target() this._toolbox.target,
|
||||
get target() {
|
||||
return this._toolbox.target;
|
||||
},
|
||||
|
||||
destroy: Task.async(function*() {
|
||||
// Make sure this panel is not already destroyed.
|
||||
|
@ -73,6 +73,8 @@
|
||||
</popupset>
|
||||
|
||||
<hbox class="theme-body" flex="1">
|
||||
|
||||
<!-- Sidebar: controls and recording list -->
|
||||
<vbox id="recordings-pane">
|
||||
<toolbar id="recordings-toolbar"
|
||||
class="devtools-toolbar">
|
||||
@ -92,15 +94,21 @@
|
||||
<vbox id="recordings-list" flex="1"/>
|
||||
</vbox>
|
||||
|
||||
<!-- Main panel content -->
|
||||
<vbox id="performance-pane" flex="1">
|
||||
<toolbar id="performance-toolbar" class="devtools-toolbar">
|
||||
<hbox id="performance-toolbar-control-other" class="devtools-toolbarbutton-group">
|
||||
|
||||
<!-- Top toolbar controls -->
|
||||
<toolbar id="performance-toolbar"
|
||||
class="devtools-toolbar">
|
||||
<hbox id="performance-toolbar-controls-other"
|
||||
class="devtools-toolbarbutton-group">
|
||||
<toolbarbutton id="filter-button"
|
||||
class="devtools-toolbarbutton"
|
||||
popup="performance-filter-menupopup"
|
||||
tooltiptext="&profilerUI.options.filter.tooltiptext;"/>
|
||||
</hbox>
|
||||
<hbox id="performance-toolbar-controls-detail-views" class="devtools-toolbarbutton-group">
|
||||
<hbox id="performance-toolbar-controls-detail-views"
|
||||
class="devtools-toolbarbutton-group">
|
||||
<toolbarbutton id="select-waterfall-view"
|
||||
class="devtools-toolbarbutton devtools-button"
|
||||
label="Waterfall"
|
||||
@ -128,7 +136,8 @@
|
||||
data-view="memory-flamegraph" />
|
||||
</hbox>
|
||||
<spacer flex="1"></spacer>
|
||||
<hbox id="performance-toolbar-control-options" class="devtools-toolbarbutton-group">
|
||||
<hbox id="performance-toolbar-controls-options"
|
||||
class="devtools-toolbarbutton-group">
|
||||
<toolbarbutton id="performance-options-button"
|
||||
class="devtools-toolbarbutton devtools-option-toolbarbutton"
|
||||
popup="performance-options-menupopup"
|
||||
@ -136,7 +145,10 @@
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<!-- Recording contents and general notice messages -->
|
||||
<deck id="performance-view" flex="1">
|
||||
|
||||
<!-- "Empty" notice, shown when there's no recordings available -->
|
||||
<hbox id="empty-notice"
|
||||
class="notice-container"
|
||||
align="center"
|
||||
@ -149,13 +161,21 @@
|
||||
standalone="true"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
|
||||
<!-- Recording contents -->
|
||||
<vbox id="performance-view-content" flex="1">
|
||||
|
||||
<!-- Overview graphs -->
|
||||
<vbox id="overview-pane">
|
||||
<hbox id="markers-overview"/>
|
||||
<hbox id="memory-overview"/>
|
||||
<hbox id="time-framerate"/>
|
||||
</vbox>
|
||||
|
||||
<!-- Detail views and specific notice messages -->
|
||||
<deck id="details-pane-container" flex="1">
|
||||
|
||||
<!-- "Loading" notice, shown when a recording is being loaded -->
|
||||
<hbox id="loading-notice"
|
||||
class="notice-container devtools-throbber"
|
||||
align="center"
|
||||
@ -163,61 +183,65 @@
|
||||
flex="1">
|
||||
<label value="&profilerUI.loadingNotice;"/>
|
||||
</hbox>
|
||||
<hbox id="recording-notice"
|
||||
|
||||
<!-- "Recording" notice, shown when a recording is in progress -->
|
||||
<vbox id="recording-notice"
|
||||
class="notice-container"
|
||||
align="center"
|
||||
pack="center"
|
||||
flex="1">
|
||||
<vbox>
|
||||
<hbox class="devtools-toolbarbutton-group"
|
||||
pack="center">
|
||||
<toolbarbutton class="devtools-toolbarbutton record-button"
|
||||
label="&profilerUI.stopRecording;"
|
||||
standalone="true"/>
|
||||
</hbox>
|
||||
<label class="realtime-disabled-message">
|
||||
Realtime recording data disabled on non-multiprocess Firefox.
|
||||
</label>
|
||||
<label class="realtime-disabled-on-e10s-message">
|
||||
Enable multiprocess Firefox in preferences for rendering recording data in realtime.
|
||||
</label>
|
||||
<label class="buffer-status-message"
|
||||
tooltiptext="&profilerUI.bufferStatusTooltip;"/>
|
||||
<label class="buffer-status-message-full"
|
||||
value="&profilerUI.bufferStatusFull;"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<hbox id="console-recording-notice"
|
||||
<hbox class="devtools-toolbarbutton-group"
|
||||
pack="center">
|
||||
<toolbarbutton class="devtools-toolbarbutton record-button"
|
||||
label="&profilerUI.stopRecording;"
|
||||
standalone="true"/>
|
||||
</hbox>
|
||||
<label class="realtime-disabled-message">
|
||||
Realtime recording data disabled on non-multiprocess Firefox.
|
||||
</label>
|
||||
<label class="realtime-disabled-on-e10s-message">
|
||||
Enable multiprocess Firefox in preferences for rendering recording data in realtime.
|
||||
</label>
|
||||
<label class="buffer-status-message"
|
||||
tooltiptext="&profilerUI.bufferStatusTooltip;"/>
|
||||
<label class="buffer-status-message-full"
|
||||
value="&profilerUI.bufferStatusFull;"/>
|
||||
</vbox>
|
||||
|
||||
<!-- "Console" notice, shown when a console recording is in progress -->
|
||||
<vbox id="console-recording-notice"
|
||||
class="notice-container"
|
||||
align="center"
|
||||
pack="center"
|
||||
flex="1">
|
||||
<vbox flex="1" align="center">
|
||||
<hbox class="console-profile-recording-notice">
|
||||
<label value="&profilerUI.console.recordingNoticeStart;" />
|
||||
<label class="console-profile-command" />
|
||||
<label value="&profilerUI.console.recordingNoticeEnd;" />
|
||||
</hbox>
|
||||
<hbox class="console-profile-stop-notice">
|
||||
<label value="&profilerUI.console.stopCommandStart;" />
|
||||
<label class="console-profile-command" />
|
||||
<label value="&profilerUI.console.stopCommandEnd;" />
|
||||
</hbox>
|
||||
<label class="realtime-disabled-message">
|
||||
Realtime recording data disabled on non-multiprocess Firefox.
|
||||
</label>
|
||||
<label class="realtime-disabled-on-e10s-message">
|
||||
Enable multiprocess Firefox in preferences for rendering recording data in realtime.
|
||||
</label>
|
||||
<label class="buffer-status-message"
|
||||
tooltiptext="&profilerUI.bufferStatusTooltip;"/>
|
||||
<label class="buffer-status-message-full"
|
||||
value="&profilerUI.bufferStatusFull;"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<hbox class="console-profile-recording-notice">
|
||||
<label value="&profilerUI.console.recordingNoticeStart;" />
|
||||
<label class="console-profile-command" />
|
||||
<label value="&profilerUI.console.recordingNoticeEnd;" />
|
||||
</hbox>
|
||||
<hbox class="console-profile-stop-notice">
|
||||
<label value="&profilerUI.console.stopCommandStart;" />
|
||||
<label class="console-profile-command" />
|
||||
<label value="&profilerUI.console.stopCommandEnd;" />
|
||||
</hbox>
|
||||
<label class="realtime-disabled-message">
|
||||
Realtime recording data disabled on non-multiprocess Firefox.
|
||||
</label>
|
||||
<label class="realtime-disabled-on-e10s-message">
|
||||
Enable multiprocess Firefox in preferences for rendering recording data in realtime.
|
||||
</label>
|
||||
<label class="buffer-status-message"
|
||||
tooltiptext="&profilerUI.bufferStatusTooltip;"/>
|
||||
<label class="buffer-status-message-full"
|
||||
value="&profilerUI.bufferStatusFull;"/>
|
||||
</vbox>
|
||||
|
||||
<!-- Detail views -->
|
||||
<deck id="details-pane" flex="1">
|
||||
|
||||
<!-- Waterfall -->
|
||||
<hbox id="waterfall-view" flex="1">
|
||||
<vbox id="waterfall-breakdown" flex="1" class="devtools-main-content" />
|
||||
<vbox id="waterfall-breakdown" flex="1" />
|
||||
<splitter class="devtools-side-splitter"/>
|
||||
<vbox id="waterfall-details"
|
||||
class="theme-sidebar"
|
||||
@ -225,6 +249,7 @@
|
||||
height="150"/>
|
||||
</hbox>
|
||||
|
||||
<!-- JS Tree and JIT view -->
|
||||
<hbox id="js-profile-view" flex="1">
|
||||
<vbox id="js-calltree-view" flex="1">
|
||||
<hbox class="call-tree-headers-container">
|
||||
@ -261,7 +286,9 @@
|
||||
</hbox>
|
||||
<vbox class="call-tree-cells-container" flex="1"/>
|
||||
</vbox>
|
||||
|
||||
<splitter id="js-call-tree-splitter" class="devtools-side-splitter"/>
|
||||
|
||||
<vbox id="jit-optimizations-view" hidden="true">
|
||||
<toolbar id="jit-optimizations-toolbar" class="devtools-toolbar">
|
||||
<hbox id="jit-optimizations-header">
|
||||
@ -275,9 +302,11 @@
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
<!-- JS FlameChart -->
|
||||
<hbox id="js-flamegraph-view" flex="1">
|
||||
</hbox>
|
||||
|
||||
<!-- Memory Tree -->
|
||||
<vbox id="memory-calltree-view" flex="1">
|
||||
<hbox class="call-tree-headers-container">
|
||||
<label class="plain call-tree-header"
|
||||
@ -298,8 +327,10 @@
|
||||
<vbox class="call-tree-cells-container" flex="1"/>
|
||||
</vbox>
|
||||
|
||||
<!-- Memory FlameChart -->
|
||||
<hbox id="memory-flamegraph-view" flex="1">
|
||||
</hbox>
|
||||
|
||||
</deck>
|
||||
</deck>
|
||||
</vbox>
|
||||
|
@ -6,7 +6,7 @@
|
||||
* You can also use this initialization format as a template for other tests.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, panel, toolbox } = yield initPerformance(SIMPLE_URL);
|
||||
|
||||
ok(target, "Should have a target available.");
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests the marker utils methods.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { TIMELINE_BLUEPRINT } = devtools.require("devtools/performance/global");
|
||||
let Utils = devtools.require("devtools/performance/marker-utils");
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that the categories are shown in the js call tree when platform data
|
||||
* is enabled.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, DetailsView, JsCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the js call tree view renders the correct columns.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, $$, DetailsView, JsCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the memory call tree view renders the correct columns.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, $$, DetailsView, MemoryCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
let WAIT_TIME = 100;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, front } = yield initBackend(SIMPLE_URL, {
|
||||
TEST_MOCK_MEMORY_ACTOR: true,
|
||||
TEST_MOCK_TIMELINE_ACTOR: true
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
let WAIT_TIME = 100;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, front } = yield initBackend(SIMPLE_URL, {
|
||||
TEST_MOCK_MEMORY_ACTOR: true
|
||||
});
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
const WAIT_TIME = 1000; // ms
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { gFront: front, gTarget: target } = panel.panelWin;
|
||||
let connection = getPerformanceActorsConnection(target);
|
||||
|
@ -7,7 +7,7 @@
|
||||
* `getBufferUsage()` values.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, front } = yield initBackend(SIMPLE_URL, {
|
||||
TEST_MOCK_PROFILER_CHECK_TIMER: 10,
|
||||
TEST_PROFILER_FILTER_STATUS: ["position", "totalSize", "generation"]
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that recording notices does not display any buffer
|
||||
* status on servers that do not support buffer statuses.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL, void 0, {
|
||||
TEST_MOCK_PROFILER_CHECK_TIMER: 10,
|
||||
TEST_PROFILER_FILTER_STATUS: ["position", "totalSize", "generation"]
|
||||
|
@ -9,7 +9,7 @@
|
||||
let { getPerformanceActorsConnection } = devtools.require("devtools/performance/front");
|
||||
let WAIT_TIME = 10;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let profilerConnected = waitForProfilerConnection();
|
||||
let { target, toolbox, console } = yield initConsole(SIMPLE_URL);
|
||||
yield profilerConnected;
|
||||
|
@ -9,7 +9,7 @@
|
||||
let { getPerformanceActorsConnection } = devtools.require("devtools/performance/front");
|
||||
let WAIT_TIME = 10;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let profilerConnected = waitForProfilerConnection();
|
||||
let { target, toolbox, console } = yield initConsole(SIMPLE_URL);
|
||||
yield profilerConnected;
|
||||
|
@ -9,7 +9,7 @@
|
||||
let { getPerformanceActorsConnection } = devtools.require("devtools/performance/front");
|
||||
let WAIT_TIME = 10;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let profilerConnected = waitForProfilerConnection();
|
||||
let { target, toolbox, console } = yield initConsole(SIMPLE_URL);
|
||||
yield profilerConnected;
|
||||
|
@ -6,7 +6,7 @@
|
||||
* after being opened.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
loadFrameScripts();
|
||||
let { target, toolbox, panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { $, EVENTS, gFront, PerformanceController, OverviewView, RecordingsView } = panel.panelWin;
|
||||
|
@ -6,7 +6,7 @@
|
||||
* in the recording list.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
loadFrameScripts();
|
||||
let { target, toolbox, panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { $, EVENTS, gFront, PerformanceController, OverviewView, RecordingsView } = panel.panelWin;
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that console recordings can overlap (not completely nested).
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
loadFrameScripts();
|
||||
let { target, toolbox, panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { $, EVENTS, gFront, PerformanceController, OverviewView, RecordingsView, WaterfallView } = panel.panelWin;
|
||||
|
@ -7,7 +7,7 @@
|
||||
* match any pending recordings does nothing.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
loadFrameScripts();
|
||||
let { target, toolbox, panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { $, EVENTS, gFront, PerformanceController, OverviewView, RecordingsView, WaterfallView } = panel.panelWin;
|
||||
|
@ -21,7 +21,7 @@ function testRecordings (win, expected) {
|
||||
});
|
||||
}
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
loadFrameScripts();
|
||||
let { target, toolbox, panel } = yield initPerformance(SIMPLE_URL);
|
||||
let win = panel.panelWin;
|
||||
|
@ -6,7 +6,7 @@
|
||||
* an in-progress console profile.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
loadFrameScripts();
|
||||
let { target, toolbox, panel } = yield initPerformance(SIMPLE_URL);
|
||||
let win = panel.panelWin;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
const WAIT_TIME = 1000; // ms
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let front = panel.panelWin.gFront;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
const WAIT_TIME = 1000; // ms
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let front = panel.panelWin.gFront;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the details view toggles subviews.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, DetailsView, document: doc } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the details view utility functions work as advertised.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView } = panel.panelWin;
|
||||
let { WaterfallView, JsCallTreeView, JsFlameGraphView } = panel.panelWin;
|
||||
|
@ -6,7 +6,7 @@
|
||||
* have memory data (withMemory: false), and that when a memory panel is selected,
|
||||
* switching to a panel that does not have memory goes to a default panel instead.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, OverviewView, DetailsView } = panel.panelWin;
|
||||
let { $, RecordingsView, WaterfallView, MemoryCallTreeView, MemoryFlameGraphView } = panel.panelWin;
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that the details view hides the toolbar buttons when a recording
|
||||
* doesn't exist or is in progress.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, $$, PerformanceController, RecordingsView, WaterfallView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the details view utility functions work as advertised.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView } = panel.panelWin;
|
||||
let { PerformanceController, WaterfallView, JsCallTreeView } = panel.panelWin;
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the views with `shouldUpdateWhileMouseIsActive` works as intended.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, OverviewView, DetailsView, WaterfallView, JsFlameGraphView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the call tree view renders content after recording.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the flamegraph view renders content after recording.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsFlameGraphView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the memory call tree view renders content after recording.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, MemoryCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the memory flamegraph view renders content after recording.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, MemoryFlameGraphView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the waterfall view renders content after recording.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, DetailsView, WaterfallView } = panel.panelWin;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
const { ThreadNode } = devtools.require("devtools/performance/tree-model");
|
||||
const RecordingUtils = devtools.require("devtools/performance/recording-utils")
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let focus = 0;
|
||||
let focusEvent = () => focus++;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
let WAIT_TIME = 1000;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, front } = yield initBackend(SIMPLE_URL);
|
||||
|
||||
let recording = yield front.startRecording({
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
let WAIT_TIME = 1000;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, front } = yield initBackend(SIMPLE_URL);
|
||||
let config = { withMarkers: true, withMemory: true, withTicks: true };
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
let WAIT_TIME = 1000;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, front } = yield initBackend(SIMPLE_URL);
|
||||
|
||||
let startModel = yield front.startRecording();
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Test basic functionality of PerformanceFront, retrieving timeline data.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, front } = yield initBackend(SIMPLE_URL);
|
||||
|
||||
let lastMemoryDelta = 0;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
let { getPerformanceActorsConnection } = devtools.require("devtools/performance/front");
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let profilerConnected = waitForProfilerConnection();
|
||||
let { target, toolbox, console } = yield initConsole(SIMPLE_URL);
|
||||
yield profilerConnected;
|
||||
|
@ -10,7 +10,7 @@ const RecordingUtils = devtools.require("devtools/performance/recording-utils");
|
||||
|
||||
Services.prefs.setBoolPref(INVERT_PREF, false);
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, $$, window, PerformanceController } = panel.panelWin;
|
||||
let { OverviewView, DetailsView, JITOptimizationsView, JsCallTreeView, RecordingsView } = panel.panelWin;
|
||||
|
@ -12,7 +12,7 @@ const RecordingUtils = devtools.require("devtools/performance/recording-utils");
|
||||
Services.prefs.setBoolPref(INVERT_PREF, false);
|
||||
Services.prefs.setBoolPref(PLATFORM_DATA_PREF, false);
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, $$, window, PerformanceController } = panel.panelWin;
|
||||
let { OverviewView, DetailsView, JITOptimizationsView, JsCallTreeView, RecordingsView } = panel.panelWin;
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that toggling preferences before there are any recordings does not throw.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that toggling preferences during a recording does not throw.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
Services.prefs.setBoolPref(EXPERIMENTAL_PREF, false);
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { $, EVENTS, PerformanceController } = panel.panelWin;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Tests that setting the `devtools.performance.memory.` prefs propagate to the memory actor.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, $, gFront } = panel.panelWin;
|
||||
Services.prefs.setBoolPref(MEMORY_PREF, true);
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that `enable-framerate` toggles the visibility of the fps graph,
|
||||
* as well as enabling ticks data on the PerformanceFront.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, $ } = panel.panelWin;
|
||||
Services.prefs.setBoolPref(FRAMERATE_PREF, false);
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that `enable-memory` toggles the visibility of the memory graph,
|
||||
* as well as enabling memory data on the PerformanceFront.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, $ } = panel.panelWin;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that toggling `enable-memory` during a recording doesn't change that
|
||||
* recording's state and does not break.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, $ } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the js flamegraphs get rerendered when toggling `flatten-tree-recursion`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, DetailsView, JsFlameGraphView, FlameGraphUtils } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the memory flamegraphs get rerendered when toggling `flatten-tree-recursion`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, DetailsView, MemoryFlameGraphView, RecordingUtils, FlameGraphUtils } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the js call tree views get rerendered when toggling `invert-call-tree`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the memory call tree views get rerendered when toggling `invert-call-tree`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, MemoryCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the js Flamegraphs gets rerendered when toggling `invert-flame-graph`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsFlameGraphView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the memory Flamegraphs gets rerendered when toggling `invert-flame-graph`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, MemoryFlameGraphView } = panel.panelWin;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
/**
|
||||
* Tests that setting the `devtools.performance.profiler.` prefs propagate to the profiler actor.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { gFront } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the js flamegraphs get rerendered when toggling `show-idle-blocks`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsFlameGraphView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the memory flamegraphs get rerendered when toggling `show-idle-blocks`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, MemoryFlameGraphView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the js call tree views get rerendered when toggling `show-platform-data`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsCallTreeView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the js flamegraphs get rerendered when toggling `show-platform-data`
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, DetailsView, JsFlameGraphView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the overview continuously renders content when recording.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, OverviewView } = panel.panelWin;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that the overview graphs cannot be selected during recording
|
||||
* and that they're cleared upon rerecording.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, OverviewView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the overview graphs share the exact same width and scaling.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, OverviewView } = panel.panelWin;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that the overview graphs do not render when realtime rendering is off
|
||||
* due to lack of e10s.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { $, EVENTS, PerformanceController, OverviewView, RecordingsView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that events are fired from OverviewView from selection manipulation.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, OverviewView } = panel.panelWin;
|
||||
let startTime, endTime, params, _;
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the graphs' selection is correctly disabled or enabled.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, OverviewView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the graphs' selections are linked.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, OverviewView } = panel.panelWin;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that the `setTimeInterval` and `getTimeInterval` functions
|
||||
* work properly.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, OverviewView } = panel.panelWin;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Tests that the detail views are rerendered after the range changes.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, PerformanceController, OverviewView, DetailsView } = panel.panelWin;
|
||||
let { WaterfallView, JsCallTreeView, JsFlameGraphView } = panel.panelWin;
|
||||
|
@ -6,7 +6,7 @@
|
||||
* completed, and rec data.
|
||||
*/
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, panel, toolbox } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, gFront: front, PerformanceController } = panel.panelWin;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
let BUFFER_SIZE = 20000;
|
||||
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { target, front } = yield initBackend(SIMPLE_URL, { TEST_MOCK_PROFILER_CHECK_TIMER: 10 });
|
||||
let config = { bufferSize: BUFFER_SIZE };
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Tests that the recording notice panes are toggled in correct scenarios
|
||||
* for initialization and a single recording.
|
||||
*/
|
||||
function spawnTest () {
|
||||
function* spawnTest() {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, PerformanceView, RecordingsView } = panel.panelWin;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user