Backed out 3 changesets (bug 1260877) for perma dt fails on devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_page_error.js. CLOSED TREE

Backed out changeset 10fd2d1f0fa2 (bug 1260877)
Backed out changeset e4f28c656165 (bug 1260877)
Backed out changeset 17059c813d40 (bug 1260877)
This commit is contained in:
Razvan Maries 2019-04-16 10:09:37 +03:00
Родитель d88123ff6b
Коммит 37613b6718
20 изменённых файлов: 128 добавлений и 330 удалений

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

@ -287,15 +287,6 @@ webconsole.enablePersistentLogs.label=Persist Logs
# LOCALIZATION NOTE (webconsole.enablePersistentLogs.tooltip)
webconsole.enablePersistentLogs.tooltip=If you enable this option the output will not be cleared each time you navigate to a new page
# LOCALIZATION NOTE (browserconsole.contentMessagesCheckbox.label)
# Label used in the browser console filter bar. This label is used for a checkbox that
# allows the user to show or hide console messages from the content process in the browser
# console.
browserconsole.contentMessagesCheckbox.label=Show Content Messages
# LOCALIZATION NOTE (browserconsole.contentMessagesCheckbox.tooltip)
# Tooltip for the "Show content messages" checkbox in the Browser Console filter bar.
browserconsole.contentMessagesCheckbox.tooltip=Enable this to display messages from the content process in the output
# LOCALIZATION NOTE (webconsole.navigated): this string is used in the console when the
# current inspected page is navigated to a new location.
# Parameters: %S is the new URL.

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

@ -286,11 +286,6 @@ pref("devtools.performance.new-panel-enabled", false);
// Enable message grouping in the console, false by default
pref("devtools.webconsole.groupWarningMessages", false);
// Enable Content messages filtering in the browser console.
pref("devtools.browserconsole.filterContentMessages", false);
// Saved state of the Display content messages checkbox in the browser console.
pref("devtools.browserconsole.contentMessages", false);
// Enable client-side mapping service for source maps
pref("devtools.source-map.client-service.enabled", true);

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

