diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-29 18:04:19 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-29 18:04:19 +0000 |
commit | 4abc7b6227d6c2b9b48aebdac83c9e5e791466dd (patch) | |
tree | 54b4e3bd4655612e5a21450245e64285d383ab7b /ui/base/text/text_elider_unittest.cc | |
parent | 220c19c8f7332ba1afb1f768dbd5e0456083545c (diff) | |
download | chromium_src-4abc7b6227d6c2b9b48aebdac83c9e5e791466dd.zip chromium_src-4abc7b6227d6c2b9b48aebdac83c9e5e791466dd.tar.gz chromium_src-4abc7b6227d6c2b9b48aebdac83c9e5e791466dd.tar.bz2 |
Refactored RunTest into RunUrlTest in text_elider_unitest.
This function was only used for the Url eliding tests, so it makes it clearer.
Also fixed a typo.
BUG=
TEST=Make sure ui_unittests still pass.
Review URL: http://codereview.chromium.org/9455074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/text/text_elider_unittest.cc')
-rw-r--r-- | ui/base/text/text_elider_unittest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/base/text/text_elider_unittest.cc b/ui/base/text/text_elider_unittest.cc index b342b4c..217170c 100644 --- a/ui/base/text/text_elider_unittest.cc +++ b/ui/base/text/text_elider_unittest.cc @@ -40,7 +40,7 @@ struct TestData { const int compare_result; }; -void RunTest(Testcase* testcases, size_t num_testcases) { +void RunUrlTest(Testcase* testcases, size_t num_testcases) { static const gfx::Font font; for (size_t i = 0; i < num_testcases; ++i) { const GURL url(testcases[i].input); @@ -78,7 +78,7 @@ TEST(TextEliderTest, TestGeneralEliding) { "www.google.com/intl/en/ads/?aLongQ" + kEllipsisStr}, }; - RunTest(testcases, arraysize(testcases)); + RunUrlTest(testcases, arraysize(testcases)); } // When there is very little space available, the elision code will shorten @@ -101,7 +101,7 @@ TEST(TextEliderTest, TestTrailingEllipsisSlashEllipsisHack) { {"http://battersbox.com/directory/foo/peter_paul_and_mary.html", "battersbox.com/" + kEllipsisStr + "/peter" + kEllipsisStr}, }; - RunTest(testcases, arraysize(testcases)); + RunUrlTest(testcases, arraysize(testcases)); } // Test eliding of empty strings, URLs with ports, passwords, queries, etc. @@ -139,7 +139,7 @@ TEST(TextEliderTest, TestMoreEliding) { "www/%E4%A0%E5%A5%BD?q=\xe4\xbd\xa0\xe5\xa5\xbd#\xe4\xbd\xa0"}, }; - RunTest(testcases, arraysize(testcases)); + RunUrlTest(testcases, arraysize(testcases)); } // Test eliding of file: URLs. @@ -164,7 +164,7 @@ TEST(TextEliderTest, TestFileURLEliding) { {"file://filer/foo/bar/file", "filer/" + kEllipsisStr + "/file"}, }; - RunTest(testcases, arraysize(testcases)); + RunUrlTest(testcases, arraysize(testcases)); } TEST(TextEliderTest, TestFilenameEliding) { |