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

Side by Side Diff: chrome/test/webdriver/commands/set_timeout_commands_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/commands/command.cc ('k') | chrome/test/webdriver/frame_path.cc » ('j') | 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/test/webdriver/commands/response.h" 10 #include "chrome/test/webdriver/commands/response.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ASSERT_EQ(expected_timeout, test_session.implicit_wait()); 48 ASSERT_EQ(expected_timeout, test_session.implicit_wait());
49 } 49 }
50 50
51 } // namespace 51 } // namespace
52 52
53 TEST(ImplicitWaitCommandTest, SettingImplicitWaits) { 53 TEST(ImplicitWaitCommandTest, SettingImplicitWaits) {
54 Session test_session; 54 Session test_session;
55 ASSERT_EQ(0, test_session.implicit_wait()) << "Sanity check failed"; 55 ASSERT_EQ(0, test_session.implicit_wait()) << "Sanity check failed";
56 56
57 std::vector<std::string> path_segments; 57 std::vector<std::string> path_segments;
58 path_segments.push_back(""); 58 path_segments.push_back(std::string());
59 path_segments.push_back("session"); 59 path_segments.push_back("session");
60 path_segments.push_back(test_session.id()); 60 path_segments.push_back(test_session.id());
61 path_segments.push_back("timeouts"); 61 path_segments.push_back("timeouts");
62 path_segments.push_back("implicitly_wait"); 62 path_segments.push_back("implicitly_wait");
63 63
64 base::DictionaryValue* parameters = 64 base::DictionaryValue* parameters =
65 new base::DictionaryValue; // Owned by |command|. 65 new base::DictionaryValue; // Owned by |command|.
66 ImplicitWaitCommand command(path_segments, parameters); 66 ImplicitWaitCommand command(path_segments, parameters);
67 67
68 AssertIsAbleToInitialize(&command); 68 AssertIsAbleToInitialize(&command);
(...skipping 14 matching lines...) Expand all
83 83
84 parameters->SetInteger("ms", 1); 84 parameters->SetInteger("ms", 1);
85 AssertTimeoutSet(test_session, 1, &command); 85 AssertTimeoutSet(test_session, 1, &command);
86 parameters->SetDouble("ms", 2.5); 86 parameters->SetDouble("ms", 2.5);
87 AssertTimeoutSet(test_session, 2, &command); 87 AssertTimeoutSet(test_session, 2, &command);
88 parameters->SetInteger("ms", 0); 88 parameters->SetInteger("ms", 0);
89 AssertTimeoutSet(test_session, 0, &command); 89 AssertTimeoutSet(test_session, 0, &command);
90 } 90 }
91 91
92 } // namespace webdriver 92 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/command.cc ('k') | chrome/test/webdriver/frame_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698