Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc

Issue 1135163002: Omnibox - Strip Extra Whitespace from Custom Search Engine Names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests that don't set short_name Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 static const char kImageSearchPostParams[] = 470 static const char kImageSearchPostParams[] =
471 "thumb={google:imageThumbnail}"; 471 "thumb={google:imageThumbnail}";
472 472
473 TemplateURLService* model = 473 TemplateURLService* model =
474 TemplateURLServiceFactory::GetForProfile(browser()->profile()); 474 TemplateURLServiceFactory::GetForProfile(browser()->profile());
475 ASSERT_TRUE(model); 475 ASSERT_TRUE(model);
476 ui_test_utils::WaitForTemplateURLServiceToLoad(model); 476 ui_test_utils::WaitForTemplateURLServiceToLoad(model);
477 ASSERT_TRUE(model->loaded()); 477 ASSERT_TRUE(model->loaded());
478 478
479 TemplateURLData data; 479 TemplateURLData data;
480 data.short_name = base::ASCIIToUTF16(kShortName); 480 data.SetShortName(base::ASCIIToUTF16(kShortName));
481 data.SetKeyword(data.short_name); 481 data.SetKeyword(data.short_name());
482 data.SetURL(test_server()->GetURL(kSearchURL).spec()); 482 data.SetURL(test_server()->GetURL(kSearchURL).spec());
483 data.image_url = GetImageSearchURL().spec(); 483 data.image_url = GetImageSearchURL().spec();
484 data.image_url_post_params = kImageSearchPostParams; 484 data.image_url_post_params = kImageSearchPostParams;
485 485
486 // The model takes ownership of |template_url|. 486 // The model takes ownership of |template_url|.
487 TemplateURL* template_url = new TemplateURL(data); 487 TemplateURL* template_url = new TemplateURL(data);
488 ASSERT_TRUE(model->Add(template_url)); 488 ASSERT_TRUE(model->Add(template_url));
489 model->SetUserSelectedDefaultSearchProvider(template_url); 489 model->SetUserSelectedDefaultSearchProvider(template_url);
490 } 490 }
491 491
(...skipping 27 matching lines...) Expand all
519 browser()->tab_strip_model()->GetActiveWebContents(); 519 browser()->tab_strip_model()->GetActiveWebContents();
520 ThumbnailResponseWatcher watcher(tab->GetRenderProcessHost()); 520 ThumbnailResponseWatcher watcher(tab->GetRenderProcessHost());
521 AttemptImageSearch(); 521 AttemptImageSearch();
522 522
523 // The browser should receive a response from the renderer, because the 523 // The browser should receive a response from the renderer, because the
524 // renderer should not crash. 524 // renderer should not crash.
525 EXPECT_EQ(ThumbnailResponseWatcher::THUMBNAIL_RECEIVED, watcher.Wait()); 525 EXPECT_EQ(ThumbnailResponseWatcher::THUMBNAIL_RECEIVED, watcher.Wait());
526 } 526 }
527 527
528 } // namespace 528 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu.cc ('k') | chrome/browser/search/instant_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698