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

Side by Side Diff: chrome/browser/service_process/service_process_control_mac_unittest.mm

Issue 817153002: Switch users of foundation_util.h to include it directly and clean up uses of mac_util.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <launch.h> 5 #include <launch.h>
6 6
7 #include "base/mac/foundation_util.h"
7 #include "base/mac/launchd.h" 8 #include "base/mac/launchd.h"
8 #include "base/mac/mac_util.h"
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/google_toolbox_for_mac/src/Foundation/GTMServiceManagement .h" 11 #include "third_party/google_toolbox_for_mac/src/Foundation/GTMServiceManagement .h"
12 12
13 namespace { 13 namespace {
14 14
15 // Returns the parameters needed to launch a really simple script from launchd. 15 // Returns the parameters needed to launch a really simple script from launchd.
16 NSDictionary* TestJobDictionary(NSString* label_ns) { 16 NSDictionary* TestJobDictionary(NSString* label_ns) {
17 NSString* shell_script_ns = @"sleep 10; echo TestGTMSMJobSubmitRemove"; 17 NSString* shell_script_ns = @"sleep 10; echo TestGTMSMJobSubmitRemove";
18 base::scoped_nsobject<NSMutableArray> job_arguments( 18 base::scoped_nsobject<NSMutableArray> job_arguments(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 EXPECT_GT(pid, 0); 57 EXPECT_GT(pid, 0);
58 58
59 // Remove the job. 59 // Remove the job.
60 ASSERT_TRUE(GTMSMJobRemove(label_cf, &error)); 60 ASSERT_TRUE(GTMSMJobRemove(label_cf, &error));
61 pid = base::mac::PIDForJob(label); 61 pid = base::mac::PIDForJob(label);
62 EXPECT_LT(pid, 0); 62 EXPECT_LT(pid, 0);
63 63
64 // Attempting to remove the job again should fail. 64 // Attempting to remove the job again should fail.
65 EXPECT_FALSE(GTMSMJobRemove(label_cf, &error)); 65 EXPECT_FALSE(GTMSMJobRemove(label_cf, &error));
66 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_mac.cc ('k') | chrome/browser/shell_integration_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698