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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc ('k') | chrome/browser/ui/webui/devtools_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698