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

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

Issue 6901003: Revert my recent changes regarding title directionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyrights Created 9 years, 8 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/sessions/session_types.cc ('k') | chrome/browser/ui/browser.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) 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 <vector> 5 #include <vector>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/prefs/pref_value_store.h" 10 #include "chrome/browser/prefs/pref_value_store.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 }; 230 };
231 231
232 // Test to make sure that title updates get stripped of whitespace. 232 // Test to make sure that title updates get stripped of whitespace.
233 TEST_F(TabContentsTest, UpdateTitle) { 233 TEST_F(TabContentsTest, UpdateTitle) {
234 ViewHostMsg_FrameNavigate_Params params; 234 ViewHostMsg_FrameNavigate_Params params;
235 InitNavigateParams(&params, 0, GURL(chrome::kAboutBlankURL)); 235 InitNavigateParams(&params, 0, GURL(chrome::kAboutBlankURL));
236 236
237 NavigationController::LoadCommittedDetails details; 237 NavigationController::LoadCommittedDetails details;
238 controller().RendererDidNavigate(params, 0, &details); 238 controller().RendererDidNavigate(params, 0, &details);
239 239
240 base::i18n::String16WithDirection new_title( 240 contents()->UpdateTitle(rvh(), 0, L" Lots O' Whitespace\n");
241 ASCIIToUTF16(" Lots O' Whitespace\n"),
242 base::i18n::LEFT_TO_RIGHT);
243 contents()->UpdateTitle(rvh(), 0, new_title);
244 EXPECT_EQ(ASCIIToUTF16("Lots O' Whitespace"), contents()->GetTitle()); 241 EXPECT_EQ(ASCIIToUTF16("Lots O' Whitespace"), contents()->GetTitle());
245 } 242 }
246 243
247 // Test view source mode for the new tabs page. 244 // Test view source mode for the new tabs page.
248 TEST_F(TabContentsTest, NTPViewSource) { 245 TEST_F(TabContentsTest, NTPViewSource) {
249 const char kUrl[] = "view-source:chrome://newtab"; 246 const char kUrl[] = "view-source:chrome://newtab";
250 const GURL kGURL(kUrl); 247 const GURL kGURL(kUrl);
251 248
252 process()->sink().ClearMessages(); 249 process()->sink().ClearMessages();
253 250
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 window.close_count = 0; 1738 window.close_count = 0;
1742 1739
1743 const int kWindowCount = 4; 1740 const int kWindowCount = 4;
1744 for (int i = 0; i < kWindowCount; i++) { 1741 for (int i = 0; i < kWindowCount; i++) {
1745 tab_contents->AddConstrainedDialog(&window); 1742 tab_contents->AddConstrainedDialog(&window);
1746 } 1743 }
1747 EXPECT_EQ(window.close_count, 0); 1744 EXPECT_EQ(window.close_count, 0);
1748 delete tab_contents; 1745 delete tab_contents;
1749 EXPECT_EQ(window.close_count, kWindowCount); 1746 EXPECT_EQ(window.close_count, kWindowCount);
1750 } 1747 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_types.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698