Home | History | Annotate | Download | only in search_engines

Lines Matching defs:t_url

128   TemplateURL* t_url = CreateKeywordWithDate(
131 model->Add(t_url);
132 EXPECT_NE(0, t_url->id());
133 return t_url;
310 TemplateURL* t_url = new TemplateURL(data);
311 model()->Add(t_url);
317 ASSERT_EQ(t_url, model()->GetTemplateURLForKeyword(t_url->keyword()));
318 // We need to make a second copy as the model takes ownership of |t_url| and
320 // |t_url| its ID.
321 scoped_ptr<TemplateURL> cloned_url(new TemplateURL(t_url->data()));
384 TemplateURL* t_url = new TemplateURL(data);
385 model()->Add(t_url);
390 EXPECT_EQ(t_url, model()->GetTemplateURLForKeyword(ASCIIToUTF16("keyword")));
391 EXPECT_EQ(ASCIIToUTF16("second"), t_url->short_name());
392 EXPECT_EQ(ASCIIToUTF16("keyword"), t_url->keyword());
393 EXPECT_FALSE(t_url->safe_for_autoreplace());
402 EXPECT_EQ(t_url, model()->GetTemplateURLForKeyword(ASCIIToUTF16("keyword")));
403 EXPECT_EQ(ASCIIToUTF16("second"), t_url->short_name());
404 EXPECT_EQ(ASCIIToUTF16("keyword"), t_url->keyword());
405 EXPECT_FALSE(t_url->safe_for_autoreplace());
418 EXPECT_EQ(ASCIIToUTF16("second"), t_url->short_name());
419 EXPECT_EQ(ASCIIToUTF16("test2"), t_url->keyword());
492 TemplateURL* t_url = new TemplateURL(data);
493 model()->Add(t_url);
497 EXPECT_EQ(t_url, model()->GetTemplateURLForHost("test3"));
638 TemplateURL* t_url = new TemplateURL(data);
639 model()->Add(t_url);
652 model()->ResetTemplateURL(t_url, new_short_name, new_keyword, new_url);
653 ASSERT_EQ(new_short_name, t_url->short_name());
654 ASSERT_EQ(new_keyword, t_url->keyword());
655 ASSERT_EQ(new_url, t_url->url());
658 ASSERT_EQ(t_url, model()->GetTemplateURLForKeyword(new_keyword));
662 scoped_ptr<TemplateURL> cloned_url(new TemplateURL(t_url->data()));
677 TemplateURL* t_url = AddKeywordWithDate(
682 model()->SetUserSelectedDefaultSearchProvider(t_url);
683 ASSERT_EQ(t_url, model()->GetDefaultSearchProvider());
684 ASSERT_TRUE(t_url->safe_for_autoreplace());
685 ASSERT_TRUE(t_url->show_in_default_list());
691 scoped_ptr<TemplateURL> cloned_url(new TemplateURL(t_url->data()));
703 TemplateURL* t_url = AddKeywordWithDate(
713 model()->ResetTemplateURL(t_url, t_url->short_name(), t_url->keyword(),
714 t_url->url());
724 TemplateURL* t_url = AddKeywordWithDate(
734 model()->ResetTemplateURL(t_url, t_url->short_name(), t_url->keyword(),
735 t_url->url());
762 TemplateURL* t_url = new TemplateURL(data);
763 model()->Add(t_url);
764 const TemplateURLID id = t_url->id();
766 model()->SetUserSelectedDefaultSearchProvider(t_url);
768 scoped_ptr<TemplateURL> cloned_url(new TemplateURL(t_url->data()));
940 const TemplateURL* t_url = AddKeywordWithDate(
943 ASSERT_EQ(t_url, model()->GetTemplateURLForHost("google.com"));
944 EXPECT_EQ("google.com", t_url->url_ref().GetHost(search_terms_data()));
945 EXPECT_EQ(ASCIIToUTF16("google.com"), t_url->keyword());
953 ASSERT_EQ(t_url, model()->GetTemplateURLForHost("google.co.uk"));
955 EXPECT_EQ("google.co.uk", t_url->url_ref().GetHost(search_terms_data()));
956 EXPECT_EQ(ASCIIToUTF16("google.co.uk"), t_url->keyword());
957 EXPECT_EQ("http://google.co.uk/?q=x", t_url->url_ref().ReplaceSearchTerms(
973 ASSERT_EQ(t_url,
975 EXPECT_EQ("google.de", t_url->url_ref().GetHost(search_terms_data()));
976 EXPECT_EQ(ASCIIToUTF16("google.co.uk"), t_url->keyword());
985 ASSERT_EQ(t_url, model()->GetTemplateURLForHost("google.fr"));
987 EXPECT_EQ("google.fr", t_url->url_ref().GetHost(search_terms_data()));
988 EXPECT_EQ(ASCIIToUTF16("google.fr"), t_url->keyword());
998 TemplateURL* t_url = AddKeywordWithDate(
1008 GURL(t_url->url_ref().ReplaceSearchTerms(
1042 TemplateURL* t_url = CreatePreloadedTemplateURL(true, 999999);
1044 model()->Add(t_url);
1068 TemplateURL* t_url = CreatePreloadedTemplateURL(false, 999999);
1070 model()->Add(t_url);
1072 // Do the copy after t_url is added so that the id is set.
1073 scoped_ptr<TemplateURL> cloned_url(new TemplateURL(t_url->data()));
1074 ASSERT_EQ(t_url, model()->GetTemplateURLForKeyword(ASCIIToUTF16("unittest")));
1123 TemplateURL* t_url = CreatePreloadedTemplateURL(true, 999999);
1125 model()->Add(t_url);
1126 model()->SetUserSelectedDefaultSearchProvider(t_url);
1127 // Do the copy after t_url is added and set as default so that its
1129 scoped_ptr<TemplateURL> cloned_url(new TemplateURL(t_url->data()));
1131 ASSERT_EQ(t_url, model()->GetTemplateURLForKeyword(ASCIIToUTF16("unittest")));
1132 ASSERT_EQ(t_url, model()->GetDefaultSearchProvider());
1346 TemplateURL* t_url = new TemplateURL(data);
1347 model()->Add(t_url);
1383 TemplateURL* t_url = new TemplateURL(data);
1384 model()->Add(t_url);