| Index: chrome/common/sandbox_mac_unittest_helper.h
|
| diff --git a/chrome/common/sandbox_mac_unittest_helper.h b/chrome/common/sandbox_mac_unittest_helper.h
|
| index 533b13287aca55549d183e045d76f90e7f1d9f1d..24a8b4cb23a7b684c60bca901f39462d6441abc0 100644
|
| --- a/chrome/common/sandbox_mac_unittest_helper.h
|
| +++ b/chrome/common/sandbox_mac_unittest_helper.h
|
| @@ -81,22 +81,23 @@ class MacSandboxTestCase {
|
|
|
| // The data that's passed in the |user_data| parameter of
|
| // RunTest[s]InSandbox() is passed to this function.
|
| - virtual void SetTestData(const char* test_data) {}
|
| + virtual void SetTestData(const char* test_data) { test_data_ = test_data; }
|
| +
|
| + protected:
|
| + std::string test_data_;
|
| };
|
|
|
| // Plumbing to support the REGISTER_SANDBOX_TEST_CASE macro.
|
| namespace internal {
|
|
|
| -typedef std::map<std::string,MacSandboxTestCase*> SandboxTestMap;
|
| -
|
| -// A function that returns a common map from string -> test case class.
|
| -SandboxTestMap& GetSandboxTestMap();
|
| +// Register a test case with a given name.
|
| +void AddSandboxTestCase(const char* test_name, MacSandboxTestCase* test_class);
|
|
|
| // Construction of this class causes a new entry to be placed in a global
|
| // map.
|
| template <class T> struct RegisterSandboxTest {
|
| RegisterSandboxTest(const char* test_name) {
|
| - GetSandboxTestMap()[test_name] = new T;
|
| + AddSandboxTestCase(test_name, new T);
|
| }
|
| };
|
|
|
|
|