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

Unified Diff: media/base/seekable_buffer_unittest.cc

Issue 134603005: Clean-up: Remove the very last few uses of base::Time from src/media/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « media/base/media_file_checker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/seekable_buffer_unittest.cc
diff --git a/media/base/seekable_buffer_unittest.cc b/media/base/seekable_buffer_unittest.cc
index c5e3fb635edef91463213a3a4b9ccc29c16d81fc..9b02ef211c639f151acfbfdcb6481dc1ec99fad8 100644
--- a/media/base/seekable_buffer_unittest.cc
+++ b/media/base/seekable_buffer_unittest.cc
@@ -4,6 +4,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/rand_util.h"
#include "base/time/time.h"
#include "media/base/data_buffer.h"
#include "media/base/seekable_buffer.h"
@@ -22,18 +23,13 @@ class SeekableBufferTest : public testing::Test {
static const int kWriteSize = 512;
virtual void SetUp() {
- // Setup seed.
- int seed = static_cast<int32>(base::Time::Now().ToInternalValue());
- srand(seed);
- VLOG(1) << "Random seed: " << seed;
-
- // Creates a test data.
+ // Create random test data samples.
for (int i = 0; i < kDataSize; i++)
- data_[i] = static_cast<char>(rand());
+ data_[i] = static_cast<char>(base::RandInt(0, 255));
}
int GetRandomInt(int maximum) {
- return rand() % maximum + 1;
+ return base::RandInt(0, maximum);
miu 2014/01/10 22:53:54 BTW--I know the exact replacement here should be:
}
SeekableBuffer buffer_;
« no previous file with comments | « media/base/media_file_checker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698