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

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

Issue 192017: Convert std::wstring encoding names to std::string in a bunch of files. (Closed)
Patch Set: mac and linux fixes Created 11 years, 3 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "app/message_box_flags.h" 5 #include "app/message_box_flags.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "chrome/browser/renderer_host/render_view_host.h" 7 #include "chrome/browser/renderer_host/render_view_host.h"
8 #include "chrome/browser/renderer_host/render_widget_host_view.h" 8 #include "chrome/browser/renderer_host/render_widget_host_view.h"
9 #include "chrome/browser/renderer_host/test/test_render_view_host.h" 9 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
10 #include "chrome/browser/tab_contents/interstitial_page.h" 10 #include "chrome/browser/tab_contents/interstitial_page.h"
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 NavigationEntry* entry = controller().GetLastCommittedEntry(); 565 NavigationEntry* entry = controller().GetLastCommittedEntry();
566 EXPECT_FALSE(entry->content_state().empty()); 566 EXPECT_FALSE(entry->content_state().empty());
567 } 567 }
568 568
569 // Tests to see that webkit preferences are properly loaded and copied over 569 // Tests to see that webkit preferences are properly loaded and copied over
570 // to a WebPreferences object. 570 // to a WebPreferences object.
571 TEST_F(TabContentsTest, WebKitPrefs) { 571 TEST_F(TabContentsTest, WebKitPrefs) {
572 WebPreferences webkit_prefs = contents()->TestGetWebkitPrefs(); 572 WebPreferences webkit_prefs = contents()->TestGetWebkitPrefs();
573 573
574 // These values have been overridden by the profile preferences. 574 // These values have been overridden by the profile preferences.
575 EXPECT_EQ(L"UTF-8", webkit_prefs.default_encoding); 575 EXPECT_EQ("UTF-8", webkit_prefs.default_encoding);
576 EXPECT_EQ(20, webkit_prefs.default_font_size); 576 EXPECT_EQ(20, webkit_prefs.default_font_size);
577 EXPECT_EQ(false, webkit_prefs.text_areas_are_resizable); 577 EXPECT_EQ(false, webkit_prefs.text_areas_are_resizable);
578 EXPECT_EQ(true, webkit_prefs.uses_universal_detector); 578 EXPECT_EQ(true, webkit_prefs.uses_universal_detector);
579 579
580 // These should still be the default values. 580 // These should still be the default values.
581 EXPECT_EQ(L"Times New Roman", webkit_prefs.standard_font_family); 581 EXPECT_EQ(L"Times New Roman", webkit_prefs.standard_font_family);
582 EXPECT_EQ(true, webkit_prefs.javascript_enabled); 582 EXPECT_EQ(true, webkit_prefs.javascript_enabled);
583 } 583 }
584 584
585 //////////////////////////////////////////////////////////////////////////////// 585 ////////////////////////////////////////////////////////////////////////////////
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 1283
1284 // While the interstitial is showing, let's simulate the hidden page 1284 // While the interstitial is showing, let's simulate the hidden page
1285 // attempting to show a JS message. 1285 // attempting to show a JS message.
1286 IPC::Message* dummy_message = new IPC::Message; 1286 IPC::Message* dummy_message = new IPC::Message;
1287 bool did_suppress_message = false; 1287 bool did_suppress_message = false;
1288 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK", 1288 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK",
1289 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message, 1289 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message,
1290 &did_suppress_message); 1290 &did_suppress_message);
1291 EXPECT_TRUE(did_suppress_message); 1291 EXPECT_TRUE(did_suppress_message);
1292 } 1292 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/views/options/fonts_page_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698