OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser/ui/passwords/manage_passwords_view_utils.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" |
6 | 6 |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "ui/gfx/range/range.h" | 10 #include "ui/gfx/range/range.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 base::string16 title; | 60 base::string16 title; |
61 gfx::Range title_link_range; | 61 gfx::Range title_link_range; |
62 GetSavePasswordDialogTitleTextAndLinkRange( | 62 GetSavePasswordDialogTitleTextAndLinkRange( |
63 GURL(test_cases[i].user_visible_url), | 63 GURL(test_cases[i].user_visible_url), |
64 GURL(test_cases[i].form_origin_url), | 64 GURL(test_cases[i].form_origin_url), |
65 test_cases[i].is_smartlock_branding_enabled, &title, &title_link_range); | 65 test_cases[i].is_smartlock_branding_enabled, &title, &title_link_range); |
66 | 66 |
67 // Verify against expectations. | 67 // Verify against expectations. |
68 EXPECT_TRUE(base::EndsWith( | 68 EXPECT_TRUE(base::EndsWith( |
69 title, base::ASCIIToUTF16(test_cases[i].expected_title_text_ends_with), | 69 title, base::ASCIIToUTF16(test_cases[i].expected_title_text_ends_with), |
70 false)); | 70 base::CompareCase::INSENSITIVE_ASCII)); |
71 EXPECT_EQ(test_cases[i].expected_link_range_start, | 71 EXPECT_EQ(test_cases[i].expected_link_range_start, |
72 title_link_range.start()); | 72 title_link_range.start()); |
73 EXPECT_EQ(test_cases[i].expected_link_range_end, title_link_range.end()); | 73 EXPECT_EQ(test_cases[i].expected_link_range_end, title_link_range.end()); |
74 } | 74 } |
75 } | 75 } |
OLD | NEW |