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

Side by Side Diff: chrome/browser/tab_contents/web_contents_unittest.cc

Issue 7453050: Plumb the title direction up to the renderer host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 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/logging.h" 5 #include "base/logging.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/dom_operation_notification_details.h" 7 #include "chrome/browser/dom_operation_notification_details.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" 9 #include "chrome/browser/tab_contents/chrome_interstitial_page.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 // Test to make sure that title updates get stripped of whitespace. 215 // Test to make sure that title updates get stripped of whitespace.
216 TEST_F(TabContentsTest, UpdateTitle) { 216 TEST_F(TabContentsTest, UpdateTitle) {
217 ViewHostMsg_FrameNavigate_Params params; 217 ViewHostMsg_FrameNavigate_Params params;
218 InitNavigateParams(&params, 0, GURL(chrome::kAboutBlankURL), 218 InitNavigateParams(&params, 0, GURL(chrome::kAboutBlankURL),
219 PageTransition::TYPED); 219 PageTransition::TYPED);
220 220
221 content::LoadCommittedDetails details; 221 content::LoadCommittedDetails details;
222 controller().RendererDidNavigate(params, &details); 222 controller().RendererDidNavigate(params, &details);
223 223
224 contents()->UpdateTitle(rvh(), 0, ASCIIToUTF16(" Lots O' Whitespace\n")); 224 contents()->UpdateTitle(rvh(), 0, ASCIIToUTF16(" Lots O' Whitespace\n"),
225 base::i18n::LEFT_TO_RIGHT);
225 EXPECT_EQ(ASCIIToUTF16("Lots O' Whitespace"), contents()->GetTitle()); 226 EXPECT_EQ(ASCIIToUTF16("Lots O' Whitespace"), contents()->GetTitle());
226 } 227 }
227 228
228 // Test view source mode for the new tabs page. 229 // Test view source mode for the new tabs page.
229 TEST_F(TabContentsTest, NTPViewSource) { 230 TEST_F(TabContentsTest, NTPViewSource) {
230 const char kUrl[] = "view-source:chrome://newtab"; 231 const char kUrl[] = "view-source:chrome://newtab";
231 const GURL kGURL(kUrl); 232 const GURL kGURL(kUrl);
232 233
233 process()->sink().ClearMessages(); 234 process()->sink().ClearMessages();
234 235
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 window.close_count = 0; 1795 window.close_count = 0;
1795 1796
1796 const int kWindowCount = 4; 1797 const int kWindowCount = 4;
1797 for (int i = 0; i < kWindowCount; i++) { 1798 for (int i = 0; i < kWindowCount; i++) {
1798 tab_contents->AddConstrainedDialog(&window); 1799 tab_contents->AddConstrainedDialog(&window);
1799 } 1800 }
1800 EXPECT_EQ(window.close_count, 0); 1801 EXPECT_EQ(window.close_count, 0);
1801 delete tab_contents; 1802 delete tab_contents;
1802 EXPECT_EQ(window.close_count, kWindowCount); 1803 EXPECT_EQ(window.close_count, kWindowCount);
1803 } 1804 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host.h » ('j') | content/browser/renderer_host/render_view_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698