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

Unified Diff: third_party/android_crazy_linker/src/src/crazy_linker_system_mock.h

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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
Index: third_party/android_crazy_linker/src/src/crazy_linker_system_mock.h
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_system_mock.h b/third_party/android_crazy_linker/src/src/crazy_linker_system_mock.h
new file mode 100644
index 0000000000000000000000000000000000000000..e946be83fa50d8c341f1f3bb4d86dbed1856dec1
--- /dev/null
+++ b/third_party/android_crazy_linker/src/src/crazy_linker_system_mock.h
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CRAZY_LINKER_SYSTEM_MOCK_H
+#define CRAZY_LINKER_SYSTEM_MOCK_H
+
+#include <stdint.h>
+
+namespace crazy {
+
+class SystemMock {
+ public:
+ // Create a new mock system instance and make ScopedFileDescriptor use it.
+ // There can be only one mock system active at a given time.
+ SystemMock();
+
+ // Destroy a mock system instance.
+ ~SystemMock();
+
+ // Add a regular file to the mock file system. |path| is the entry's
+ // path, and |data| and |data_size| are the data there. The data must
+ // stay valid until the mock file system is destroyed.
+ void AddRegularFile(const char* path, const char* data, size_t data_size);
+
+ void AddEnvVariable(const char* var_name, const char* var_value);
+
+ void SetCurrentDir(const char* path);
+};
+
+} // namespace crazy
+
+#endif // CRAZY_LINKER_SYSTEM_MOCK_H

Powered by Google App Engine
This is Rietveld 408576698