diff options
Diffstat (limited to 'chrome/browser')
15 files changed, 69 insertions, 56 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc index 357e7f7..f0c7dab 100644 --- a/chrome/browser/autocomplete/autocomplete_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_unittest.cc @@ -5,6 +5,7 @@ #include "base/bind.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" +#include "base/string16.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -279,7 +280,7 @@ TEST_F(AutocompleteTest, InputType) { const string16 input; const AutocompleteInput::Type type; } input_cases[] = { - { ASCIIToUTF16(""), AutocompleteInput::INVALID }, + { string16(), AutocompleteInput::INVALID }, { ASCIIToUTF16("?"), AutocompleteInput::FORCED_QUERY }, { ASCIIToUTF16("?foo"), AutocompleteInput::FORCED_QUERY }, { ASCIIToUTF16("?foo bar"), AutocompleteInput::FORCED_QUERY }, @@ -444,7 +445,7 @@ TEST(AutocompleteInput, ParseForEmphasizeComponent) { const Component scheme; const Component host; } input_cases[] = { - { ASCIIToUTF16(""), kInvalidComponent, kInvalidComponent }, + { string16(), kInvalidComponent, kInvalidComponent }, { ASCIIToUTF16("?"), kInvalidComponent, kInvalidComponent }, { ASCIIToUTF16("?http://foo.com/bar"), kInvalidComponent, kInvalidComponent }, diff --git a/chrome/browser/autofill/address_field_unittest.cc b/chrome/browser/autofill/address_field_unittest.cc index f3278f8..b8d3865 100644 --- a/chrome/browser/autofill/address_field_unittest.cc +++ b/chrome/browser/autofill/address_field_unittest.cc @@ -4,6 +4,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" +#include "base/string16.h" #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/address_field.h" #include "chrome/browser/autofill/autofill_field.h" @@ -257,7 +258,7 @@ TEST_F(AddressFieldTest, ParseTwoLineAddressMissingLabel) { field.name = ASCIIToUTF16("address"); list_.push_back(new AutofillField(field, ASCIIToUTF16("addr1"))); - field.label = ASCIIToUTF16(""); + field.label = string16(); field.name = ASCIIToUTF16("bogus"); list_.push_back(new AutofillField(field, ASCIIToUTF16("addr2"))); diff --git a/chrome/browser/autofill/form_field_unittest.cc b/chrome/browser/autofill/form_field_unittest.cc index f1df191..16b51a0 100644 --- a/chrome/browser/autofill/form_field_unittest.cc +++ b/chrome/browser/autofill/form_field_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/string16.h" #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/autofill_field.h" #include "chrome/browser/autofill/form_field.h" @@ -18,7 +19,7 @@ TEST(FormFieldTest, Match) { EXPECT_TRUE(FormField::Match(&field, string16(), FormField::MATCH_LABEL)); // Strictly empty pattern matches empty string. - field.label = ASCIIToUTF16(""); + field.label = string16(); EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("^$"), FormField::MATCH_LABEL)); diff --git a/chrome/browser/autofill/phone_number_i18n_unittest.cc b/chrome/browser/autofill/phone_number_i18n_unittest.cc index 762b908..d75c320 100644 --- a/chrome/browser/autofill/phone_number_i18n_unittest.cc +++ b/chrome/browser/autofill/phone_number_i18n_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/message_loop.h" +#include "base/string16.h" #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/phone_number_i18n.h" #include "content/test/test_browser_thread.h" @@ -287,22 +288,22 @@ TEST_F(PhoneNumberI18NTest, ConstructPhoneNumber) { autofill_i18n::RFC3966, &number)); EXPECT_EQ(number, ASCIIToUTF16("+1-650-234-5678")); - EXPECT_TRUE(ConstructPhoneNumber(ASCIIToUTF16(""), + EXPECT_TRUE(ConstructPhoneNumber(string16(), ASCIIToUTF16("650"), ASCIIToUTF16("2345678"), "US", autofill_i18n::INTERNATIONAL, &number)); EXPECT_EQ(number, ASCIIToUTF16("+1 650-234-5678")); - EXPECT_TRUE(ConstructPhoneNumber(ASCIIToUTF16(""), - ASCIIToUTF16(""), + EXPECT_TRUE(ConstructPhoneNumber(string16(), + string16(), ASCIIToUTF16("6502345678"), "US", autofill_i18n::INTERNATIONAL, &number)); EXPECT_EQ(number, ASCIIToUTF16("+1 650-234-5678")); - EXPECT_FALSE(ConstructPhoneNumber(ASCIIToUTF16(""), + EXPECT_FALSE(ConstructPhoneNumber(string16(), ASCIIToUTF16("650"), ASCIIToUTF16("234567890"), "US", @@ -310,7 +311,7 @@ TEST_F(PhoneNumberI18NTest, ConstructPhoneNumber) { &number)); EXPECT_EQ(number, string16()); // Italian number - EXPECT_TRUE(ConstructPhoneNumber(ASCIIToUTF16(""), + EXPECT_TRUE(ConstructPhoneNumber(string16(), ASCIIToUTF16("347"), ASCIIToUTF16("2345678"), "IT", diff --git a/chrome/browser/autofill/phone_number_unittest.cc b/chrome/browser/autofill/phone_number_unittest.cc index e00eab4..df49d01 100644 --- a/chrome/browser/autofill/phone_number_unittest.cc +++ b/chrome/browser/autofill/phone_number_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/string16.h" #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/autofill_profile.h" #include "chrome/browser/autofill/field_types.h" @@ -18,7 +19,7 @@ TEST(PhoneNumberTest, Matcher) { phone_number.SetCanonicalizedInfo(PHONE_HOME_WHOLE_NUMBER, phone); FieldTypeSet matching_types; - phone_number.GetMatchingTypes(ASCIIToUTF16(""), &matching_types); + phone_number.GetMatchingTypes(string16(), &matching_types); EXPECT_EQ(1U, matching_types.size()); EXPECT_TRUE(matching_types.find(EMPTY_TYPE) != matching_types.end()); matching_types.clear(); diff --git a/chrome/browser/automation/automation_tab_helper_browsertest.cc b/chrome/browser/automation/automation_tab_helper_browsertest.cc index 98e77f6..cea140d 100644 --- a/chrome/browser/automation/automation_tab_helper_browsertest.cc +++ b/chrome/browser/automation/automation_tab_helper_browsertest.cc @@ -6,6 +6,7 @@ #include "base/file_path.h" #include "base/path_service.h" +#include "base/string16.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/browser/automation/automation_tab_helper.h" @@ -97,7 +98,7 @@ class AutomationTabHelperBrowserTest : public InProcessBrowserTest { } else { script += "window.domAutomationController.setAutomationId(0);" "window.domAutomationController.send(0);"; - host->ExecuteJavascriptInWebFrame(ASCIIToUTF16(""), ASCIIToUTF16(script)); + host->ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(script)); } } diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc index 5d0ac6a..af3f133 100644 --- a/chrome/browser/download/download_manager_unittest.cc +++ b/chrome/browser/download/download_manager_unittest.cc @@ -772,7 +772,7 @@ TEST_F(DownloadManagerTest, MAYBE_DownloadOverwriteTest) { EXPECT_FALSE(observer->was_opened()); EXPECT_FALSE(download->GetFileExternallyRemoved()); EXPECT_EQ(DownloadItem::COMPLETE, download->GetState()); - EXPECT_EQ(download_item_model->GetStatusText(), ASCIIToUTF16("")); + EXPECT_EQ(download_item_model->GetStatusText(), string16()); EXPECT_TRUE(file_util::PathExists(new_path)); EXPECT_FALSE(file_util::PathExists(cr_path)); @@ -849,7 +849,7 @@ TEST_F(DownloadManagerTest, MAYBE_DownloadRemoveTest) { EXPECT_FALSE(observer->was_opened()); EXPECT_FALSE(download->GetFileExternallyRemoved()); EXPECT_EQ(DownloadItem::COMPLETE, download->GetState()); - EXPECT_EQ(download_item_model->GetStatusText(), ASCIIToUTF16("")); + EXPECT_EQ(download_item_model->GetStatusText(), string16()); EXPECT_TRUE(file_util::PathExists(new_path)); EXPECT_FALSE(file_util::PathExists(cr_path)); diff --git a/chrome/browser/importer/firefox_importer_unittest.cc b/chrome/browser/importer/firefox_importer_unittest.cc index 5788dac..b2ffffa 100644 --- a/chrome/browser/importer/firefox_importer_unittest.cc +++ b/chrome/browser/importer/firefox_importer_unittest.cc @@ -7,6 +7,7 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/path_service.h" +#include "base/string16.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/importer/firefox2_importer.h" @@ -98,7 +99,7 @@ TEST(FirefoxImporterTest, Firefox2BookmarkParse) { "<DT><H3 PERSONAL_TOOLBAR_FOLDER=\"true\"></H3>", charset, &folder_name, &is_toolbar_folder, &folder_add_date); EXPECT_TRUE(result); - EXPECT_EQ(ASCIIToUTF16(""), folder_name); + EXPECT_EQ(string16(), folder_name); EXPECT_TRUE(is_toolbar_folder); // Unicode characters in title and shortcut. @@ -115,7 +116,7 @@ TEST(FirefoxImporterTest, Firefox2BookmarkParse) { EXPECT_EQ(L"\x4E2D\x6587", UTF16ToWide(title)); EXPECT_EQ("http://chinese.site.cn/path?query=1#ref", url.spec()); EXPECT_EQ(L"\x4E2D", UTF16ToWide(shortcut)); - EXPECT_EQ(ASCIIToUTF16(""), post_data); + EXPECT_EQ(string16(), post_data); EXPECT_TRUE(base::Time() == add_date); // No shortcut, and url contains %22 ('"' character). @@ -125,8 +126,8 @@ TEST(FirefoxImporterTest, Firefox2BookmarkParse) { EXPECT_TRUE(result); EXPECT_EQ(ASCIIToUTF16("name"), title); EXPECT_EQ("http://domain.com/?q=%22%3C%3E%22", url.spec()); - EXPECT_EQ(ASCIIToUTF16(""), shortcut); - EXPECT_EQ(ASCIIToUTF16(""), post_data); + EXPECT_EQ(string16(), shortcut); + EXPECT_EQ(string16(), post_data); EXPECT_TRUE(base::Time() == add_date); result = Firefox2Importer::ParseBookmarkFromLine( @@ -135,8 +136,8 @@ TEST(FirefoxImporterTest, Firefox2BookmarkParse) { EXPECT_TRUE(result); EXPECT_EQ(ASCIIToUTF16("name"), title); EXPECT_EQ("http://domain.com/?g=%22", url.spec()); - EXPECT_EQ(ASCIIToUTF16(""), shortcut); - EXPECT_EQ(ASCIIToUTF16(""), post_data); + EXPECT_EQ(string16(), shortcut); + EXPECT_EQ(string16(), post_data); EXPECT_TRUE(base::Time() == add_date); // Creation date. @@ -146,8 +147,8 @@ TEST(FirefoxImporterTest, Firefox2BookmarkParse) { EXPECT_TRUE(result); EXPECT_EQ(ASCIIToUTF16("name"), title); EXPECT_EQ(GURL("http://site/"), url); - EXPECT_EQ(ASCIIToUTF16(""), shortcut); - EXPECT_EQ(ASCIIToUTF16(""), post_data); + EXPECT_EQ(string16(), shortcut); + EXPECT_EQ(string16(), post_data); EXPECT_TRUE(base::Time::FromTimeT(1121301154) == add_date); // Post-data @@ -169,10 +170,10 @@ TEST(FirefoxImporterTest, Firefox2BookmarkParse) { "<DT><A HREF=\"http://domain.com/?q=%22", charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); EXPECT_FALSE(result); - EXPECT_EQ(ASCIIToUTF16(""), title); + EXPECT_EQ(string16(), title); EXPECT_EQ("", url.spec()); - EXPECT_EQ(ASCIIToUTF16(""), shortcut); - EXPECT_EQ(ASCIIToUTF16(""), post_data); + EXPECT_EQ(string16(), shortcut); + EXPECT_EQ(string16(), post_data); EXPECT_TRUE(base::Time() == add_date); // Epiphany format. diff --git a/chrome/browser/importer/safari_importer_unittest.mm b/chrome/browser/importer/safari_importer_unittest.mm index bb51b91..31bb72a 100644 --- a/chrome/browser/importer/safari_importer_unittest.mm +++ b/chrome/browser/importer/safari_importer_unittest.mm @@ -9,6 +9,7 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/scoped_temp_dir.h" +#include "base/string16.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" @@ -108,19 +109,19 @@ TEST_F(SafariImporterTest, BookmarkImport) { { false, GURL("http://www.reddit.com/"), - ASCIIToUTF16(""), + string16(), ASCIIToUTF16("reddit.com: what's new online!") }, { false, GURL(), - ASCIIToUTF16(""), + string16(), ASCIIToUTF16("Empty Folder") }, { false, GURL("http://www.webkit.org/blog/"), - ASCIIToUTF16(""), + string16(), ASCIIToUTF16("Surfin' Safari - The WebKit Blog") }, }; diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc index 1054449..64119cc 100644 --- a/chrome/browser/page_info_model.cc +++ b/chrome/browser/page_info_model.cc @@ -10,6 +10,7 @@ #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/i18n/time_formatting.h" +#include "base/string16.h" #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "chrome/browser/page_info_model_observer.h" @@ -39,7 +40,7 @@ PageInfoModel::PageInfoModel(Profile* profile, if (url.SchemeIs(chrome::kChromeUIScheme)) { sections_.push_back( SectionInfo(ICON_STATE_INTERNAL_PAGE, - ASCIIToUTF16(""), + string16(), l10n_util::GetStringUTF16(IDS_PAGE_INFO_INTERNAL_PAGE), SECTION_INFO_INTERNAL_PAGE)); return; diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm index fd09f81..e2b50d3 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm @@ -6,6 +6,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_nsobject.h" +#include "base/string16.h" #include "base/utf_string_conversions.h" #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" #include "chrome/browser/ui/cocoa/browser_window_controller.h" @@ -192,7 +193,7 @@ TEST_F(BookmarkBubbleControllerTest, TestFolderWithBlankName) { ASCIIToUTF16("one")); EXPECT_TRUE(node1); const BookmarkNode* node2 = model->AddFolder(bookmarkBarNode, 1, - ASCIIToUTF16("")); + string16()); EXPECT_TRUE(node2); const BookmarkNode* node3 = model->AddFolder(bookmarkBarNode, 2, ASCIIToUTF16("three")); diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc index 019a565..7ad8190 100644 --- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc +++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/message_loop.h" +#include "base/string16.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/profiles/profile.h" @@ -957,7 +958,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PrepopulateInNewTab) { // in the first tab. EXPECT_EQ(ASCIIToUTF16("page"), GetFindBarText()); // But it should not seem like a search has been issued. - EXPECT_EQ(ASCIIToUTF16(""), GetMatchCountText()); + EXPECT_EQ(string16(), GetMatchCountText()); } // This makes sure that we can search for A in tabA, then for B in tabB and diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc index 31a9f3a..009c7a8 100644 --- a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc +++ b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc @@ -5,6 +5,7 @@ #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" #include "base/path_service.h" +#include "base/string16.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/history.h" @@ -345,7 +346,7 @@ TEST_F(BackFwdMenuModelTest, ChapterStops) { // Check to see if the chapter stops have the right labels. int index = BackForwardMenuModel::kMaxHistoryItems; // Empty string indicates item is a separator. - EXPECT_EQ(ASCIIToUTF16(""), back_model->GetLabelAt(index++)); + EXPECT_EQ(string16(), back_model->GetLabelAt(index++)); EXPECT_EQ(ASCIIToUTF16("F3"), back_model->GetLabelAt(index++)); EXPECT_EQ(ASCIIToUTF16("E3"), back_model->GetLabelAt(index++)); EXPECT_EQ(ASCIIToUTF16("D3"), back_model->GetLabelAt(index++)); @@ -353,7 +354,7 @@ TEST_F(BackFwdMenuModelTest, ChapterStops) { // The menu should only show a maximum of 5 chapter stops. EXPECT_EQ(ASCIIToUTF16("B3"), back_model->GetLabelAt(index)); // Empty string indicates item is a separator. - EXPECT_EQ(ASCIIToUTF16(""), back_model->GetLabelAt(index + 1)); + EXPECT_EQ(string16(), back_model->GetLabelAt(index + 1)); EXPECT_EQ(back_model->GetShowFullHistoryLabel(), back_model->GetLabelAt(index + 2)); @@ -371,7 +372,7 @@ TEST_F(BackFwdMenuModelTest, ChapterStops) { EXPECT_EQ(ASCIIToUTF16("A3"), back_model->GetLabelAt(index)); GoBack(); // It is now a separator. - EXPECT_EQ(ASCIIToUTF16(""), back_model->GetLabelAt(index)); + EXPECT_EQ(string16(), back_model->GetLabelAt(index)); // Undo our position change. NavigateToOffset(6); @@ -394,7 +395,7 @@ TEST_F(BackFwdMenuModelTest, ChapterStops) { // Check to see if the chapter stops have the right labels. index = BackForwardMenuModel::kMaxHistoryItems; // Empty string indicates item is a separator. - EXPECT_EQ(ASCIIToUTF16(""), forward_model->GetLabelAt(index++)); + EXPECT_EQ(string16(), forward_model->GetLabelAt(index++)); EXPECT_EQ(ASCIIToUTF16("E3"), forward_model->GetLabelAt(index++)); EXPECT_EQ(ASCIIToUTF16("F3"), forward_model->GetLabelAt(index++)); EXPECT_EQ(ASCIIToUTF16("G3"), forward_model->GetLabelAt(index++)); @@ -402,7 +403,7 @@ TEST_F(BackFwdMenuModelTest, ChapterStops) { // The menu should only show a maximum of 5 chapter stops. EXPECT_EQ(ASCIIToUTF16("I3"), forward_model->GetLabelAt(index)); // Empty string indicates item is a separator. - EXPECT_EQ(ASCIIToUTF16(""), forward_model->GetLabelAt(index + 1)); + EXPECT_EQ(string16(), forward_model->GetLabelAt(index + 1)); EXPECT_EQ(forward_model->GetShowFullHistoryLabel(), forward_model->GetLabelAt(index + 2)); diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc index 4f9b238..1bf0cd3 100644 --- a/chrome/browser/ui/webui/flash_ui.cc +++ b/chrome/browser/ui/webui/flash_ui.cc @@ -12,6 +12,7 @@ #include "base/bind_helpers.h" #include "base/i18n/time_formatting.h" #include "base/memory/weak_ptr.h" +#include "base/string16.h" #include "base/string_number_conversions.h" #include "base/stringprintf.h" #include "base/threading/thread_restrictions.h" @@ -276,7 +277,7 @@ void FlashDOMHandler::MaybeRespondToPage() { } // Crash information. - AddPair(list, ASCIIToUTF16(""), "--- Crash data ---"); + AddPair(list, string16(), "--- Crash data ---"); bool crash_reporting_enabled = CrashesUI::CrashReportingEnabled(); if (crash_reporting_enabled) { std::vector<CrashUploadList::CrashInfo> crashes; @@ -297,7 +298,7 @@ void FlashDOMHandler::MaybeRespondToPage() { } // GPU information. - AddPair(list, ASCIIToUTF16(""), "--- GPU information ---"); + AddPair(list, string16(), "--- GPU information ---"); const content::GPUInfo& gpu_info = gpu_data_manager_->gpu_info(); if (!gpu_data_manager_->GpuAccessAllowed()) @@ -325,7 +326,7 @@ void FlashDOMHandler::MaybeRespondToPage() { } #endif - AddPair(list, ASCIIToUTF16(""), "--- GPU driver, more information ---"); + AddPair(list, string16(), "--- GPU driver, more information ---"); AddPair(list, ASCIIToUTF16("Vendor Id"), base::StringPrintf("0x%04x", gpu_info.vendor_id)); diff --git a/chrome/browser/webdata/web_database_migration_unittest.cc b/chrome/browser/webdata/web_database_migration_unittest.cc index 3969e00..ef5dbd1 100644 --- a/chrome/browser/webdata/web_database_migration_unittest.cc +++ b/chrome/browser/webdata/web_database_migration_unittest.cc @@ -1044,9 +1044,9 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { // Dave Smith. ASSERT_TRUE(s1.Step()); EXPECT_EQ("4C74A9D8-7EEE-423E-F9C2-E7FA70ED1396", s1.ColumnString(0)); - EXPECT_EQ(ASCIIToUTF16(""), s1.ColumnString16(1)); + EXPECT_EQ(string16(), s1.ColumnString16(1)); EXPECT_EQ(ASCIIToUTF16("2 Main Street"), s1.ColumnString16(2)); - EXPECT_EQ(ASCIIToUTF16(""), s1.ColumnString16(3)); + EXPECT_EQ(string16(), s1.ColumnString16(3)); EXPECT_EQ(ASCIIToUTF16("Los Altos"), s1.ColumnString16(4)); EXPECT_EQ(ASCIIToUTF16("CA"), s1.ColumnString16(5)); EXPECT_EQ(ASCIIToUTF16("94022"), s1.ColumnString16(6)); @@ -1056,9 +1056,9 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { // Dave Smith (Part 2). ASSERT_TRUE(s1.Step()); EXPECT_EQ("722DF5C4-F74A-294A-46F0-31FFDED0D635", s1.ColumnString(0)); - EXPECT_EQ(ASCIIToUTF16(""), s1.ColumnString16(1)); + EXPECT_EQ(string16(), s1.ColumnString16(1)); EXPECT_EQ(ASCIIToUTF16("2 Main St"), s1.ColumnString16(2)); - EXPECT_EQ(ASCIIToUTF16(""), s1.ColumnString16(3)); + EXPECT_EQ(string16(), s1.ColumnString16(3)); EXPECT_EQ(ASCIIToUTF16("Los Altos"), s1.ColumnString16(4)); EXPECT_EQ(ASCIIToUTF16("CA"), s1.ColumnString16(5)); EXPECT_EQ(ASCIIToUTF16("94022"), s1.ColumnString16(6)); @@ -1071,9 +1071,9 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { // 3 Main St. ASSERT_TRUE(s1.Step()); EXPECT_EQ("9E5FE298-62C7-83DF-6293-381BC589183F", s1.ColumnString(0)); - EXPECT_EQ(ASCIIToUTF16(""), s1.ColumnString16(1)); + EXPECT_EQ(string16(), s1.ColumnString16(1)); EXPECT_EQ(ASCIIToUTF16("3 Main St"), s1.ColumnString16(2)); - EXPECT_EQ(ASCIIToUTF16(""), s1.ColumnString16(3)); + EXPECT_EQ(string16(), s1.ColumnString16(3)); EXPECT_EQ(ASCIIToUTF16("Los Altos"), s1.ColumnString16(4)); EXPECT_EQ(ASCIIToUTF16("CA"), s1.ColumnString16(5)); EXPECT_EQ(ASCIIToUTF16("94022"), s1.ColumnString16(6)); @@ -1092,7 +1092,7 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { ASSERT_TRUE(s2.Step()); EXPECT_EQ("00580526-FF81-EE2A-0546-1AC593A32E2F", s2.ColumnString(0)); EXPECT_EQ(ASCIIToUTF16("John"), s2.ColumnString16(1)); - EXPECT_EQ(ASCIIToUTF16(""), s2.ColumnString16(2)); + EXPECT_EQ(string16(), s2.ColumnString16(2)); EXPECT_EQ(ASCIIToUTF16("Doe"), s2.ColumnString16(3)); // John P. Doe. Note same guid as above due to merging of multi-valued @@ -1107,14 +1107,14 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { ASSERT_TRUE(s2.Step()); EXPECT_EQ("4C74A9D8-7EEE-423E-F9C2-E7FA70ED1396", s2.ColumnString(0)); EXPECT_EQ(ASCIIToUTF16("Dave"), s2.ColumnString16(1)); - EXPECT_EQ(ASCIIToUTF16(""), s2.ColumnString16(2)); + EXPECT_EQ(string16(), s2.ColumnString16(2)); EXPECT_EQ(ASCIIToUTF16("Smith"), s2.ColumnString16(3)); // Dave Smith (Part 2). ASSERT_TRUE(s2.Step()); EXPECT_EQ("722DF5C4-F74A-294A-46F0-31FFDED0D635", s2.ColumnString(0)); EXPECT_EQ(ASCIIToUTF16("Dave"), s2.ColumnString16(1)); - EXPECT_EQ(ASCIIToUTF16(""), s2.ColumnString16(2)); + EXPECT_EQ(string16(), s2.ColumnString16(2)); EXPECT_EQ(ASCIIToUTF16("Smith"), s2.ColumnString16(3)); // Alfred E Newman. @@ -1123,9 +1123,9 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { // 3 Main St. ASSERT_TRUE(s2.Step()); EXPECT_EQ("9E5FE298-62C7-83DF-6293-381BC589183F", s2.ColumnString(0)); - EXPECT_EQ(ASCIIToUTF16(""), s2.ColumnString16(1)); - EXPECT_EQ(ASCIIToUTF16(""), s2.ColumnString16(2)); - EXPECT_EQ(ASCIIToUTF16(""), s2.ColumnString16(3)); + EXPECT_EQ(string16(), s2.ColumnString16(1)); + EXPECT_EQ(string16(), s2.ColumnString16(2)); + EXPECT_EQ(string16(), s2.ColumnString16(3)); // Should be all. EXPECT_FALSE(s2.Step()); @@ -1147,12 +1147,12 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { // 2 Main Street. ASSERT_TRUE(s3.Step()); EXPECT_EQ("4C74A9D8-7EEE-423E-F9C2-E7FA70ED1396", s3.ColumnString(0)); - EXPECT_EQ(ASCIIToUTF16(""), s3.ColumnString16(1)); + EXPECT_EQ(string16(), s3.ColumnString16(1)); // 2 Main St. ASSERT_TRUE(s3.Step()); EXPECT_EQ("722DF5C4-F74A-294A-46F0-31FFDED0D635", s3.ColumnString(0)); - EXPECT_EQ(ASCIIToUTF16(""), s3.ColumnString16(1)); + EXPECT_EQ(string16(), s3.ColumnString16(1)); // Alfred E Newman. // Gets culled during migration from 35 to 36 due to incomplete address. @@ -1160,7 +1160,7 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { // 3 Main St. ASSERT_TRUE(s3.Step()); EXPECT_EQ("9E5FE298-62C7-83DF-6293-381BC589183F", s3.ColumnString(0)); - EXPECT_EQ(ASCIIToUTF16(""), s3.ColumnString16(1)); + EXPECT_EQ(string16(), s3.ColumnString16(1)); // Should be all. EXPECT_FALSE(s3.Step()); @@ -1191,7 +1191,7 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { ASSERT_TRUE(s4.Step()); EXPECT_EQ("4C74A9D8-7EEE-423E-F9C2-E7FA70ED1396", s4.ColumnString(0)); EXPECT_EQ(0, s4.ColumnInt(1)); // 0 means phone. - EXPECT_EQ(ASCIIToUTF16(""), s4.ColumnString16(2)); + EXPECT_EQ(string16(), s4.ColumnString16(2)); // 2 Main Street fax. // Gets culled after fax type removed. @@ -1200,7 +1200,7 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { ASSERT_TRUE(s4.Step()); EXPECT_EQ("722DF5C4-F74A-294A-46F0-31FFDED0D635", s4.ColumnString(0)); EXPECT_EQ(0, s4.ColumnInt(1)); // 0 means phone. - EXPECT_EQ(ASCIIToUTF16(""), s4.ColumnString16(2)); + EXPECT_EQ(string16(), s4.ColumnString16(2)); // 2 Main St fax. // Gets culled after fax type removed. @@ -1211,7 +1211,7 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { ASSERT_TRUE(s4.Step()); EXPECT_EQ("9E5FE298-62C7-83DF-6293-381BC589183F", s4.ColumnString(0)); EXPECT_EQ(0, s4.ColumnInt(1)); // 0 means phone. - EXPECT_EQ(ASCIIToUTF16(""), s4.ColumnString16(2)); + EXPECT_EQ(string16(), s4.ColumnString16(2)); // 2 Main St fax. // Gets culled after fax type removed. |