• Home
  • Raw
  • Download

Lines Matching refs:infobar

95     InfoBarDelegate* infobar = GetTranslateInfoBar();  in CloseTranslateInfoBar()  local
96 if (!infobar) in CloseTranslateInfoBar()
98 infobar->InfoBarDismissed(); // Simulates closing the infobar. in CloseTranslateInfoBar()
99 contents()->RemoveInfoBar(infobar); in CloseTranslateInfoBar()
128 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in DenyTranslation() local
129 if (!infobar) in DenyTranslation()
131 infobar->TranslationDeclined(); in DenyTranslation()
132 contents()->RemoveInfoBar(infobar); in DenyTranslation()
285 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
286 ASSERT_TRUE(infobar != NULL); in TEST_F()
287 EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE, infobar->type()); in TEST_F()
291 infobar->Translate(); in TEST_F()
294 infobar = GetTranslateInfoBar(); in TEST_F()
295 ASSERT_TRUE(infobar != NULL); in TEST_F()
296 EXPECT_EQ(TranslateInfoBarDelegate::TRANSLATING, infobar->type()); in TEST_F()
314 infobar = GetTranslateInfoBar(); in TEST_F()
315 ASSERT_TRUE(infobar != NULL); in TEST_F()
316 EXPECT_EQ(TranslateInfoBarDelegate::AFTER_TRANSLATE, infobar->type()); in TEST_F()
320 std::string new_original_lang = infobar->GetLanguageCodeAt(0); in TEST_F()
321 infobar->SetOriginalLanguage(0); in TEST_F()
331 infobar = new_infobar; in TEST_F()
335 std::string new_target_lang = infobar->GetLanguageCodeAt(1); in TEST_F()
336 infobar->SetTargetLanguage(1); in TEST_F()
353 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
354 ASSERT_TRUE(infobar != NULL); in TEST_F()
355 EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE, infobar->type()); in TEST_F()
359 infobar->Translate(); in TEST_F()
367 infobar = GetTranslateInfoBar(); in TEST_F()
368 ASSERT_TRUE(infobar != NULL); in TEST_F()
369 EXPECT_EQ(TranslateInfoBarDelegate::TRANSLATION_ERROR, infobar->type()); in TEST_F()
390 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
391 ASSERT_TRUE(infobar != NULL); in TEST_F()
392 EXPECT_EQ(TranslateInfoBarDelegate::TRANSLATION_ERROR, infobar->type()); in TEST_F()
393 EXPECT_TRUE(infobar->IsError()); in TEST_F()
394 infobar->MessageInfoBarButtonPressed(); in TEST_F()
403 infobar = GetTranslateInfoBar(); in TEST_F()
404 ASSERT_TRUE(infobar != NULL); in TEST_F()
405 EXPECT_EQ(TranslateInfoBarDelegate::AFTER_TRANSLATE, infobar->type()); in TEST_F()
406 EXPECT_EQ("fr", infobar->GetOriginalLanguageCode()); in TEST_F()
407 EXPECT_EQ("en", infobar->GetTargetLanguageCode()); in TEST_F()
417 infobar = GetTranslateInfoBar(); in TEST_F()
418 ASSERT_TRUE(infobar != NULL); in TEST_F()
419 EXPECT_EQ(TranslateInfoBarDelegate::TRANSLATION_ERROR, infobar->type()); in TEST_F()
420 EXPECT_EQ(TranslateErrors::IDENTICAL_LANGUAGES, infobar->error()); in TEST_F()
430 infobar = GetTranslateInfoBar(); in TEST_F()
431 ASSERT_TRUE(infobar != NULL); in TEST_F()
432 EXPECT_EQ(TranslateInfoBarDelegate::TRANSLATION_ERROR, infobar->type()); in TEST_F()
433 EXPECT_EQ(TranslateErrors::UNKNOWN_LANGUAGE, infobar->error()); in TEST_F()
489 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
490 ASSERT_TRUE(infobar == NULL); in TEST_F()
497 infobar = GetTranslateInfoBar(); in TEST_F()
498 EXPECT_EQ(kExpectations[i], infobar != NULL); in TEST_F()
501 if (infobar != NULL) in TEST_F()
512 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
513 ASSERT_TRUE(infobar != NULL); in TEST_F()
514 infobar->Translate(); in TEST_F()
684 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
685 ASSERT_TRUE(infobar != NULL); in TEST_F()
686 infobar->Translate(); in TEST_F()
713 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
714 ASSERT_TRUE(infobar != NULL); in TEST_F()
715 infobar->Translate(); in TEST_F()
720 infobar = GetTranslateInfoBar(); in TEST_F()
721 ASSERT_TRUE(infobar != NULL); in TEST_F()
728 EXPECT_EQ(infobar, GetTranslateInfoBar()); in TEST_F()
735 EXPECT_TRUE(CheckInfoBarRemovedAndReset(infobar)); in TEST_F()
756 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
757 ASSERT_TRUE(infobar != NULL); in TEST_F()
759 infobar->Translate(); in TEST_F()
768 infobar = GetTranslateInfoBar(); in TEST_F()
769 ASSERT_TRUE(infobar != NULL); in TEST_F()
770 EXPECT_EQ(TranslateInfoBarDelegate::TRANSLATION_ERROR, infobar->type()); in TEST_F()
773 ASSERT_FALSE(infobar->GetMessageInfoBarButtonText().empty()); in TEST_F()
777 infobar->MessageInfoBarButtonPressed(); in TEST_F()
813 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
814 EXPECT_TRUE(infobar != NULL); in TEST_F()
822 infobar = GetTranslateInfoBar(); in TEST_F()
823 EXPECT_TRUE(infobar == NULL); in TEST_F()
828 infobar = GetTranslateInfoBar(); in TEST_F()
829 EXPECT_TRUE(infobar == NULL); in TEST_F()
941 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
942 ASSERT_TRUE(infobar != NULL); in TEST_F()
943 EXPECT_EQ(TranslateInfoBarDelegate::TRANSLATING, infobar->type()); in TEST_F()
976 infobar = GetTranslateInfoBar(); in TEST_F()
977 ASSERT_TRUE(infobar != NULL); in TEST_F()
978 EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE, infobar->type()); in TEST_F()
1012 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
1013 ASSERT_TRUE(infobar != NULL); in TEST_F()
1014 EXPECT_EQ(TranslateInfoBarDelegate::TRANSLATING, infobar->type()); in TEST_F()
1041 infobar = GetTranslateInfoBar(); in TEST_F()
1042 ASSERT_TRUE(infobar != NULL); in TEST_F()
1043 infobar->Translate(); in TEST_F()
1056 infobar = GetTranslateInfoBar(); in TEST_F()
1057 ASSERT_TRUE(infobar != NULL); in TEST_F()
1058 infobar->Translate(); in TEST_F()
1099 TranslateInfoBarDelegate* infobar; in TEST_F() local
1107 infobar = GetTranslateInfoBar(); in TEST_F()
1108 ASSERT_TRUE(infobar != NULL); in TEST_F()
1109 EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE, infobar->type()); in TEST_F()
1111 EXPECT_FALSE(infobar->ShouldShowAlwaysTranslateButton()); in TEST_F()
1112 infobar->Translate(); in TEST_F()
1115 EXPECT_TRUE(infobar->ShouldShowAlwaysTranslateButton()); in TEST_F()
1121 infobar->AlwaysTranslatePageLanguage(); in TEST_F()
1139 infobar = GetTranslateInfoBar(); in TEST_F()
1140 ASSERT_TRUE(infobar != NULL); in TEST_F()
1141 EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE, infobar->type()); in TEST_F()
1143 EXPECT_FALSE(infobar->ShouldShowNeverTranslateButton()); in TEST_F()
1144 infobar->TranslationDeclined(); in TEST_F()
1146 EXPECT_TRUE(infobar->ShouldShowNeverTranslateButton()); in TEST_F()
1152 infobar->NeverTranslatePageLanguage(); in TEST_F()
1183 TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); in TEST_F() local
1184 ASSERT_TRUE(infobar != NULL); in TEST_F()
1186 infobar->Translate(); in TEST_F()
1196 infobar = GetTranslateInfoBar(); in TEST_F()
1197 ASSERT_TRUE(infobar != NULL); in TEST_F()
1199 infobar->Translate(); in TEST_F()