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

Unified Diff: chrome/common/sandbox_mac_unittest_helper.mm

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_unittest_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/sandbox_mac_unittest_helper.mm
diff --git a/chrome/common/sandbox_mac_unittest_helper.mm b/chrome/common/sandbox_mac_unittest_helper.mm
index 749bcc11a02300d4ebe04c6679db1332de5c0958..328e41182217697f7ce6dd8b8d5dadc6b4fae71e 100644
--- a/chrome/common/sandbox_mac_unittest_helper.mm
+++ b/chrome/common/sandbox_mac_unittest_helper.mm
@@ -24,11 +24,23 @@ namespace sandboxtest {
// Support infrastructure for 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() {
static SandboxTestMap test_map;
return test_map;
}
+void AddSandboxTestCase(const char* test_name, MacSandboxTestCase* test_class) {
+ SandboxTestMap& test_map = GetSandboxTestMap();
+ if (test_map.find(test_name) != test_map.end()) {
+ LOG(ERROR) << "Trying to register duplicate test" << test_name;
+ NOTREACHED();
+ }
+ test_map[test_name] = test_class;
+}
+
} // namespace internal
bool MacSandboxTest:: RunTestInAllSandboxTypes(const char* test_name,
« no previous file with comments | « chrome/common/sandbox_mac_unittest_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698