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

Side by Side Diff: chrome/test/chromedriver/commands_unittest.cc

Issue 2888073002: Remove raw DictionaryValue::Set in //chrome (Closed)
Patch Set: Fix Tests Created 3 years, 7 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
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 if (*count == 0) { 66 if (*count == 0) {
67 EXPECT_STREQ("id", session_id.c_str()); 67 EXPECT_STREQ("id", session_id.c_str());
68 } else { 68 } else {
69 EXPECT_STREQ("id2", session_id.c_str()); 69 EXPECT_STREQ("id2", session_id.c_str());
70 } 70 }
71 (*count)++; 71 (*count)++;
72 72
73 std::unique_ptr<base::DictionaryValue> capabilities( 73 std::unique_ptr<base::DictionaryValue> capabilities(
74 new base::DictionaryValue()); 74 new base::DictionaryValue());
75 75
76 capabilities->Set("capability1", new base::Value("test1")); 76 capabilities->SetString("capability1", "test1");
77 capabilities->Set("capability2", new base::Value("test2")); 77 capabilities->SetString("capability2", "test2");
78 78
79 callback.Run(Status(kOk), std::move(capabilities), session_id, false); 79 callback.Run(Status(kOk), std::move(capabilities), session_id, false);
80 } 80 }
81 81
82 void OnGetSessions(const Status& status, 82 void OnGetSessions(const Status& status,
83 std::unique_ptr<base::Value> value, 83 std::unique_ptr<base::Value> value,
84 const std::string& session_id, 84 const std::string& session_id,
85 bool w3c_compliant) { 85 bool w3c_compliant) {
86 ASSERT_EQ(kOk, status.code()); 86 ASSERT_EQ(kOk, status.code());
87 ASSERT_TRUE(value.get()); 87 ASSERT_TRUE(value.get());
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 cmd, 833 cmd,
834 false, 834 false,
835 params, 835 params,
836 id, 836 id,
837 base::Bind(&OnFailBecauseErrorNotifyingListeners, &run_loop)); 837 base::Bind(&OnFailBecauseErrorNotifyingListeners, &run_loop));
838 run_loop.Run(); 838 run_loop.Run();
839 839
840 thread->task_runner()->PostTask(FROM_HERE, 840 thread->task_runner()->PostTask(FROM_HERE,
841 base::Bind(&VerifySessionWasDeleted)); 841 base::Bind(&VerifySessionWasDeleted));
842 } 842 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698