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

Unified Diff: util/mac/service_management_test.mm

Issue 572323002: Drop 10.5 support: use ServiceManagement.framework directly (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 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
Index: util/mac/service_management_test.mm
diff --git a/util/mac/service_management_test.mm b/util/mac/service_management_test.mm
index 4947621904ddd15fc93d8026c94d492a6f472512..922c4d8a600fb26c4319dcac1fda1cbe44959d38 100644
--- a/util/mac/service_management_test.mm
+++ b/util/mac/service_management_test.mm
@@ -27,6 +27,7 @@
#include "base/strings/sys_string_conversions.h"
#include "base/rand_util.h"
#include "gtest/gtest.h"
+#include "util/mac/mac_util.h"
#include "util/posix/process_util.h"
#include "util/stdlib/objc.h"
@@ -157,8 +158,16 @@ TEST(ServiceManagement, SubmitRemoveJob) {
EXPECT_EQ(0, ServiceManagementIsJobRunning(kJobLabel));
// Now that the job is unloaded, a subsequent attempt to unload it should be
- // an error.
- EXPECT_FALSE(ServiceManagementRemoveJob(kJobLabel, false));
+ // an error. However, ServiceManagementRemoveJob does not properly report
+ // this error case on Mac OS X 10.10.
+ if (MacOSXMinorVersion() >= 10) {
+ // If this check starts failing because radar 18268941 is fixed, remove
+ // the OS version check here and revise the interface documentation for
+ // ServiceManagementRemoveJob().
+ EXPECT_TRUE(ServiceManagementRemoveJob(kJobLabel, false));
+ } else {
+ EXPECT_FALSE(ServiceManagementRemoveJob(kJobLabel, false));
+ }
ExpectProcessIsNotRunning(job_pid, shell_script);
}

Powered by Google App Engine
This is Rietveld 408576698