Skip to content

Commit

Permalink
CodeHealth: Remove use of DictionaryValue::empty in /chrome/test/chro…
Browse files Browse the repository at this point in the history
…medriver

This change removes the use of DictionaryValue::empty()
and replaces with Value::DictEmpty()

This CL was uploaded by git cl split.

R=johnchen@chromium.org

Bug: 1187020
Change-Id: I2c6ad42bb0268dec46f13a32bab01cf19764d17a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2880322
Commit-Queue: John Chen <johnchen@chromium.org>
Auto-Submit: Fangzhen Song <songfangzhen@bytedance.com>
Reviewed-by: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880735}
  • Loading branch information
song-fangzhen authored and Chromium LUCI CQ committed May 8, 2021
1 parent e050ac4 commit fccc28a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ TEST(ParseInspectorMessage, CommandNoErrorOrResult) {
ASSERT_TRUE(
internal::ParseInspectorMessage("{\"id\":1,\"sessionId\":\"AB2AF3C\"}", 0,
&session_id, &type, &event, &response));
ASSERT_TRUE(response.result->empty());
ASSERT_TRUE(response.result->DictEmpty());
EXPECT_EQ("AB2AF3C", session_id);
}

Expand Down
6 changes: 3 additions & 3 deletions chrome/test/chromedriver/session_commands_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ TEST(SessionCommandsTest, ProcessCapabilities_Empty) {
std::make_unique<base::DictionaryValue>());
status = ProcessCapabilities(params, &result);
ASSERT_EQ(kOk, status.code()) << status.message();
ASSERT_TRUE(result.empty());
ASSERT_TRUE(result.DictEmpty());
}

TEST(SessionCommandsTest, ProcessCapabilities_AlwaysMatch) {
Expand All @@ -140,7 +140,7 @@ TEST(SessionCommandsTest, ProcessCapabilities_AlwaysMatch) {
std::make_unique<base::DictionaryValue>());
status = ProcessCapabilities(params, &result);
ASSERT_EQ(kOk, status.code()) << status.message();
ASSERT_TRUE(result.empty());
ASSERT_TRUE(result.DictEmpty());

// Invalid "alwaysMatch"
params.SetInteger("capabilities.alwaysMatch.browserName", 10);
Expand Down Expand Up @@ -190,7 +190,7 @@ TEST(SessionCommandsTest, ProcessCapabilities_FirstMatch) {
list_ptr->Set(0, std::make_unique<base::DictionaryValue>());
status = ProcessCapabilities(params, &result);
ASSERT_EQ(kOk, status.code()) << status.message();
ASSERT_TRUE(result.empty());
ASSERT_TRUE(result.DictEmpty());

// Invalid entry
base::DictionaryValue* entry_ptr;
Expand Down

0 comments on commit fccc28a

Please sign in to comment.