зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1615973 - Hide invoke getter popup when evaluating expression. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D63062 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ef367b4472
Коммит
4d901c42ef
|
@ -8,7 +8,7 @@ const {
|
|||
AUTOCOMPLETE_DATA_RECEIVE,
|
||||
AUTOCOMPLETE_PENDING_REQUEST,
|
||||
AUTOCOMPLETE_RETRIEVE_FROM_CACHE,
|
||||
APPEND_TO_HISTORY,
|
||||
EVALUATE_EXPRESSION,
|
||||
UPDATE_HISTORY_POSITION,
|
||||
REVERSE_SEARCH_INPUT_CHANGE,
|
||||
REVERSE_SEARCH_BACK,
|
||||
|
@ -89,12 +89,12 @@ function autocomplete(state = getDefaultState(), action) {
|
|||
// Reset the autocomplete data when:
|
||||
// - clear is explicitely called
|
||||
// - the user navigates the history
|
||||
// - or an item was added to the history (i.e. something was evaluated).
|
||||
// - or an expression was evaluated.
|
||||
case AUTOCOMPLETE_CLEAR:
|
||||
return getDefaultState({
|
||||
authorizedEvaluations: state.authorizedEvaluations,
|
||||
});
|
||||
case APPEND_TO_HISTORY:
|
||||
case EVALUATE_EXPRESSION:
|
||||
case UPDATE_HISTORY_POSITION:
|
||||
case REVERSE_SEARCH_INPUT_CHANGE:
|
||||
case REVERSE_SEARCH_BACK:
|
||||
|
|
|
@ -10,7 +10,7 @@ const TEST_URI = `data:text/html;charset=utf-8,
|
|||
<script>
|
||||
window.foo = {
|
||||
get rab() {
|
||||
return {};
|
||||
return "rab";
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -78,4 +78,11 @@ add_task(async function() {
|
|||
true,
|
||||
"The tooltip is now closed since the input doesn't match a getter name"
|
||||
);
|
||||
info("Check that evaluating the expression closes the tooltip");
|
||||
tooltip = await setInputValueForGetterConfirmDialog(toolbox, hud, "foo.rab.");
|
||||
EventUtils.sendString("length");
|
||||
EventUtils.synthesizeKey("KEY_Enter");
|
||||
await waitFor(() => !isConfirmDialogOpened(toolbox));
|
||||
await waitFor(() => findMessage(hud, "3", ".result"));
|
||||
ok("Expression was evaluated and tooltip was closed");
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче