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

Side by Side Diff: chrome/browser/instant/instant_browsertest.cc

Issue 6322001: Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/importer/profile_writer.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 8 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
9 #include "chrome/browser/browser_list.h" 9 #include "chrome/browser/browser_list.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
11 #include "chrome/browser/instant/instant_controller.h" 11 #include "chrome/browser/instant/instant_controller.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // TemplateURLModel takes ownership of this. 46 // TemplateURLModel takes ownership of this.
47 TemplateURL* template_url = new TemplateURL(); 47 TemplateURL* template_url = new TemplateURL();
48 48
49 std::string url = StringPrintf( 49 std::string url = StringPrintf(
50 "http://%s:%d/files/instant/%s?q={searchTerms}", 50 "http://%s:%d/files/instant/%s?q={searchTerms}",
51 test_server()->host_port_pair().host().c_str(), 51 test_server()->host_port_pair().host().c_str(),
52 test_server()->host_port_pair().port(), 52 test_server()->host_port_pair().port(),
53 page.c_str()); 53 page.c_str());
54 template_url->SetURL(url, 0, 0); 54 template_url->SetURL(url, 0, 0);
55 template_url->SetInstantURL(url, 0, 0); 55 template_url->SetInstantURL(url, 0, 0);
56 template_url->set_keyword(UTF8ToWide("foo")); 56 template_url->set_keyword(ASCIIToUTF16("foo"));
57 template_url->set_short_name(UTF8ToWide("foo")); 57 template_url->set_short_name(ASCIIToUTF16("foo"));
58 58
59 model->Add(template_url); 59 model->Add(template_url);
60 model->SetDefaultSearchProvider(template_url); 60 model->SetDefaultSearchProvider(template_url);
61 } 61 }
62 62
63 void FindLocationBar() { 63 void FindLocationBar() {
64 if (location_bar_) 64 if (location_bar_)
65 return; 65 return;
66 location_bar_ = browser()->window()->GetLocationBar(); 66 location_bar_ = browser()->window()->GetLocationBar();
67 ASSERT_TRUE(location_bar_); 67 ASSERT_TRUE(location_bar_);
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 // Check that the preview contents have been committed. 547 // Check that the preview contents have been committed.
548 ASSERT_FALSE(browser()->instant()->GetPreviewContents()); 548 ASSERT_FALSE(browser()->instant()->GetPreviewContents());
549 ASSERT_FALSE(browser()->instant()->is_active()); 549 ASSERT_FALSE(browser()->instant()->is_active());
550 TabContents* contents = browser()->GetSelectedTabContents(); 550 TabContents* contents = browser()->GetSelectedTabContents();
551 ASSERT_TRUE(contents); 551 ASSERT_TRUE(contents);
552 552
553 // Check that the value is reflected and onsubmit is called. 553 // Check that the value is reflected and onsubmit is called.
554 EXPECT_EQ("true 1 0 2 2 a false abcdef true", 554 EXPECT_EQ("true 1 0 2 2 a false abcdef true",
555 GetSearchStateAsString(preview_)); 555 GetSearchStateAsString(preview_));
556 } 556 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/profile_writer.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698