summaryrefslogtreecommitdiff
path: root/test_utils.h
diff options
context:
space:
mode:
authorAlex Vakulenko <avakulenko@chromium.org>2015-02-09 12:53:18 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-02-11 06:00:18 +0000
commitf68bbbc952aa9a71898e4939b5f36187fa564a50 (patch)
tree3927ffc053db9275a052ba2a370cbae62b5c236a /test_utils.h
parent981a9fb68ec5fe56f57b3ecb117a0dc681bf5e83 (diff)
update_engine: replace std::vector<char> with chromeos::Blob
To make update engine consistent with the rest of platform2 code replaced std::vector<char> as the container of binary data with chromeos::Blob. BUG=None TEST=`FEATURES=test emerge-link update_engine` Change-Id: I6385fd2257d15aa24bfa74ac35512c2a06c33012 Reviewed-on: https://chromium-review.googlesource.com/247793 Reviewed-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Diffstat (limited to 'test_utils.h')
-rw-r--r--test_utils.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/test_utils.h b/test_utils.h
index 379eb5fb..a65b0421 100644
--- a/test_utils.h
+++ b/test_utils.h
@@ -29,18 +29,18 @@ namespace test_utils {
// 300 byte pseudo-random string. Not null terminated.
// This does not gzip compress well.
-extern const unsigned char kRandomString[300];
+extern const uint8_t kRandomString[300];
// Writes the data passed to path. The file at path will be overwritten if it
// exists. Returns true on success, false otherwise.
-bool WriteFileVector(const std::string& path, const std::vector<char>& data);
+bool WriteFileVector(const std::string& path, const chromeos::Blob& data);
bool WriteFileString(const std::string& path, const std::string& data);
bool BindToUnusedLoopDevice(const std::string &filename,
std::string* lo_dev_name_ptr);
// Returns true iff a == b
-bool ExpectVectorsEq(const std::vector<char>& a, const std::vector<char>& b);
+bool ExpectVectorsEq(const chromeos::Blob& a, const chromeos::Blob& b);
inline int System(const std::string& cmd) {
return system(cmd.c_str());
@@ -64,10 +64,10 @@ inline int Chdir(const std::string& path) {
// Checks if xattr is supported in the directory specified by
// |dir_path| which must be writable. Returns true if the feature is
-// supported, false if not or if an error occured.
+// supported, false if not or if an error occurred.
bool IsXAttrSupported(const base::FilePath& dir_path);
-void FillWithData(std::vector<char>* buffer);
+void FillWithData(chromeos::Blob* buffer);
// Creates an empty ext image.
void CreateEmptyExtImageAtPath(const std::string& path,