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

Side by Side Diff: chrome/common/service_process_util_unittest.cc

Issue 9235084: Add OSSTATUS_LOG API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/service_process_util.h" 5 #include "chrome/common/service_process_util.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 int mode_; 323 int mode_;
324 }; 324 };
325 325
326 void TrashFunc(const FilePath& src) { 326 void TrashFunc(const FilePath& src) {
327 FSRef path_ref; 327 FSRef path_ref;
328 FSRef new_path_ref; 328 FSRef new_path_ref;
329 EXPECT_TRUE(base::mac::FSRefFromPath(src.value(), &path_ref)); 329 EXPECT_TRUE(base::mac::FSRefFromPath(src.value(), &path_ref));
330 OSStatus status = FSMoveObjectToTrashSync(&path_ref, 330 OSStatus status = FSMoveObjectToTrashSync(&path_ref,
331 &new_path_ref, 331 &new_path_ref,
332 kFSFileOperationDefaultOptions); 332 kFSFileOperationDefaultOptions);
333 EXPECT_EQ(status, noErr) << "FSMoveObjectToTrashSync " << status; 333 EXPECT_EQ(status, noErr) << "FSMoveObjectToTrashSync " << status;
334 } 334 }
335 335
336 TEST_F(ServiceProcessStateFileManipulationTest, VerifyLaunchD) { 336 TEST_F(ServiceProcessStateFileManipulationTest, VerifyLaunchD) {
337 // There have been problems where launchd has gotten into a bad state, usually 337 // There have been problems where launchd has gotten into a bad state, usually
338 // because something had deleted all the files in /tmp. launchd depends on 338 // because something had deleted all the files in /tmp. launchd depends on
339 // a Unix Domain Socket that it creates at /tmp/launchd*/sock. 339 // a Unix Domain Socket that it creates at /tmp/launchd*/sock.
340 // The symptom of this problem is that the service process connect fails 340 // The symptom of this problem is that the service process connect fails
341 // on Mac and "launch_msg(): Socket is not connected" appears. 341 // on Mac and "launch_msg(): Socket is not connected" appears.
342 // This test is designed to make sure that launchd is working. 342 // This test is designed to make sure that launchd is working.
343 // http://crbug/75518 343 // http://crbug/75518
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 ScopedAttributesRestorer restorer(bundle_path(), 0777); 409 ScopedAttributesRestorer restorer(bundle_path(), 0777);
410 GetIOMessageLoopProxy()->PostTask( 410 GetIOMessageLoopProxy()->PostTask(
411 FROM_HERE, 411 FROM_HERE,
412 base::Bind(&ChangeAttr, bundle_path(), 0222)); 412 base::Bind(&ChangeAttr, bundle_path(), 0222));
413 Run(); 413 Run();
414 ASSERT_TRUE(mock_launchd()->remove_called()); 414 ASSERT_TRUE(mock_launchd()->remove_called());
415 ASSERT_TRUE(mock_launchd()->delete_called()); 415 ASSERT_TRUE(mock_launchd()->delete_called());
416 } 416 }
417 417
418 #endif // !OS_MACOSX 418 #endif // !OS_MACOSX
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698