Updater: add mode checking integration test.
Bug: 1098935
Change-Id: I50b9730d6c63544192a93dad273ffd04ed12be67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346548
Commit-Queue: Joshua Pawlicki <[email protected]>
Reviewed-by: Sorin Jianu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#799800}
diff --git a/chrome/updater/test/integration_tests_mac.mm b/chrome/updater/test/integration_tests_mac.mm
index 372dc8a0..60db888e 100644
--- a/chrome/updater/test/integration_tests_mac.mm
+++ b/chrome/updater/test/integration_tests_mac.mm
@@ -13,6 +13,7 @@
#include "chrome/updater/constants.h"
#include "chrome/updater/mac/xpc_service_names.h"
#include "chrome/updater/updater_version.h"
+#include "chrome/updater/util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace updater {
@@ -106,6 +107,16 @@
CopyServiceLaunchdName()));
}
+void RunWake(int expected_exit_code) {
+ const base::FilePath path = GetExecutablePath();
+ ASSERT_FALSE(path.empty());
+ base::CommandLine command_line(path);
+ command_line.AppendSwitch(kWakeSwitch);
+ int exit_code = -1;
+ ASSERT_TRUE(Run(command_line, &exit_code));
+ EXPECT_EQ(exit_code, expected_exit_code);
+}
+
void Uninstall() {
const base::FilePath path = GetExecutablePath();
ASSERT_FALSE(path.empty());