OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
6 #include "content/public/common/context_menu_params.h" | 6 #include "content/public/common/context_menu_params.h" |
7 #include "content/renderer/render_view_impl.h" | 7 #include "content/renderer/render_view_impl.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "ui/base/range/range.h" | 9 #include "ui/base/range/range.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 TEST(RenderViewImplTest, ShouldUpdateSelectionTextFromContextMenuParams) { | 13 TEST(RenderViewImplTest, ShouldUpdateSelectionTextFromContextMenuParams) { |
14 struct { | 14 struct { |
15 const char* selection_text; | 15 const char* selection_text; |
(...skipping 16 matching lines...) Expand all Loading... |
32 EXPECT_EQ(cases[i].expected_result, | 32 EXPECT_EQ(cases[i].expected_result, |
33 RenderViewImpl::ShouldUpdateSelectionTextFromContextMenuParams( | 33 RenderViewImpl::ShouldUpdateSelectionTextFromContextMenuParams( |
34 UTF8ToUTF16(cases[i].selection_text), | 34 UTF8ToUTF16(cases[i].selection_text), |
35 cases[i].selection_text_offset, | 35 cases[i].selection_text_offset, |
36 cases[i].selection_range, | 36 cases[i].selection_range, |
37 params)); | 37 params)); |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 } // namespace content | 41 } // namespace content |
OLD | NEW |