Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: webrtc/base/macutils_unittest.cc

Issue 2316563002: Revert of Remove all reference to carbon api (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/macutils.cc ('k') | webrtc/base/macwindowpicker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+}
« no previous file with comments | « webrtc/base/macutils.cc ('k') | webrtc/base/macwindowpicker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698