diff --git a/tests/unittests/views/textfield_unittest.cc b/tests/unittests/views/textfield_unittest.cc index 3fc302fe4..1b04e64d4 100644 --- a/tests/unittests/views/textfield_unittest.cc +++ b/tests/unittests/views/textfield_unittest.cc @@ -47,10 +47,13 @@ void TextfieldContentsImpl() { // Test select range. EXPECT_FALSE(textfield->HasSelection()); - EXPECT_EQ(CefRange(cursor_pos, cursor_pos), textfield->GetSelectedRange()); - textfield->SelectRange(CefRange(0, cursor_pos)); + EXPECT_EQ(CefRange(static_cast(cursor_pos), + static_cast(cursor_pos)), + textfield->GetSelectedRange()); + textfield->SelectRange(CefRange(0, static_cast(cursor_pos))); EXPECT_TRUE(textfield->HasSelection()); - EXPECT_EQ(CefRange(0, cursor_pos), textfield->GetSelectedRange()); + EXPECT_EQ(CefRange(0, static_cast(cursor_pos)), + textfield->GetSelectedRange()); EXPECT_STREQ(kText, textfield->GetSelectedText().ToString().c_str()); EXPECT_EQ(cursor_pos, textfield->GetCursorPosition()); @@ -69,20 +72,24 @@ void TextfieldContentsImpl() { EXPECT_TRUE(textfield->HasSelection()); cursor_pos = sizeof(kReplaceText) + sizeof(kAppendText) - 2; - EXPECT_EQ(CefRange(0, cursor_pos), textfield->GetSelectedRange()); + EXPECT_EQ(CefRange(0, static_cast(cursor_pos)), + textfield->GetSelectedRange()); EXPECT_EQ(cursor_pos, textfield->GetCursorPosition()); // Test clear selection. textfield->ClearSelection(); EXPECT_FALSE(textfield->HasSelection()); - EXPECT_EQ(CefRange(cursor_pos, cursor_pos), textfield->GetSelectedRange()); + EXPECT_EQ(CefRange(static_cast(cursor_pos), + static_cast(cursor_pos)), + textfield->GetSelectedRange()); EXPECT_EQ(cursor_pos, textfield->GetCursorPosition()); // Test selection with command. EXPECT_TRUE(textfield->IsCommandEnabled(IDS_APP_SELECT_ALL)); textfield->ExecuteCommand(IDS_APP_SELECT_ALL); EXPECT_TRUE(textfield->HasSelection()); - EXPECT_EQ(CefRange(0, cursor_pos), textfield->GetSelectedRange()); + EXPECT_EQ(CefRange(0, static_cast(cursor_pos)), + textfield->GetSelectedRange()); EXPECT_EQ(cursor_pos, textfield->GetCursorPosition()); textfield->ClearEditHistory();