TEST(ChomeProfileTest, OneLineLocalState_ReadUILocale) { wstring location; ChomeProfileTest chromeProfile; TempFile tempFile; Application::GetExecutionLocation(location); location += L"Chrome\\CatalanUI_OneLineProfile\\User Data\\"; location += L"/../User Data/Local State"; CopyFile(location.c_str(), tempFile.GetFileName().c_str(), false); chromeProfile.SetPath(GetPathFromFullFileName(tempFile.GetFileName())); chromeProfile.SetUIRelPathAndFile(GetFileNameFromFullFileName(tempFile.GetFileName())); EXPECT_TRUE(chromeProfile.IsUiLocaleOk()); }
TEST(ChomeProfileTest, OneLinePreferences_EsSpellChecker_SetCatalanAsSpellCheckerLanguage) { wstring location; ChomeProfileTest chromeProfile; TempFile tempFile; Application::GetExecutionLocation(location); location += L"Chrome\\CatalanUI_OneLineProfile\\User Data\\"; location += L"/../User Data/Default/Preferences"; CopyFile(location.c_str(), tempFile.GetFileName().c_str(), false); chromeProfile.SetPath(GetPathFromFullFileName(tempFile.GetFileName())); chromeProfile.SetPreferencesRelPathAndFile(GetFileNameFromFullFileName(tempFile.GetFileName())); chromeProfile.SetCatalanAsSpellCheckerLanguage(); chromeProfile.WriteSpellAndAcceptLanguages(); EXPECT_TRUE(chromeProfile.IsSpellCheckerLanguageOk()); }
TEST(ChomeProfileTest, WriteUILocale) { wstring location; ChomeProfileTest chromeProfile; TempFile tempFile; Application::GetExecutionLocation(location); location += L"Chrome\\SpanishUI_NoAcceptLanguage\\User Data\\"; location += L"/../User Data/Local State"; CopyFile(location.c_str(), tempFile.GetFileName().c_str(), false); chromeProfile.SetPath(GetPathFromFullFileName(tempFile.GetFileName())); chromeProfile.SetUIRelPathAndFile(GetFileNameFromFullFileName(tempFile.GetFileName())); chromeProfile.WriteUILocale(); EXPECT_TRUE(chromeProfile.IsUiLocaleOk()); }
TEST(ChomeProfileTest, PrevLanguage_SetAcceptLanguages) { wstring location, langcode; ChomeProfileTest chromeProfile; TempFile tempFile; Application::GetExecutionLocation(location); location += L"Chrome\\SpanishUI_AcceptLanguage_es_de_br\\User Data\\"; location += L"/../User Data/Default/Preferences"; CopyFile(location.c_str(), tempFile.GetFileName().c_str(), false); chromeProfile.SetPath(GetPathFromFullFileName(tempFile.GetFileName())); chromeProfile.SetPreferencesRelPathAndFile(GetFileNameFromFullFileName(tempFile.GetFileName())); chromeProfile.SetCatalanAsAcceptLanguages(); chromeProfile.WriteSpellAndAcceptLanguages(); chromeProfile.ReadAcceptLanguages(langcode); EXPECT_THAT(langcode, StrCaseEq(L"ca,es,de,br")); }