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

Unified Diff: src/platform/minijail/mock_env.h

Issue 542124: Update minijail tests with real mocks and packaging testing deps (Closed)
Patch Set: integrate notes from cmasone Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/minijail/minijail_unittest.cc ('k') | src/platform/minijail/mock_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/minijail/mock_env.h
diff --git a/src/platform/minijail/mock_env.h b/src/platform/minijail/mock_env.h
new file mode 100644
index 0000000000000000000000000000000000000000..1ece3927f37b1d84162671809cd3632b759c6a34
--- /dev/null
+++ b/src/platform/minijail/mock_env.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Env mock class
+#ifndef __CHROMEOS_MINIJAIL_MOCK_ENV_H
+#define __CHROMEOS_MINIJAIL_MOCK_ENV_H
+
+#include "env.h"
+
+#include <gtest/gtest.h>
+#include <gmock/gmock.h>
+
+namespace chromeos {
+namespace minijail {
+
+class MockEnv : public Env {
+ public:
+ MockEnv() { }
+ ~MockEnv() { }
+ MOCK_CONST_METHOD2(ChangeUser, bool(uid_t, gid_t));
+ MOCK_CONST_METHOD0(DisableDefaultRootPrivileges, bool());
+ MOCK_CONST_METHOD0(DisableTracing, bool());
+ MOCK_CONST_METHOD1(EnterNamespace, bool(int));
+ MOCK_CONST_METHOD0(FilterSyscallsBenchmarkOnly, bool());
+ MOCK_CONST_METHOD0(FilterSyscallsBySource, bool());
+ MOCK_CONST_METHOD0(KeepRootCapabilities, bool());
+ MOCK_CONST_METHOD0(Mount, bool());
+ MOCK_CONST_METHOD1(SanitizeBoundingSet, bool(uint64));
+ MOCK_CONST_METHOD1(SanitizeCapabilities, bool(uint64));
+ MOCK_CONST_METHOD3(Run, bool(const char *, char * const *, char * const *));
+};
+
+} // namespace minijail
+} // namespace chromeos
+
+#endif // __CHROMEOS_MINIJAIL_MOCK_ENV_H
« no previous file with comments | « src/platform/minijail/minijail_unittest.cc ('k') | src/platform/minijail/mock_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698