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

Unified Diff: chrome/common/sandbox_mac_unittest_helper.h

Issue 2131005: Mac: Infrastructure for serialization of OS fonts over IPC. (Closed)
Patch Set: Better error logging Created 10 years, 7 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
« no previous file with comments | « chrome/common/sandbox_mac_fontloading_unittest.mm ('k') | chrome/common/sandbox_mac_unittest_helper.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
};
« no previous file with comments | « chrome/common/sandbox_mac_fontloading_unittest.mm ('k') | chrome/common/sandbox_mac_unittest_helper.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698