| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/test/chromedriver/commands.h" | 5 #include "chrome/test/chromedriver/commands.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (*count == 0) { | 64 if (*count == 0) { |
| 65 EXPECT_STREQ("id", session_id.c_str()); | 65 EXPECT_STREQ("id", session_id.c_str()); |
| 66 } else { | 66 } else { |
| 67 EXPECT_STREQ("id2", session_id.c_str()); | 67 EXPECT_STREQ("id2", session_id.c_str()); |
| 68 } | 68 } |
| 69 (*count)++; | 69 (*count)++; |
| 70 | 70 |
| 71 std::unique_ptr<base::DictionaryValue> capabilities( | 71 std::unique_ptr<base::DictionaryValue> capabilities( |
| 72 new base::DictionaryValue()); | 72 new base::DictionaryValue()); |
| 73 | 73 |
| 74 capabilities->Set("capability1", new base::StringValue("test1")); | 74 capabilities->Set("capability1", new base::Value("test1")); |
| 75 capabilities->Set("capability2", new base::StringValue("test2")); | 75 capabilities->Set("capability2", new base::Value("test2")); |
| 76 | 76 |
| 77 callback.Run(Status(kOk), std::move(capabilities), session_id, false); | 77 callback.Run(Status(kOk), std::move(capabilities), session_id, false); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void OnGetSessions(const Status& status, | 80 void OnGetSessions(const Status& status, |
| 81 std::unique_ptr<base::Value> value, | 81 std::unique_ptr<base::Value> value, |
| 82 const std::string& session_id, | 82 const std::string& session_id, |
| 83 bool w3c_compliant) { | 83 bool w3c_compliant) { |
| 84 ASSERT_EQ(kOk, status.code()); | 84 ASSERT_EQ(kOk, status.code()); |
| 85 ASSERT_TRUE(value.get()); | 85 ASSERT_TRUE(value.get()); |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 cmd, | 828 cmd, |
| 829 false, | 829 false, |
| 830 params, | 830 params, |
| 831 id, | 831 id, |
| 832 base::Bind(&OnFailBecauseErrorNotifyingListeners, &run_loop)); | 832 base::Bind(&OnFailBecauseErrorNotifyingListeners, &run_loop)); |
| 833 run_loop.Run(); | 833 run_loop.Run(); |
| 834 | 834 |
| 835 thread->task_runner()->PostTask(FROM_HERE, | 835 thread->task_runner()->PostTask(FROM_HERE, |
| 836 base::Bind(&VerifySessionWasDeleted)); | 836 base::Bind(&VerifySessionWasDeleted)); |
| 837 } | 837 } |
| OLD | NEW |