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

Unified Diff: base/string_util_unittest.cc

Issue 192065: Merge 25487 - Strip .plugin off of Mac plugin names when showing the crash in... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/string_util.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util_unittest.cc
===================================================================
--- base/string_util_unittest.cc (revision 25852)
+++ base/string_util_unittest.cc (working copy)
@@ -1576,6 +1576,25 @@
EXPECT_TRUE(StartsWith(L"java", L"", true));
}
+TEST(StringUtilTest, EndsWith) {
+ EXPECT_TRUE(EndsWith(L"Foo.plugin", L".plugin", true));
+ EXPECT_FALSE(EndsWith(L"Foo.Plugin", L".plugin", true));
+ EXPECT_TRUE(EndsWith(L"Foo.plugin", L".plugin", false));
+ EXPECT_TRUE(EndsWith(L"Foo.Plugin", L".plugin", false));
+ EXPECT_FALSE(EndsWith(L".plug", L".plugin", true));
+ EXPECT_FALSE(EndsWith(L".plug", L".plugin", false));
+ EXPECT_FALSE(EndsWith(L"Foo.plugin Bar", L".plugin", true));
+ EXPECT_FALSE(EndsWith(L"Foo.plugin Bar", L".plugin", false));
+ EXPECT_FALSE(EndsWith(L"", L".plugin", false));
+ EXPECT_FALSE(EndsWith(L"", L".plugin", true));
+ EXPECT_TRUE(EndsWith(L"Foo.plugin", L"", false));
+ EXPECT_TRUE(EndsWith(L"Foo.plugin", L"", true));
+ EXPECT_TRUE(EndsWith(L".plugin", L".plugin", false));
+ EXPECT_TRUE(EndsWith(L".plugin", L".plugin", true));
+ EXPECT_TRUE(EndsWith(L"", L"", false));
+ EXPECT_TRUE(EndsWith(L"", L"", true));
+}
+
TEST(StringUtilTest, GetStringFWithOffsets) {
std::vector<string16> subst;
subst.push_back(ASCIIToUTF16("1"));
Property changes on: base\string_util_unittest.cc
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/base/string_util_unittest.cc:r69-2775
Merged /trunk/src/base/string_util_unittest.cc:r25487
« no previous file with comments | « base/string_util.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698