@ -15,7 +15,6 @@ const {
PREFS,
REVERSE_SEARCH_INPUT_TOGGLE,
SELECT_NETWORK_MESSAGE_TAB,
SHOW_CONTENT_MESSAGES_TOGGLE,
SHOW_OBJECT_IN_SIDEBAR,
SIDEBAR_CLOSE,
SPLIT_CONSOLE_CLOSE_BUTTON_TOGGLE,
@ -32,16 +31,6 @@ function persistToggle() {
};
}
function contentMessagesToggle() {
return ({dispatch, getState, prefsService}) => {
dispatch({
type: SHOW_CONTENT_MESSAGES_TOGGLE,
});
const uiState = getAllUi(getState());
prefsService.setBoolPref(PREFS.UI.CONTENT_MESSAGES, uiState.showContentMessages);
};
}
function timestampsToggle(visible) {
return {
type: TIMESTAMPS_TOGGLE,
@ -111,7 +100,6 @@ function reverseSearchInputToggle({initialValue} = {}) {
}
module.exports = {
contentMessagesToggle,
initialize,
persistToggle,
reverseSearchInputToggle,

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

@ -52,7 +52,6 @@ class App extends Component {
reverseSearchInputVisible: PropTypes.bool,
reverseSearchInitialValue: PropTypes.string,
editorMode: PropTypes.bool,
hideShowContentMessagesCheckbox: PropTypes.bool,
};
}
@ -205,7 +204,6 @@ class App extends Component {
autocomplete,
reverseSearchInitialValue,
editorMode,
hideShowContentMessagesCheckbox,
} = this.props;
const classNames = ["webconsole-app"];
@ -235,7 +233,6 @@ class App extends Component {
div({className: "webconsole-flex-wrapper"},
FilterBar({
hidePersistLogsCheckbox: webConsoleUI.isBrowserConsole,
hideShowContentMessagesCheckbox,
attachRefToWebConsoleUI,
closeSplitConsole,
}),

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

@ -30,8 +30,6 @@ class FilterBar extends Component {
attachRefToWebConsoleUI: PropTypes.func.isRequired,
persistLogs: PropTypes.bool.isRequired,
hidePersistLogsCheckbox: PropTypes.bool.isRequired,
showContentMessages: PropTypes.bool.isRequired,
hideShowContentMessagesCheckbox: PropTypes.bool.isRequired,
filteredMessagesCount: PropTypes.object.isRequired,
closeButtonVisible: PropTypes.bool,
closeSplitConsole: PropTypes.func,
@ -41,7 +39,6 @@ class FilterBar extends Component {
static get defaultProps() {
return {
hidePersistLogsCheckbox: false,
hideShowContentMessagesCheckbox: true,
};
}
@ -52,7 +49,6 @@ class FilterBar extends Component {
this.onClickRemoveTextFilter = this.onClickRemoveTextFilter.bind(this);
this.onSearchInput = this.onSearchInput.bind(this);
this.onChangePersistToggle = this.onChangePersistToggle.bind(this);
this.onChangeShowContent = this.onChangeShowContent.bind(this);
this.renderFiltersConfigBar = this.renderFiltersConfigBar.bind(this);
this.renderFilteredMessagesBar = this.renderFilteredMessagesBar.bind(this);
}
@ -72,7 +68,6 @@ class FilterBar extends Component {
const {
filter,
persistLogs,
showContentMessages,
filteredMessagesCount,
closeButtonVisible,
} = this.props;
@ -85,10 +80,6 @@ class FilterBar extends Component {
return true;
}
if (nextProps.showContentMessages !== showContentMessages) {
return true;
}
if (
JSON.stringify(nextProps.filteredMessagesCount) !==
JSON.stringify(filteredMessagesCount)
@ -123,10 +114,6 @@ class FilterBar extends Component {
this.props.dispatch(actions.persistToggle());
}
onChangeShowContent() {
this.props.dispatch(actions.contentMessagesToggle());
}
renderFiltersConfigBar() {
const {
dispatch,
@ -246,9 +233,7 @@ class FilterBar extends Component {
persistLogs,
filteredMessagesCount,
hidePersistLogsCheckbox,
hideShowContentMessagesCheckbox,
closeSplitConsole,
showContentMessages,
} = this.props;
const children = [
@ -285,12 +270,6 @@ class FilterBar extends Component {
onChange: this.onChangePersistToggle,
checked: persistLogs,
}),
!hideShowContentMessagesCheckbox && FilterCheckbox({
label: l10n.getStr("browserconsole.contentMessagesCheckbox.label"),
title: l10n.getStr("browserconsole.contentMessagesCheckbox.tooltip"),
onChange: this.onChangeShowContent,
checked: showContentMessages,
}),
),
];
@ -334,7 +313,6 @@ function mapStateToProps(state) {
return {
filter: getAllFilters(state),
persistLogs: uiState.persistLogs,
showContentMessages: uiState.showContentMessages,
filteredMessagesCount: getFilteredMessagesCount(state),
closeButtonVisible: uiState.closeButtonVisible,
};

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

@ -35,7 +35,6 @@ const actionTypes = {
REVERSE_SEARCH_INPUT_TOGGLE: "REVERSE_SEARCH_INPUT_TOGGLE",
SELECT_NETWORK_MESSAGE_TAB: "SELECT_NETWORK_MESSAGE_TAB",
SHOW_OBJECT_IN_SIDEBAR: "SHOW_OBJECT_IN_SIDEBAR",
SHOW_CONTENT_MESSAGES_TOGGLE: "SHOW_CONTENT_MESSAGES_TOGGLE",
SIDEBAR_CLOSE: "SIDEBAR_CLOSE",
SPLIT_CONSOLE_CLOSE_BUTTON_TOGGLE: "SPLIT_CONSOLE_CLOSE_BUTTON_TOGGLE",
TIMESTAMPS_TOGGLE: "TIMESTAMPS_TOGGLE",
@ -68,8 +67,6 @@ const prefs = {
INPUT_HISTORY_COUNT: "devtools.webconsole.inputHistoryCount",
// Is editor mode enabled.
EDITOR: "devtools.webconsole.input.editor",
// Display content messages in the browser console
CONTENT_MESSAGES: "devtools.browserconsole.contentMessages",
},
FEATURES: {
// We use the same pref to enable the sidebar on webconsole and browser console.
@ -77,7 +74,6 @@ const prefs = {
JSTERM_CODE_MIRROR: "devtools.webconsole.jsterm.codeMirror",
AUTOCOMPLETE: "devtools.webconsole.input.autocomplete",
GROUP_WARNINGS: "devtools.webconsole.groupWarningMessages",
FILTER_CONTENT_MESSAGES: "devtools.browserconsole.filterContentMessages",
},
},
};

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

@ -96,10 +96,9 @@ function cloneState(state) {
* @param {MessageState} state: The message state ( = managed by this reducer).
* @param {FiltersState} filtersState: The filters state.
* @param {PrefsState} prefsState: The preferences state.
* @param {UiState} uiState: The ui state.
* @returns {MessageState} a new messages state.
*/
function addMessage(newMessage, state, filtersState, prefsState, uiState) {
function addMessage(newMessage, state, filtersState, prefsState) {
const {
messagesById,
replayProgressMessages,
@ -174,7 +173,7 @@ function addMessage(newMessage, state, filtersState, prefsState, uiState) {
// We create it and add it to the store.
const groupMessage = createWarningGroupMessage(
warningGroupMessageId, warningGroupType, newMessage);
state = addMessage(groupMessage, state, filtersState, prefsState, uiState);
state = addMessage(groupMessage, state, filtersState, prefsState);
state.warningGroupsById.set(warningGroupMessageId, []);
}
@ -187,7 +186,6 @@ function addMessage(newMessage, state, filtersState, prefsState, uiState) {
messagesState: state,
filtersState,
prefsState,
uiState,
}).visible
) {
// Then we put it in the visibleMessages properties, at the position of the first
@ -236,7 +234,6 @@ function addMessage(newMessage, state, filtersState, prefsState, uiState) {
messagesState: state,
filtersState,
prefsState,
uiState,
});
if (visible) {
@ -277,7 +274,7 @@ function addMessage(newMessage, state, filtersState, prefsState, uiState) {
return state;
}
function messages(state = MessageState(), action, filtersState, prefsState, uiState) {
function messages(state = MessageState(), action, filtersState, prefsState) {
const {
messagesById,
messagesUiById,
@ -322,7 +319,7 @@ function messages(state = MessageState(), action, filtersState, prefsState, uiSt
newState = cloneState(state);
list.forEach(message => {
newState = addMessage(message, newState, filtersState, prefsState, uiState);
newState = addMessage(message, newState, filtersState, prefsState);
});
return limitTopLevelMessageCount(newState, logLimit);
@ -395,7 +392,6 @@ function messages(state = MessageState(), action, filtersState, prefsState, uiSt
messagesState: openState,
filtersState,
prefsState,
uiState,
// We want to check if the message is in an open group
// only if it is not a direct child of the group we're opening.
checkGroup: message.groupId !== action.id,
@ -504,7 +500,6 @@ function messages(state = MessageState(), action, filtersState, prefsState, uiSt
case constants.FILTER_TEXT_SET:
case constants.FILTERS_CLEAR:
case constants.DEFAULT_FILTERS_RESET:
case constants.SHOW_CONTENT_MESSAGES_TOGGLE:
const messagesToShow = [];
const filtered = getDefaultFiltersCounter();
@ -513,7 +508,6 @@ function messages(state = MessageState(), action, filtersState, prefsState, uiSt
messagesState: state,
filtersState,
prefsState,
uiState,
});
if (visible) {
@ -772,25 +766,10 @@ function getMessageVisibility(message, {
messagesState,
filtersState,
prefsState,
uiState,
checkGroup = true,
}) {
// Do not display the message if it's not from chromeContext and we don't show content
// messages.
if (
!uiState.showContentMessages &&
message.chromeContext === false &&
message.type !== MESSAGE_TYPE.COMMAND &&
message.type !== MESSAGE_TYPE.RESULT
) {
return {
visible: false,
cause: "contentMessage",
};
}
const warningGroupMessage =
messagesState.messagesById.get(getParentWarningGroupMessageId(message));
messagesState.messagesById.get(getParentWarningGroupMessageId(message));
// Do not display the message if it's in closed group and not in a warning group.
if (

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

@ -10,7 +10,6 @@ const PrefState = (overrides) => Object.freeze(Object.assign({
sidebarToggle: false,
jstermCodeMirror: false,
groupWarnings: false,
filterContentMessages: false,
historyCount: 50,
}, overrides));

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

@ -11,7 +11,6 @@ const {
PERSIST_TOGGLE,
REVERSE_SEARCH_INPUT_TOGGLE,
SELECT_NETWORK_MESSAGE_TAB,
SHOW_CONTENT_MESSAGES_TOGGLE,
SHOW_OBJECT_IN_SIDEBAR,
SIDEBAR_CLOSE,
SPLIT_CONSOLE_CLOSE_BUTTON_TOGGLE,
@ -26,7 +25,6 @@ const UiState = (overrides) => Object.freeze(Object.assign({
initialized: false,
networkMessageActiveTabId: PANELS.HEADERS,
persistLogs: false,
showContentMessages: false,
sidebarVisible: false,
timestampsVisible: true,
gripInSidebar: null,
@ -39,30 +37,27 @@ const UiState = (overrides) => Object.freeze(Object.assign({
function ui(state = UiState(), action) {
switch (action.type) {
case PERSIST_TOGGLE:
return {...state, persistLogs: !state.persistLogs};
case SHOW_CONTENT_MESSAGES_TOGGLE:
return {...state, showContentMessages: !state.showContentMessages};
return Object.assign({}, state, {persistLogs: !state.persistLogs});
case TIMESTAMPS_TOGGLE:
return {...state, timestampsVisible: action.visible};
return Object.assign({}, state, {timestampsVisible: action.visible});
case SELECT_NETWORK_MESSAGE_TAB:
return {...state, networkMessageActiveTabId: action.id};
return Object.assign({}, state, {networkMessageActiveTabId: action.id});
case SIDEBAR_CLOSE:
return {
...state,
return Object.assign({}, state, {
sidebarVisible: false,
gripInSidebar: null,
};
});
case INITIALIZE:
return {...state, initialized: true};
return Object.assign({}, state, {initialized: true});
case MESSAGES_CLEAR:
return {...state, sidebarVisible: false, gripInSidebar: null};
return Object.assign({}, state, {sidebarVisible: false, gripInSidebar: null});
case SHOW_OBJECT_IN_SIDEBAR:
if (action.grip === state.gripInSidebar) {
return state;
}
return {...state, sidebarVisible: true, gripInSidebar: action.grip};
return Object.assign({}, state, {sidebarVisible: true, gripInSidebar: action.grip});
case SPLIT_CONSOLE_CLOSE_BUTTON_TOGGLE:
return {...state, closeButtonVisible: action.shouldDisplayButton};
return Object.assign({}, state, {closeButtonVisible: action.shouldDisplayButton});
case REVERSE_SEARCH_INPUT_TOGGLE:
return {
...state,

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

@ -52,7 +52,6 @@ function configureStore(webConsoleUI, options = {}) {
const autocomplete = getBoolPref(PREFS.FEATURES.AUTOCOMPLETE);
const groupWarnings = getBoolPref(PREFS.FEATURES.GROUP_WARNINGS);
const historyCount = getIntPref(PREFS.UI.INPUT_HISTORY_COUNT);
const filterContentMessages = getBoolPref(PREFS.FEATURES.FILTER_CONTENT_MESSAGES);
const initialState = {
prefs: PrefState({
@ -62,7 +61,6 @@ function configureStore(webConsoleUI, options = {}) {
autocomplete,
historyCount,
groupWarnings,
filterContentMessages,
}),
filters: FilterState({
error: getBoolPref(PREFS.FILTER.ERROR),
@ -77,9 +75,6 @@ function configureStore(webConsoleUI, options = {}) {
ui: UiState({
networkMessageActiveTabId: "headers",
persistLogs: getBoolPref(PREFS.UI.PERSIST),
showContentMessages: webConsoleUI.isBrowserConsole && filterContentMessages
? getBoolPref(PREFS.UI.CONTENT_MESSAGES)
: true,
editor: getBoolPref(PREFS.UI.EDITOR),
}),
};
@ -121,7 +116,7 @@ function createRootReducer() {
// We want to compute the new state for all properties except
// "messages" and "history". These two reducers are handled
// separately since they are receiving additional arguments.
const newState = Object.entries(reducers).reduce((res, [key, reducer]) => {
const newState = [...Object.entries(reducers)].reduce((res, [key, reducer]) => {
if (key !== "messages" && key !== "history") {
res[key] = reducer(state[key], action);
}
@ -131,16 +126,15 @@ function createRootReducer() {
// Pass prefs state as additional argument to the history reducer.
newState.history = reducers.history(state.history, action, newState.prefs);
// Specifically pass the updated filters, prefs and ui states as additional arguments.
newState.messages = reducers.messages(
state.messages,
action,
newState.filters,
newState.prefs,
newState.ui,
);
return newState;
return Object.assign(newState, {
// specifically pass the updated filters and prefs state as additional arguments.
messages: reducers.messages(
state.messages,
action,
newState.filters,
newState.prefs,
),
});
};
}

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

@ -43,8 +43,7 @@ stubPreparedMessages.set(`console.log('foobar', 'test')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log(undefined)`, new ConsoleMessage({
@ -78,8 +77,7 @@ stubPreparedMessages.set(`console.log(undefined)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.warn('danger, will robinson!')`, new ConsoleMessage({
@ -111,8 +109,7 @@ stubPreparedMessages.set(`console.warn('danger, will robinson!')`, new ConsoleMe
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log(NaN)`, new ConsoleMessage({
@ -146,8 +143,7 @@ stubPreparedMessages.set(`console.log(NaN)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log(null)`, new ConsoleMessage({
@ -181,8 +177,7 @@ stubPreparedMessages.set(`console.log(null)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log('鼬')`, new ConsoleMessage({
@ -214,8 +209,7 @@ stubPreparedMessages.set(`console.log('鼬')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.clear()`, new ConsoleMessage({
@ -247,8 +241,7 @@ stubPreparedMessages.set(`console.clear()`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count('bar')`, new ConsoleMessage({
@ -278,8 +271,7 @@ stubPreparedMessages.set(`console.count('bar')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.assert(false, {message: 'foobar'})`, new ConsoleMessage({
@ -342,8 +334,7 @@ stubPreparedMessages.set(`console.assert(false, {message: 'foobar'})`, new Conso
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log('hello \nfrom \rthe \"string world!')`, new ConsoleMessage({
@ -375,8 +366,7 @@ stubPreparedMessages.set(`console.log('hello \nfrom \rthe \"string world!')`, ne
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log('úṇĩçödê țĕșť')`, new ConsoleMessage({
@ -408,8 +398,7 @@ stubPreparedMessages.set(`console.log('úṇĩçödê țĕșť')`, new ConsoleMe
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.dirxml(window)`, new ConsoleMessage({
@ -453,8 +442,7 @@ stubPreparedMessages.set(`console.dirxml(window)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log('myarray', ['red', 'green', 'blue'])`, new ConsoleMessage({
@ -504,8 +492,7 @@ stubPreparedMessages.set(`console.log('myarray', ['red', 'green', 'blue'])`, new
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log('myregex', /a.b.c/)`, new ConsoleMessage({
@ -547,8 +534,7 @@ stubPreparedMessages.set(`console.log('myregex', /a.b.c/)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.table(['red', 'green', 'blue']);`, new ConsoleMessage({
@ -597,8 +583,7 @@ stubPreparedMessages.set(`console.table(['red', 'green', 'blue']);`, new Console
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log('myobject', {red: 'redValue', green: 'greenValue', blue: 'blueValue'});`, new ConsoleMessage({
@ -666,8 +651,7 @@ stubPreparedMessages.set(`console.log('myobject', {red: 'redValue', green: 'gree
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.debug('debug message');`, new ConsoleMessage({
@ -699,8 +683,7 @@ stubPreparedMessages.set(`console.debug('debug message');`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.info('info message');`, new ConsoleMessage({
@ -732,8 +715,7 @@ stubPreparedMessages.set(`console.info('info message');`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.error('error message');`, new ConsoleMessage({
@ -773,8 +755,7 @@ stubPreparedMessages.set(`console.error('error message');`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log('mymap')`, new ConsoleMessage({
@ -829,8 +810,7 @@ stubPreparedMessages.set(`console.log('mymap')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log('myset')`, new ConsoleMessage({
@ -879,8 +859,7 @@ stubPreparedMessages.set(`console.log('myset')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.trace()`, new ConsoleMessage({
@ -932,8 +911,7 @@ stubPreparedMessages.set(`console.trace()`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.trace('bar', {'foo': 'bar'}, [1,2,3])`, new ConsoleMessage({
@ -1029,8 +1007,7 @@ stubPreparedMessages.set(`console.trace('bar', {'foo': 'bar'}, [1,2,3])`, new Co
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.time('bar')`, new ConsoleMessage({
@ -1060,8 +1037,7 @@ stubPreparedMessages.set(`console.time('bar')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`timerAlreadyExists`, new ConsoleMessage({
@ -1091,8 +1067,7 @@ stubPreparedMessages.set(`timerAlreadyExists`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.timeLog('bar') - 1`, new ConsoleMessage({
@ -1124,8 +1099,7 @@ stubPreparedMessages.set(`console.timeLog('bar') - 1`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.timeLog('bar') - 2`, new ConsoleMessage({
@ -1182,8 +1156,7 @@ stubPreparedMessages.set(`console.timeLog('bar') - 2`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.timeEnd('bar')`, new ConsoleMessage({
@ -1213,8 +1186,7 @@ stubPreparedMessages.set(`console.timeEnd('bar')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`timeEnd.timerDoesntExist`, new ConsoleMessage({
@ -1244,8 +1216,7 @@ stubPreparedMessages.set(`timeEnd.timerDoesntExist`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`timeLog.timerDoesntExist`, new ConsoleMessage({
@ -1275,8 +1246,7 @@ stubPreparedMessages.set(`timeLog.timerDoesntExist`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.table('bar')`, new ConsoleMessage({
@ -1308,8 +1278,7 @@ stubPreparedMessages.set(`console.table('bar')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.table(['a', 'b', 'c'])`, new ConsoleMessage({
@ -1358,8 +1327,7 @@ stubPreparedMessages.set(`console.table(['a', 'b', 'c'])`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.group('bar')`, new ConsoleMessage({
@ -1391,8 +1359,7 @@ stubPreparedMessages.set(`console.group('bar')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.groupEnd('bar')`, new ConsoleMessage({
@ -1422,8 +1389,7 @@ stubPreparedMessages.set(`console.groupEnd('bar')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.groupCollapsed('foo')`, new ConsoleMessage({
@ -1455,8 +1421,7 @@ stubPreparedMessages.set(`console.groupCollapsed('foo')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.groupEnd('foo')`, new ConsoleMessage({
@ -1486,8 +1451,7 @@ stubPreparedMessages.set(`console.groupEnd('foo')`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.group()`, new ConsoleMessage({
@ -1519,8 +1483,7 @@ stubPreparedMessages.set(`console.group()`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.groupEnd()`, new ConsoleMessage({
@ -1550,8 +1513,7 @@ stubPreparedMessages.set(`console.groupEnd()`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log(%cfoobar)`, new ConsoleMessage({
@ -1587,8 +1549,7 @@ stubPreparedMessages.set(`console.log(%cfoobar)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.log("%cHello%c|%cWorld")`, new ConsoleMessage({
@ -1626,8 +1587,7 @@ stubPreparedMessages.set(`console.log("%cHello%c|%cWorld")`, new ConsoleMessage(
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.group(%cfoo%cbar)`, new ConsoleMessage({
@ -1663,8 +1623,7 @@ stubPreparedMessages.set(`console.group(%cfoo%cbar)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.groupEnd(%cfoo%cbar)`, new ConsoleMessage({
@ -1694,8 +1653,7 @@ stubPreparedMessages.set(`console.groupEnd(%cfoo%cbar)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.groupCollapsed(%cfoo%cbaz)`, new ConsoleMessage({
@ -1731,8 +1689,7 @@ stubPreparedMessages.set(`console.groupCollapsed(%cfoo%cbaz)`, new ConsoleMessag
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.groupEnd(%cfoo%cbaz)`, new ConsoleMessage({
@ -1762,8 +1719,7 @@ stubPreparedMessages.set(`console.groupEnd(%cfoo%cbaz)`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.dir({C, M, Y, K})`, new ConsoleMessage({
@ -1836,8 +1792,7 @@ stubPreparedMessages.set(`console.dir({C, M, Y, K})`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count | default: 1`, new ConsoleMessage({
@ -1867,8 +1822,7 @@ stubPreparedMessages.set(`console.count | default: 1`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count | default: 2`, new ConsoleMessage({
@ -1898,8 +1852,7 @@ stubPreparedMessages.set(`console.count | default: 2`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count | test counter: 1`, new ConsoleMessage({
@ -1929,8 +1882,7 @@ stubPreparedMessages.set(`console.count | test counter: 1`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count | test counter: 2`, new ConsoleMessage({
@ -1960,8 +1912,7 @@ stubPreparedMessages.set(`console.count | test counter: 2`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count | default: 3`, new ConsoleMessage({
@ -1991,8 +1942,7 @@ stubPreparedMessages.set(`console.count | default: 3`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count | clear`, new ConsoleMessage({
@ -2024,8 +1974,7 @@ stubPreparedMessages.set(`console.count | clear`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count | default: 4`, new ConsoleMessage({
@ -2055,8 +2004,7 @@ stubPreparedMessages.set(`console.count | default: 4`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.count | test counter: 3`, new ConsoleMessage({
@ -2086,8 +2034,7 @@ stubPreparedMessages.set(`console.count | test counter: 3`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.countReset | test counter: 0`, new ConsoleMessage({
@ -2117,8 +2064,7 @@ stubPreparedMessages.set(`console.countReset | test counter: 0`, new ConsoleMess
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`console.countReset | counterDoesntExist`, new ConsoleMessage({
@ -2148,8 +2094,7 @@ stubPreparedMessages.set(`console.countReset | counterDoesntExist`, new ConsoleM
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPackets.set(`console.log('foobar', 'test')`, {

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

@ -39,8 +39,7 @@ stubPreparedMessages.set(`Unknown property such-unknown-property. Declara
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`Error in parsing value for padding-top. Declaration dropped.`, new ConsoleMessage({
@ -69,8 +68,7 @@ stubPreparedMessages.set(`Error in parsing value for padding-top. Declara
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPackets.set(`Unknown property such-unknown-property. Declaration dropped.`, {
@ -92,8 +90,7 @@ stubPackets.set(`Unknown property such-unknown-property. Declaration drop
"info": false,
"private": false,
"stacktrace": null,
"notes": null,
"chromeContext": false
"notes": null
},
"type": "pageError",
"from": "server1.conn0.child1/consoleActor2"
@ -118,8 +115,7 @@ stubPackets.set(`Error in parsing value for padding-top. Declaration drop
"info": false,
"private": false,
"stacktrace": null,
"notes": null,
"chromeContext": false
"notes": null
},
"type": "pageError",
"from": "server1.conn0.child1/consoleActor2"

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

@ -44,8 +44,7 @@ stubPreparedMessages.set(`new Date(0)`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPreparedMessages.set(`asdf()`, new ConsoleMessage({
@ -77,8 +76,7 @@ stubPreparedMessages.set(`asdf()`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPreparedMessages.set(`1 + @`, new ConsoleMessage({
@ -110,8 +108,7 @@ stubPreparedMessages.set(`1 + @`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPreparedMessages.set(`inspect({a: 1})`, new ConsoleMessage({
@ -157,8 +154,7 @@ stubPreparedMessages.set(`inspect({a: 1})`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPreparedMessages.set(`cd(document)`, new ConsoleMessage({
@ -184,8 +180,7 @@ stubPreparedMessages.set(`cd(document)`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPreparedMessages.set(`undefined`, new ConsoleMessage({
@ -210,8 +205,7 @@ stubPreparedMessages.set(`undefined`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPreparedMessages.set(`longString message Error`, new ConsoleMessage({
@ -242,8 +236,7 @@ stubPreparedMessages.set(`longString message Error`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPreparedMessages.set(`eval throw ""`, new ConsoleMessage({
@ -269,8 +262,7 @@ stubPreparedMessages.set(`eval throw ""`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPreparedMessages.set(`eval throw "tomato"`, new ConsoleMessage({
@ -296,8 +288,7 @@ stubPreparedMessages.set(`eval throw "tomato"`, new ConsoleMessage({
"userProvidedStyles": null,
"notes": null,
"indent": 0,
"prefix": "",
"chromeContext": false
"prefix": ""
}));
stubPackets.set(`new Date(0)`, {

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

@ -76,8 +76,7 @@ stubPreparedMessages.set(`ReferenceError: asdf is not defined`, new ConsoleMessa
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`SyntaxError: redeclaration of let a`, new ConsoleMessage({
@ -132,8 +131,7 @@ stubPreparedMessages.set(`SyntaxError: redeclaration of let a`, new ConsoleMessa
],
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`TypeError longString message`, new ConsoleMessage({
@ -189,8 +187,7 @@ stubPreparedMessages.set(`TypeError longString message`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`throw ""`, new ConsoleMessage({
@ -236,8 +233,7 @@ stubPreparedMessages.set(`throw ""`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPreparedMessages.set(`throw "tomato"`, new ConsoleMessage({
@ -283,8 +279,7 @@ stubPreparedMessages.set(`throw "tomato"`, new ConsoleMessage({
"notes": null,
"indent": 0,
"prefix": "",
"private": false,
"chromeContext": false
"private": false
}));
stubPackets.set(`ReferenceError: asdf is not defined`, {
@ -343,8 +338,7 @@ stubPackets.set(`ReferenceError: asdf is not defined`, {
"functionName": null
}
],
"notes": null,
"chromeContext": false
"notes": null
},
"type": "pageError",
"from": "server1.conn0.child1/consoleActor2"
@ -395,8 +389,7 @@ stubPackets.set(`SyntaxError: redeclaration of let a`, {
"column": 6
}
}
],
"chromeContext": false
]
},
"type": "pageError",
"from": "server1.conn0.child1/consoleActor2"
@ -448,8 +441,7 @@ stubPackets.set(`TypeError longString message`, {
"functionName": null
}
],
"notes": null,
"chromeContext": false
"notes": null
},
"type": "pageError",
"from": "server1.conn0.child1/consoleActor2"

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

@ -27,8 +27,6 @@ pref("devtools.webconsole.jsterm.codeMirror", true);
pref("devtools.webconsole.groupWarningMessages", false);
pref("devtools.webconsole.input.editor", false);
pref("devtools.webconsole.input.autocomplete", true);
pref("devtools.browserconsole.contentMessages", true);
pref("devtools.browserconsole.filterContentMessages", false);
global.loader = {
lazyServiceGetter: () => {},

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

@ -6,41 +6,21 @@
"use strict";
const contentArgs = {
log: "MyLog",
warn: "MyWarn",
error: "MyError",
info: "MyInfo",
debug: "MyDebug",
counterName: "MyCounter",
timerName: "MyTimer",
};
const TEST_URI = `data:text/html,<meta charset=utf8>console API calls<script>
console.log("${contentArgs.log}");
console.warn("${contentArgs.warn}");
console.error("${contentArgs.error}");
console.info("${contentArgs.info}");
console.debug("${contentArgs.debug}");
console.count("${contentArgs.counterName}");
console.time("${contentArgs.timerName}");
console.timeLog("${contentArgs.timerName}");
console.timeEnd("${contentArgs.timerName}");
console.trace();
console.assert(false, "err");
</script>`;
const TEST_URI = `data:text/html,<meta charset=utf8>console API calls`;
add_task(async function() {
// Enable the checkbox
await pushPref("devtools.browserconsole.filterContentMessages", true);
// Show the content messages
await pushPref("devtools.browserconsole.contentMessages", true);
const hud = await HUDService.toggleBrowserConsole();
hud.ui.clearOutput();
await addTab(TEST_URI);
const hud = await HUDService.toggleBrowserConsole();
const contentArgs = {
log: "MyLog",
warn: "MyWarn",
error: "MyError",
info: "MyInfo",
debug: "MyDebug",
counterName: "MyCounter",
timerName: "MyTimer",
};
const expectedMessages = [
contentArgs.log,
@ -50,33 +30,25 @@ add_task(async function() {
contentArgs.debug,
`${contentArgs.counterName}: 1`,
`${contentArgs.timerName}:`,
`timer ended`,
`console.trace`,
`Assertion failed`,
];
await waitFor(() =>
expectedMessages.every(expectedMessage => findMessage(hud, expectedMessage)));
const onAllMessages = Promise.all(expectedMessages.map(m => waitForMessage(hud, m)));
ContentTask.spawn(gBrowser.selectedBrowser, contentArgs, function(args) {
content.console.log(args.log);
content.console.warn(args.warn);
content.console.error(args.error);
content.console.info(args.info);
content.console.debug(args.debug);
content.console.count(args.counterName);
content.console.time(args.timerName);
content.console.timeEnd(args.timerName);
content.console.trace();
content.console.assert(false, "err");
});
await onAllMessages;
ok(true, "Expected messages are displayed in the browser console");
info("Uncheck the Show content messages checkbox");
const onContentMessagesHidden = waitFor(() => !findMessage(hud, contentArgs.log));
const checkbox =
hud.ui.outputNode.querySelector(".webconsole-filterbar-primary .filter-checkbox");
checkbox.click();
await onContentMessagesHidden;
for (const expectedMessage of expectedMessages) {
ok(!findMessage(hud, expectedMessage), `"${expectedMessage}" is hidden`);
}
info("Check the Show content messages checkbox");
const onContentMessagesDisplayed = waitFor(() =>
expectedMessages.every(expectedMessage => findMessage(hud, expectedMessage)));
checkbox.click();
await onContentMessagesDisplayed;
for (const expectedMessage of expectedMessages) {
ok(findMessage(hud, expectedMessage), `"${expectedMessage}" is visible`);
}
});

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

@ -52,7 +52,6 @@ exports.ConsoleMessage = function(props) {
prefix: "",
private: false,
logpointId: undefined,
chromeContext: false,
}, props);
};

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

@ -195,7 +195,6 @@ function transformConsoleAPICallPacket(packet) {
private: message.private,
executionPoint: message.executionPoint,
logpointId: message.logpointId,
chromeContext: message.chromeContext,
});
}
@ -223,7 +222,6 @@ function transformLogMessagePacket(packet) {
messageText: message,
timeStamp,
private: message.private,
chromeContext: message.chromeContext,
});
}
@ -261,7 +259,6 @@ function transformPageErrorPacket(packet) {
notes: pageError.notes,
private: pageError.private,
executionPoint: pageError.executionPoint,
chromeContext: pageError.chromeContext,
});
}
@ -282,7 +279,6 @@ function transformNetworkEventPacket(packet) {
cause: networkEvent.cause,
private: networkEvent.private,
securityState: networkEvent.securityState,
chromeContext: networkEvent.chromeContext,
});
}

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

@ -354,8 +354,6 @@ class WebConsoleWrapper {
closeSplitConsole: this.closeSplitConsole.bind(this),
jstermCodeMirror,
autocomplete,
hideShowContentMessagesCheckbox: !webConsoleUI.isBrowserConsole ||
!prefs.filterContentMessages,
});
// Render the root Application component.

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

@ -1530,7 +1530,6 @@ WebConsoleActor.prototype =
stacktrace: stack,
notes: notesArray,
executionPoint: pageError.executionPoint,
chromeContext: pageError.isFromChromeContext,
};
},