Index: webrtc/base/macutils_unittest.cc |
diff --git a/webrtc/base/macutils_unittest.cc b/webrtc/base/macutils_unittest.cc |
index d3e33e43b5bf328b038f3ff75e48d5c4e5a2ae98..e295eaae0840c30fc6095db062717401cafddb73 100644 |
--- a/webrtc/base/macutils_unittest.cc |
+++ b/webrtc/base/macutils_unittest.cc |
@@ -16,3 +16,22 @@ |
LOG(LS_INFO) << "GetOsVersionName " << ver; |
EXPECT_NE(rtc::kMacOSUnknown, ver); |
} |
+ |
+TEST(MacUtilsTest, RunAppleScriptCompileError) { |
+ std::string script("set value to to 5"); |
+ EXPECT_FALSE(rtc::RunAppleScript(script)); |
+} |
+ |
+TEST(MacUtilsTest, RunAppleScriptRuntimeError) { |
+ std::string script("set value to 5 / 0"); |
+ EXPECT_FALSE(rtc::RunAppleScript(script)); |
+} |
+ |
+#ifdef CARBON_DEPRECATED |
+TEST(MacUtilsTest, DISABLED_RunAppleScriptSuccess) { |
+#else |
+TEST(MacUtilsTest, RunAppleScriptSuccess) { |
+#endif |
+ std::string script("set value to 5"); |
+ EXPECT_TRUE(rtc::RunAppleScript(script)); |
+} |