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

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

Issue 7582005: Add chrome.loadAsync capability to ChromeDriver, which allows the user not to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac 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
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/set_timeout_commands.h" 10 #include "chrome/test/webdriver/commands/set_timeout_commands.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ImplicitWaitCommand* const command) { 43 ImplicitWaitCommand* const command) {
44 Response response; 44 Response response;
45 command->ExecutePost(&response); 45 command->ExecutePost(&response);
46 ASSERT_EQ(kSuccess, response.GetStatus()) << response.ToJSON(); 46 ASSERT_EQ(kSuccess, response.GetStatus()) << response.ToJSON();
47 ASSERT_EQ(expected_timeout, test_session.implicit_wait()); 47 ASSERT_EQ(expected_timeout, test_session.implicit_wait());
48 } 48 }
49 49
50 } // namespace 50 } // namespace
51 51
52 TEST(ImplicitWaitCommandTest, SettingImplicitWaits) { 52 TEST(ImplicitWaitCommandTest, SettingImplicitWaits) {
53 Session test_session; 53 Session::Options options = Session::Options();
54 Session test_session(options);
54 ASSERT_EQ(0, test_session.implicit_wait()) << "Sanity check failed"; 55 ASSERT_EQ(0, test_session.implicit_wait()) << "Sanity check failed";
55 56
56 std::vector<std::string> path_segments; 57 std::vector<std::string> path_segments;
57 path_segments.push_back(""); 58 path_segments.push_back("");
58 path_segments.push_back("session"); 59 path_segments.push_back("session");
59 path_segments.push_back(test_session.id()); 60 path_segments.push_back(test_session.id());
60 path_segments.push_back("timeouts"); 61 path_segments.push_back("timeouts");
61 path_segments.push_back("implicitly_wait"); 62 path_segments.push_back("implicitly_wait");
62 63
63 DictionaryValue* parameters = new DictionaryValue; // Owned by |command|. 64 DictionaryValue* parameters = new DictionaryValue; // Owned by |command|.
(...skipping 17 matching lines...) Expand all
81 82
82 parameters->SetInteger("ms", 1); 83 parameters->SetInteger("ms", 1);
83 AssertTimeoutSet(test_session, 1, &command); 84 AssertTimeoutSet(test_session, 1, &command);
84 parameters->SetDouble("ms", 2.5); 85 parameters->SetDouble("ms", 2.5);
85 AssertTimeoutSet(test_session, 2, &command); 86 AssertTimeoutSet(test_session, 2, &command);
86 parameters->SetInteger("ms", 0); 87 parameters->SetInteger("ms", 0);
87 AssertTimeoutSet(test_session, 0, &command); 88 AssertTimeoutSet(test_session, 0, &command);
88 } 89 }
89 90
90 } // namespace webdriver 91 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/session_with_id.cc ('k') | chrome/test/webdriver/commands/webdriver_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698