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

Unified Diff: util/mach/mach_extensions_test.cc

Issue 1451793002: Add RandomString() and its test, and use it everywhere it makes sense (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Fix tpyo Created 5 years, 1 month 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 | « util/mach/child_port_handshake.cc ('k') | util/misc/random_string.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/mach_extensions_test.cc
diff --git a/util/mach/mach_extensions_test.cc b/util/mach/mach_extensions_test.cc
index 99ddee97b7539530194d9fd4f0f4434594b6671d..358f235570e5b4a2c03b192f739f4a4c895a61b1 100644
--- a/util/mach/mach_extensions_test.cc
+++ b/util/mach/mach_extensions_test.cc
@@ -15,10 +15,10 @@
#include "util/mach/mach_extensions.h"
#include "base/mac/scoped_mach_port.h"
-#include "base/rand_util.h"
#include "gtest/gtest.h"
#include "test/mac/mach_errors.h"
#include "util/mac/mac_util.h"
+#include "util/misc/random_string.h"
namespace crashpad {
namespace test {
@@ -139,9 +139,7 @@ TEST(MachExtensions, BootstrapCheckInAndLookUp) {
EXPECT_NE(report_crash, kMachPortNull);
std::string service_name = "org.chromium.crashpad.test.bootstrap_check_in.";
- for (int index = 0; index < 16; ++index) {
- service_name.append(1, base::RandInt('A', 'Z'));
- }
+ service_name.append(RandomString());
{
// The new service hasn’t checked in yet, so this should fail.
« no previous file with comments | « util/mach/child_port_handshake.cc ('k') | util/misc/random_string.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698