Skip to content

Commit

Permalink
Add mockSomethingWentWrong to inspector commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Gela committed Oct 19, 2023
1 parent d52e49f commit f95e4d8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/mozillavpn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1989,13 +1989,6 @@ void MozillaVPN::registerInspectorCommands() {
return QJsonObject();
});

InspectorHandler::registerCommand(
"force_heartbeat_failure", "Force a heartbeat failure", 0,
[](InspectorHandler*, const QList<QByteArray>&) {
MozillaVPN::instance()->heartbeatCompleted(false /* success */);
return QJsonObject();
});

InspectorHandler::registerCommand(
"force_server_unavailable",
"Timeout all servers in a city using force_server_unavailable "
Expand Down Expand Up @@ -2080,6 +2073,14 @@ void MozillaVPN::registerInspectorCommands() {
return QJsonObject();
});

InspectorHandler::registerCommand(
"mockSomethingWentWrong",
"Force the UI to show the Something Went Wrong screen", 0,
[](InspectorHandler*, const QList<QByteArray>&) {
MozillaVPN::instance()->connectionManager()->backendFailure();
return QJsonObject();
});

InspectorHandler::registerCommand(
"public_key", "Retrieve the public key of the current device", 0,
[](InspectorHandler*, const QList<QByteArray>&) {
Expand Down

0 comments on commit f95e4d8

Please sign in to comment.