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

Side by Side Diff: chrome/common/sandbox_mac_unittest_helper.h

Issue 3032024: Add undeclared virtual destructors part 2... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « chrome/common/mach_message_source_mac.h ('k') | chrome/installer/util/html_dialog.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_COMMON_SANDBOX_MAC_UNITTEST_RUNNER_H_ 5 #ifndef CHROME_COMMON_SANDBOX_MAC_UNITTEST_RUNNER_H_
6 #define CHROME_COMMON_SANDBOX_MAC_UNITTEST_RUNNER_H_ 6 #define CHROME_COMMON_SANDBOX_MAC_UNITTEST_RUNNER_H_
7 7
8 #include "base/multiprocess_test.h" 8 #include "base/multiprocess_test.h"
9 #include "chrome/common/sandbox_mac.h" 9 #include "chrome/common/sandbox_mac.h"
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const char* test_data); 62 const char* test_data);
63 }; 63 };
64 64
65 // Class to ease writing test cases that run inside the OS X sandbox. 65 // Class to ease writing test cases that run inside the OS X sandbox.
66 // This class is instantiated in a subprocess, and allows you to run test code 66 // This class is instantiated in a subprocess, and allows you to run test code
67 // at various stages of execution. 67 // at various stages of execution.
68 // Note that you must register the subclass you create with the 68 // Note that you must register the subclass you create with the
69 // REGISTER_SANDBOX_TEST_CASE so it's visible to the test driver. 69 // REGISTER_SANDBOX_TEST_CASE so it's visible to the test driver.
70 class MacSandboxTestCase { 70 class MacSandboxTestCase {
71 public: 71 public:
72 virtual ~MacSandboxTestCase() {}
73
72 // Code that runs in the sandboxed subprocess before the sandbox is 74 // Code that runs in the sandboxed subprocess before the sandbox is
73 // initialized. 75 // initialized.
74 // Returning false from this function will cause the entire test case to fail. 76 // Returning false from this function will cause the entire test case to fail.
75 virtual bool BeforeSandboxInit() { return true; }; 77 virtual bool BeforeSandboxInit() { return true; };
76 78
77 // Code that runs in the sandboxed subprocess when the sandbox has been 79 // Code that runs in the sandboxed subprocess when the sandbox has been
78 // enabled. 80 // enabled.
79 // Returning false from this function will cause the entire test case to fail. 81 // Returning false from this function will cause the entire test case to fail.
80 virtual bool SandboxedTest() = 0; 82 virtual bool SandboxedTest() = 0;
81 83
(...skipping 23 matching lines...) Expand all
105 namespace { \ 107 namespace { \
106 sandboxtest::internal::RegisterSandboxTest<class_name> \ 108 sandboxtest::internal::RegisterSandboxTest<class_name> \
107 register_test##class_name(#class_name); \ 109 register_test##class_name(#class_name); \
108 } // namespace 110 } // namespace
109 111
110 } // namespace internal 112 } // namespace internal
111 113
112 } // namespace sandboxtest 114 } // namespace sandboxtest
113 115
114 #endif // CHROME_COMMON_SANDBOX_MAC_UNITTEST_RUNNER_H_ 116 #endif // CHROME_COMMON_SANDBOX_MAC_UNITTEST_RUNNER_H_
OLDNEW
« no previous file with comments | « chrome/common/mach_message_source_mac.h ('k') | chrome/installer/util/html_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698