diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 20:11:08 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 20:11:08 +0000 |
commit | cdd9fea014653052e1e2fc2a354b8526235bc65f (patch) | |
tree | c429690a9320d43be04b3013785af50d1333db72 /chrome_frame/test/util_unittests.cc | |
parent | 82b0f03294d4a9ee705cddf4a157572ea91512e9 (diff) | |
download | chromium_src-cdd9fea014653052e1e2fc2a354b8526235bc65f.zip chromium_src-cdd9fea014653052e1e2fc2a354b8526235bc65f.tar.gz chromium_src-cdd9fea014653052e1e2fc2a354b8526235bc65f.tar.bz2 |
Remove old ap-value munging code in Chrome Frame.
Review URL: http://codereview.chromium.org/303023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/util_unittests.cc')
-rw-r--r-- | chrome_frame/test/util_unittests.cc | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/chrome_frame/test/util_unittests.cc b/chrome_frame/test/util_unittests.cc index 3f07b82..b926ee4 100644 --- a/chrome_frame/test/util_unittests.cc +++ b/chrome_frame/test/util_unittests.cc @@ -9,66 +9,6 @@ const wchar_t kChannelName[] = L"-dev"; const wchar_t kSuffix[] = L"-fix"; -TEST(UtilTests, AppendSuffixToChannelNameTest) { - std::wstring str_base; - std::wstring channel_name(kChannelName); - std::wstring suffix(kSuffix); - - str_base = L"2.0-dev-bar"; - EXPECT_TRUE(AppendSuffixToChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-dev-fix-bar", str_base.c_str()); - - str_base = L"2.0-dev-fix-bar"; - EXPECT_FALSE(AppendSuffixToChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-dev-fix-bar", str_base.c_str()); - - str_base = L"2.0-dev-bar-dev-bar"; - EXPECT_TRUE(AppendSuffixToChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-dev-fix-bar-dev-bar", str_base.c_str()); - - str_base = L"2.0"; - EXPECT_FALSE(AppendSuffixToChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0", str_base.c_str()); - - str_base = L"2.0-devvvv"; - EXPECT_TRUE(AppendSuffixToChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-dev-fixvvv", str_base.c_str()); -} - -TEST(UtilTests, RemoveSuffixFromStringTest) { - std::wstring str_base; - std::wstring channel_name(kChannelName); - std::wstring suffix(kSuffix); - - str_base = L"2.0-dev-fix"; - EXPECT_TRUE(RemoveSuffixFromChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-dev", str_base.c_str()); - - str_base = L"2.0-dev-fix-full"; - EXPECT_TRUE(RemoveSuffixFromChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-dev-full", str_base.c_str()); - - str_base = L"2.0"; - EXPECT_FALSE(RemoveSuffixFromChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0", str_base.c_str()); - - str_base = L"2.0-dev"; - EXPECT_FALSE(RemoveSuffixFromChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-dev", str_base.c_str()); - - str_base = L"2.0-fix"; - EXPECT_FALSE(RemoveSuffixFromChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-fix", str_base.c_str()); - - str_base = L"2.0-full-fix"; - EXPECT_FALSE(RemoveSuffixFromChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-full-fix", str_base.c_str()); - - str_base = L"2.0-dev-dev-fix"; - EXPECT_TRUE(RemoveSuffixFromChannelName(&str_base, channel_name, suffix)); - EXPECT_STREQ(L"2.0-dev-dev", str_base.c_str()); -} - TEST(UtilTests, GetModuleVersionTest) { HMODULE mod = GetModuleHandle(L"kernel32.dll"); EXPECT_NE(mod, static_cast<HMODULE>(NULL)); |