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

Side by Side Diff: chrome/test/webdriver/webdriver_util_unittest.cc

Issue 7522024: Refactor chromedriver's script execution to reduce amount of custom Value parsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/webdriver/webdriver_util_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "chrome/test/webdriver/utility_functions.h" 8 #include "chrome/test/webdriver/webdriver_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 TEST(RandomIDTest, CanGenerateSufficientlyRandomIDs) { 11 TEST(RandomIDTest, CanGenerateSufficientlyRandomIDs) {
12 std::set<std::string> generated_ids; 12 std::set<std::string> generated_ids;
13 for (int i = 0; i < 10000; ++i) { 13 for (int i = 0; i < 10000; ++i) {
14 std::string id = webdriver::GenerateRandomID(); 14 std::string id = webdriver::GenerateRandomID();
15 ASSERT_EQ(32u, id.length()); 15 ASSERT_EQ(32u, id.length());
16 ASSERT_TRUE(generated_ids.end() == generated_ids.find(id)) 16 ASSERT_TRUE(generated_ids.end() == generated_ids.find(id))
17 << "Generated duplicate ID: " << id 17 << "Generated duplicate ID: " << id
18 << " on iteration " << i; 18 << " on iteration " << i;
19 generated_ids.insert(id); 19 generated_ids.insert(id);
20 } 20 }
21 } 21 }
OLDNEW
« no previous file with comments | « chrome/test/webdriver/webdriver_util_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698