Commit 62224a2b authored by khmel@google.com's avatar khmel@google.com Committed by Commit Bot

autotest: Add functionality to check if app is shown.

This is required for cheets_AuthPerf test that waits until Play Store
window is shown. Before we used implicit check that some property file
was created. That was bit flaky due background nature of creating this
file and did not work on all platforms. This CL introduces explicit way
by checking if app is actually shown on Chrome.

BUG=b:110060284
TEST=cheets_AuthPerf passes for Scarlet (where was failing before) + few
other boards.

Change-Id: Ia372b4939853a1c99fdd70a68079e080e14111c3
Reviewed-on: https://chromium-review.googlesource.com/1194735
Commit-Queue: Yury Khmel <khmel@google.com>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587850}
parent d6ea8c1c
......@@ -37,6 +37,7 @@
#include "chrome/browser/chromeos/printing/cups_printers_manager.h"
#include "chrome/browser/chromeos/system/input_device_settings.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/login_screen_client.h"
#include "chrome/browser/ui/views/crostini/crostini_installer_view.h"
#include "chrome/common/chrome_features.h"
......@@ -118,10 +119,17 @@ std::unique_ptr<base::DictionaryValue> MakeDictionaryFromNotification(
result->SetInteger("progress", notification.progress());
return result;
}
#else
constexpr char kOnlyAvailableOnChromeOSError[] = "Only available on ChromeOS";
#endif
} // namespace
AutotestPrivateLogoutFunction::~AutotestPrivateLogoutFunction() = default;
ExtensionFunction::ResponseAction AutotestPrivateLogoutFunction::Run() {
DVLOG(1) << "AutotestPrivateLogoutFunction";
if (!IsTestMode(browser_context()))
......@@ -129,6 +137,8 @@ ExtensionFunction::ResponseAction AutotestPrivateLogoutFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateRestartFunction::~AutotestPrivateRestartFunction() = default;
ExtensionFunction::ResponseAction AutotestPrivateRestartFunction::Run() {
DVLOG(1) << "AutotestPrivateRestartFunction";
if (!IsTestMode(browser_context()))
......@@ -136,6 +146,8 @@ ExtensionFunction::ResponseAction AutotestPrivateRestartFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateShutdownFunction::~AutotestPrivateShutdownFunction() = default;
ExtensionFunction::ResponseAction AutotestPrivateShutdownFunction::Run() {
std::unique_ptr<api::autotest_private::Shutdown::Params> params(
api::autotest_private::Shutdown::Params::Create(*args_));
......@@ -148,6 +160,9 @@ ExtensionFunction::ResponseAction AutotestPrivateShutdownFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateLoginStatusFunction::~AutotestPrivateLoginStatusFunction() =
default;
ExtensionFunction::ResponseAction AutotestPrivateLoginStatusFunction::Run() {
DVLOG(1) << "AutotestPrivateLoginStatusFunction";
......@@ -208,6 +223,9 @@ void AutotestPrivateLoginStatusFunction::OnIsReadyForPassword(bool is_ready) {
}
#endif
AutotestPrivateLockScreenFunction::~AutotestPrivateLockScreenFunction() =
default;
ExtensionFunction::ResponseAction AutotestPrivateLockScreenFunction::Run() {
DVLOG(1) << "AutotestPrivateLockScreenFunction";
#if defined(OS_CHROMEOS)
......@@ -217,6 +235,9 @@ ExtensionFunction::ResponseAction AutotestPrivateLockScreenFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateGetExtensionsInfoFunction::
~AutotestPrivateGetExtensionsInfoFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateGetExtensionsInfoFunction::Run() {
DVLOG(1) << "AutotestPrivateGetExtensionsInfoFunction";
......@@ -283,6 +304,9 @@ static int AccessArray(const volatile int arr[], const volatile int *index) {
return arr[*index];
}
AutotestPrivateSimulateAsanMemoryBugFunction::
~AutotestPrivateSimulateAsanMemoryBugFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateSimulateAsanMemoryBugFunction::Run() {
DVLOG(1) << "AutotestPrivateSimulateAsanMemoryBugFunction";
......@@ -297,6 +321,9 @@ AutotestPrivateSimulateAsanMemoryBugFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateSetTouchpadSensitivityFunction::
~AutotestPrivateSetTouchpadSensitivityFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateSetTouchpadSensitivityFunction::Run() {
std::unique_ptr<api::autotest_private::SetTouchpadSensitivity::Params> params(
......@@ -312,6 +339,9 @@ AutotestPrivateSetTouchpadSensitivityFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateSetTapToClickFunction::~AutotestPrivateSetTapToClickFunction() =
default;
ExtensionFunction::ResponseAction AutotestPrivateSetTapToClickFunction::Run() {
std::unique_ptr<api::autotest_private::SetTapToClick::Params> params(
api::autotest_private::SetTapToClick::Params::Create(*args_));
......@@ -325,6 +355,9 @@ ExtensionFunction::ResponseAction AutotestPrivateSetTapToClickFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateSetThreeFingerClickFunction::
~AutotestPrivateSetThreeFingerClickFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateSetThreeFingerClickFunction::Run() {
std::unique_ptr<api::autotest_private::SetThreeFingerClick::Params> params(
......@@ -340,6 +373,9 @@ AutotestPrivateSetThreeFingerClickFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateSetTapDraggingFunction::
~AutotestPrivateSetTapDraggingFunction() = default;
ExtensionFunction::ResponseAction AutotestPrivateSetTapDraggingFunction::Run() {
std::unique_ptr<api::autotest_private::SetTapDragging::Params> params(
api::autotest_private::SetTapDragging::Params::Create(*args_));
......@@ -353,6 +389,9 @@ ExtensionFunction::ResponseAction AutotestPrivateSetTapDraggingFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateSetNaturalScrollFunction::
~AutotestPrivateSetNaturalScrollFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateSetNaturalScrollFunction::Run() {
std::unique_ptr<api::autotest_private::SetNaturalScroll::Params> params(
......@@ -368,6 +407,9 @@ AutotestPrivateSetNaturalScrollFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateSetMouseSensitivityFunction::
~AutotestPrivateSetMouseSensitivityFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateSetMouseSensitivityFunction::Run() {
std::unique_ptr<api::autotest_private::SetMouseSensitivity::Params> params(
......@@ -383,6 +425,9 @@ AutotestPrivateSetMouseSensitivityFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateSetPrimaryButtonRightFunction::
~AutotestPrivateSetPrimaryButtonRightFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateSetPrimaryButtonRightFunction::Run() {
std::unique_ptr<api::autotest_private::SetPrimaryButtonRight::Params> params(
......@@ -398,6 +443,9 @@ AutotestPrivateSetPrimaryButtonRightFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateSetMouseReverseScrollFunction::
~AutotestPrivateSetMouseReverseScrollFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateSetMouseReverseScrollFunction::Run() {
std::unique_ptr<api::autotest_private::SetMouseReverseScroll::Params> params(
......@@ -463,6 +511,9 @@ std::string AutotestPrivateGetPrinterListFunction::GetPrinterType(
}
#endif
AutotestPrivateGetPrinterListFunction::
~AutotestPrivateGetPrinterListFunction() = default;
ExtensionFunction::ResponseAction AutotestPrivateGetPrinterListFunction::Run() {
DVLOG(1) << "AutotestPrivateGetPrinterListFunction";
auto values = std::make_unique<base::ListValue>();
......@@ -546,6 +597,9 @@ ExtensionFunction::ResponseAction AutotestPrivateRemovePrinterFunction::Run() {
return RespondNow(NoArguments());
}
AutotestPrivateGetPlayStoreStateFunction::
~AutotestPrivateGetPlayStoreStateFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateGetPlayStoreStateFunction::Run() {
DVLOG(1) << "AutotestPrivateGetPlayStoreStateFunction";
......@@ -564,13 +618,16 @@ AutotestPrivateGetPlayStoreStateFunction::Run() {
return RespondNow(OneArgument(play_store_state.ToValue()));
}
AutotestPrivateSetPlayStoreEnabledFunction::
~AutotestPrivateSetPlayStoreEnabledFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateSetPlayStoreEnabledFunction::Run() {
DVLOG(1) << "AutotestPrivateSetPlayStoreEnabledFunction";
#if defined(OS_CHROMEOS)
std::unique_ptr<api::autotest_private::SetPlayStoreEnabled::Params> params(
api::autotest_private::SetPlayStoreEnabled::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params);
#if defined(OS_CHROMEOS)
Profile* profile = ProfileManager::GetActiveUserProfile();
if (arc::IsArcAllowedForProfile(profile)) {
if (!arc::SetArcPlayStoreEnabledForProfile(profile, params->enabled)) {
......@@ -583,10 +640,39 @@ AutotestPrivateSetPlayStoreEnabledFunction::Run() {
} else {
return RespondNow(Error("ARC is not available for the current user"));
}
#else
return RespondNow(Error(kOnlyAvailableOnChromeOSError));
#endif
return RespondNow(Error("ARC is not available for the current platform"));
}
AutotestPrivateIsAppShownFunction::~AutotestPrivateIsAppShownFunction() =
default;
ExtensionFunction::ResponseAction AutotestPrivateIsAppShownFunction::Run() {
DVLOG(1) << "AutotestPrivateIsAppShownFunction";
#if defined(OS_CHROMEOS)
std::unique_ptr<api::autotest_private::IsAppShown::Params> params(
api::autotest_private::IsAppShown::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params);
ChromeLauncherController* const controller =
ChromeLauncherController::instance();
if (!controller)
return RespondNow(Error("Controller not available"));
const ash::ShelfItem* item =
controller->GetItem(ash::ShelfID(params->app_id));
const bool window_attached =
item && item->status == ash::ShelfItemStatus::STATUS_RUNNING;
return RespondNow(
OneArgument(std::make_unique<base::Value>(window_attached)));
#else
return RespondNow(Error(kOnlyAvailableOnChromeOSError));
#endif
}
AutotestPrivateRunCrostiniInstallerFunction::
~AutotestPrivateRunCrostiniInstallerFunction() = default;
ExtensionFunction::ResponseAction
AutotestPrivateRunCrostiniInstallerFunction::Run() {
DVLOG(1) << "AutotestPrivateInstallCrostiniFunction";
......@@ -609,8 +695,7 @@ AutotestPrivateRunCrostiniInstallerFunction::Run() {
return RespondLater();
#else
return RespondNow(
Error("Crostini is not available for the current platform"));
return RespondNow(Error(kOnlyAvailableOnChromeOSError));
#endif
}
......
......@@ -34,7 +34,7 @@ class AutotestPrivateLogoutFunction : public UIThreadExtensionFunction {
DECLARE_EXTENSION_FUNCTION("autotestPrivate.logout", AUTOTESTPRIVATE_LOGOUT)
private:
~AutotestPrivateLogoutFunction() override {}
~AutotestPrivateLogoutFunction() override;
ResponseAction Run() override;
};
......@@ -43,7 +43,7 @@ class AutotestPrivateRestartFunction : public UIThreadExtensionFunction {
DECLARE_EXTENSION_FUNCTION("autotestPrivate.restart", AUTOTESTPRIVATE_RESTART)
private:
~AutotestPrivateRestartFunction() override {}
~AutotestPrivateRestartFunction() override;
ResponseAction Run() override;
};
......@@ -53,7 +53,7 @@ class AutotestPrivateShutdownFunction : public UIThreadExtensionFunction {
AUTOTESTPRIVATE_SHUTDOWN)
private:
~AutotestPrivateShutdownFunction() override {}
~AutotestPrivateShutdownFunction() override;
ResponseAction Run() override;
};
......@@ -63,7 +63,7 @@ class AutotestPrivateLoginStatusFunction : public UIThreadExtensionFunction {
AUTOTESTPRIVATE_LOGINSTATUS)
private:
~AutotestPrivateLoginStatusFunction() override {}
~AutotestPrivateLoginStatusFunction() override;
ResponseAction Run() override;
#if defined(OS_CHROMEOS)
......@@ -77,7 +77,7 @@ class AutotestPrivateLockScreenFunction : public UIThreadExtensionFunction {
AUTOTESTPRIVATE_LOCKSCREEN)
private:
~AutotestPrivateLockScreenFunction() override {}
~AutotestPrivateLockScreenFunction() override;
ResponseAction Run() override;
};
......@@ -88,7 +88,7 @@ class AutotestPrivateGetExtensionsInfoFunction
AUTOTESTPRIVATE_GETEXTENSIONSINFO)
private:
~AutotestPrivateGetExtensionsInfoFunction() override {}
~AutotestPrivateGetExtensionsInfoFunction() override;
ResponseAction Run() override;
};
......@@ -99,7 +99,7 @@ class AutotestPrivateSimulateAsanMemoryBugFunction
AUTOTESTPRIVATE_SIMULATEASANMEMORYBUG)
private:
~AutotestPrivateSimulateAsanMemoryBugFunction() override {}
~AutotestPrivateSimulateAsanMemoryBugFunction() override;
ResponseAction Run() override;
};
......@@ -110,7 +110,7 @@ class AutotestPrivateSetTouchpadSensitivityFunction
AUTOTESTPRIVATE_SETTOUCHPADSENSITIVITY)
private:
~AutotestPrivateSetTouchpadSensitivityFunction() override {}
~AutotestPrivateSetTouchpadSensitivityFunction() override;
ResponseAction Run() override;
};
......@@ -120,7 +120,7 @@ class AutotestPrivateSetTapToClickFunction : public UIThreadExtensionFunction {
AUTOTESTPRIVATE_SETTAPTOCLICK)
private:
~AutotestPrivateSetTapToClickFunction() override {}
~AutotestPrivateSetTapToClickFunction() override;
ResponseAction Run() override;
};
......@@ -131,7 +131,7 @@ class AutotestPrivateSetThreeFingerClickFunction
AUTOTESTPRIVATE_SETTHREEFINGERCLICK)
private:
~AutotestPrivateSetThreeFingerClickFunction() override {}
~AutotestPrivateSetThreeFingerClickFunction() override;
ResponseAction Run() override;
};
......@@ -141,7 +141,7 @@ class AutotestPrivateSetTapDraggingFunction : public UIThreadExtensionFunction {
AUTOTESTPRIVATE_SETTAPDRAGGING)
private:
~AutotestPrivateSetTapDraggingFunction() override {}
~AutotestPrivateSetTapDraggingFunction() override;
ResponseAction Run() override;
};
......@@ -152,7 +152,7 @@ class AutotestPrivateSetNaturalScrollFunction
AUTOTESTPRIVATE_SETNATURALSCROLL)
private:
~AutotestPrivateSetNaturalScrollFunction() override {}
~AutotestPrivateSetNaturalScrollFunction() override;
ResponseAction Run() override;
};
......@@ -163,7 +163,7 @@ class AutotestPrivateSetMouseSensitivityFunction
AUTOTESTPRIVATE_SETMOUSESENSITIVITY)
private:
~AutotestPrivateSetMouseSensitivityFunction() override {}
~AutotestPrivateSetMouseSensitivityFunction() override;
ResponseAction Run() override;
};
......@@ -174,7 +174,7 @@ class AutotestPrivateSetPrimaryButtonRightFunction
AUTOTESTPRIVATE_SETPRIMARYBUTTONRIGHT)
private:
~AutotestPrivateSetPrimaryButtonRightFunction() override {}
~AutotestPrivateSetPrimaryButtonRightFunction() override;
ResponseAction Run() override;
};
......@@ -185,7 +185,7 @@ class AutotestPrivateSetMouseReverseScrollFunction
AUTOTESTPRIVATE_SETMOUSEREVERSESCROLL)
private:
~AutotestPrivateSetMouseReverseScrollFunction() override {}
~AutotestPrivateSetMouseReverseScrollFunction() override;
ResponseAction Run() override;
};
......@@ -216,7 +216,7 @@ class AutotestPrivateGetPlayStoreStateFunction
AUTOTESTPRIVATE_GETPLAYSTORESTATE)
private:
~AutotestPrivateGetPlayStoreStateFunction() override {}
~AutotestPrivateGetPlayStoreStateFunction() override;
ResponseAction Run() override;
};
......@@ -227,7 +227,17 @@ class AutotestPrivateSetPlayStoreEnabledFunction
AUTOTESTPRIVATE_SETPLAYSTOREENABLED)
private:
~AutotestPrivateSetPlayStoreEnabledFunction() override {}
~AutotestPrivateSetPlayStoreEnabledFunction() override;
ResponseAction Run() override;
};
class AutotestPrivateIsAppShownFunction : public UIThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("autotestPrivate.isAppShown",
AUTOTESTPRIVATE_ISAPPSHOWN)
private:
~AutotestPrivateIsAppShownFunction() override;
ResponseAction Run() override;
};
......@@ -239,7 +249,7 @@ class AutotestPrivateRunCrostiniInstallerFunction
AUTOTESTPRIVATE_RUNCROSTINIINSTALLER)
private:
~AutotestPrivateRunCrostiniInstallerFunction() override = default;
~AutotestPrivateRunCrostiniInstallerFunction() override;
ResponseAction Run() override;
#if defined(OS_CHROMEOS)
void CrostiniRestarted(crostini::ConciergeClientResult);
......@@ -259,7 +269,7 @@ class AutotestPrivateGetPrinterListFunction : public UIThreadExtensionFunction {
static std::string GetPrinterType(
chromeos::CupsPrintersManager::PrinterClass type);
#endif
~AutotestPrivateGetPrinterListFunction() override = default;
~AutotestPrivateGetPrinterListFunction() override;
ResponseAction Run() override;
DISALLOW_COPY_AND_ASSIGN(AutotestPrivateGetPrinterListFunction);
......
......@@ -2,20 +2,42 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
#include "build/build_config.h"
#include "chrome/browser/chromeos/arc/arc_session_manager.h"
#include "chrome/browser/extensions/api/autotest_private/autotest_private_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "components/arc/arc_util.h"
namespace extensions {
#if defined(OS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AutotestPrivate) {
class AutotestPrivateApiTest : public ExtensionApiTest {
public:
AutotestPrivateApiTest() = default;
~AutotestPrivateApiTest() override = default;
void SetUpCommandLine(base::CommandLine* command_line) override {
ExtensionApiTest::SetUpCommandLine(command_line);
// Make ARC enabled for tests.
arc::SetArcAvailableCommandLineForTesting(command_line);
}
void SetUpInProcessBrowserTestFixture() override {
ExtensionApiTest::SetUpInProcessBrowserTestFixture();
arc::ArcSessionManager::SetUiEnabledForTesting(false);
}
private:
DISALLOW_COPY_AND_ASSIGN(AutotestPrivateApiTest);
};
IN_PROC_BROWSER_TEST_F(AutotestPrivateApiTest, AutotestPrivate) {
// Turn on testing mode so we don't kill the browser.
AutotestPrivateAPI::GetFactoryInstance()
->Get(browser()->profile())
->set_test_mode(true);
ASSERT_TRUE(RunComponentExtensionTest("autotest_private")) << message_;
}
#endif
} // namespace extensions
......@@ -86,6 +86,8 @@ namespace autotestPrivate {
};
callback PlayStoreStateCallback = void (PlayStoreState result);
callback IsAppShownCallback = void (boolean appShown);
callback VoidCallback = void ();
interface Functions {
......@@ -152,6 +154,9 @@ namespace autotestPrivate {
// Get list of available printers
static void getPrinterList(PrinterArrayCallback callback);
// Returns true if requested app is shown in Chrome.
static void isAppShown(DOMString appId, IsAppShownCallback callback);
// Update printer. Printer with empty ID is considered new.
static void updatePrinter(Printer printer);
......
......@@ -1207,7 +1207,6 @@ test("browser_tests") {
"../browser/extensions/api/activity_log_private/activity_log_private_apitest.cc",
"../browser/extensions/api/autofill_private/autofill_private_apitest.cc",
"../browser/extensions/api/automation/automation_apitest.cc",
"../browser/extensions/api/autotest_private/autotest_private_apitest.cc",
"../browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_apitest_chromeos.cc",
"../browser/extensions/api/bookmark_manager_private/bookmark_manager_private_apitest.cc",
"../browser/extensions/api/bookmarks/bookmark_apitest.cc",
......@@ -1760,6 +1759,7 @@ test("browser_tests") {
"../browser/chromeos/system/device_disabling_browsertest.cc",
"../browser/chromeos/system/tray_accessibility_browsertest.cc",
"../browser/drive/drive_notification_manager_factory_browsertest.cc",
"../browser/extensions/api/autotest_private/autotest_private_apitest.cc",
"../browser/extensions/api/certificate_provider/certificate_provider_apitest.cc",
"../browser/extensions/api/networking_private/networking_private_apitest.cc",
"../browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc",
......
......@@ -113,23 +113,44 @@ chrome.test.runTests([
chrome.autotestPrivate.getVisibleNotifications(function(){});
chrome.test.succeed();
},
// In this test, ARC is available but not managed and not enabled by default.
function getPlayStoreState() {
chrome.autotestPrivate.getPlayStoreState(function(state) {
// By default ARC is not available. Field allowed must be set to false;
// managed and enabled should be underfined.
chrome.test.assertFalse(state.allowed);
chrome.test.assertEq(undefined, state.enabled);
chrome.test.assertEq(undefined, state.managed);
chrome.test.assertTrue(state.allowed);
chrome.test.assertFalse(state.enabled);
chrome.test.assertFalse(state.managed);
chrome.test.succeed();
});
},
// This test turns ARC enabled state to ON.
function setPlayStoreEnabled() {
chrome.autotestPrivate.setPlayStoreEnabled(false, function() {
// By default ARC is not available.
chrome.test.assertTrue(chrome.runtime.lastError != undefined);
chrome.test.succeed();
chrome.autotestPrivate.setPlayStoreEnabled(true, function() {
chrome.test.assertNoLastError();
chrome.autotestPrivate.getPlayStoreState(function(state) {
chrome.test.assertTrue(state.allowed);
chrome.test.assertTrue(state.enabled);
chrome.test.assertFalse(state.managed);
chrome.test.succeed();
});
});
},
// This test verifies that Play Store window is not shown by default but
// Chrome is shown.
function isAppShown() {
chrome.autotestPrivate.isAppShown('cnbgggchhmkkdmeppjobngjoejnihlei',
function(appShown) {
chrome.test.assertFalse(appShown);
chrome.test.assertNoLastError();
// Chrome is running.
chrome.autotestPrivate.isAppShown('mgndgikekgjfcpckkfioiadnlibdjbkf',
function(appShown) {
chrome.test.assertTrue(appShown);
chrome.test.assertNoLastError();
chrome.test.succeed();
});
});
},
function runCrostiniInstaller() {
chrome.autotestPrivate.runCrostiniInstaller(chrome.test.callbackFail(
'Crostini is not available for the current user'));
......
......@@ -1329,6 +1329,7 @@ enum HistogramValue {
ARCAPPSPRIVATE_LAUNCHAPP = 1266,
AUTOTESTPRIVATE_RUNCROSTINIINSTALLER = 1267,
AUTOFILLPRIVATE_MIGRATECREDITCARDS = 1268,
AUTOTESTPRIVATE_ISAPPSHOWN = 1269,
// Last entry: Add new entries above, then run:
// python tools/metrics/histograms/update_extension_histograms.py
ENUM_BOUNDARY
......
......@@ -16555,6 +16555,7 @@ Called by update_net_error_codes.py.-->
<int value="1266" label="ARCAPPSPRIVATE_LAUNCHAPP"/>
<int value="1267" label="AUTOTESTPRIVATE_RUNCROSTINIINSTALLER"/>
<int value="1268" label="AUTOFILLPRIVATE_MIGRATECREDITCARDS"/>
<int value="1269" label="AUTOTESTPRIVATE_ISAPPSHOWN"/>
</enum>
<enum name="ExtensionIconState">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment