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

Side by Side Diff: chrome/browser/gtk/options/languages_page_gtk_unittest.cc

Issue 6186008: Linux: fix a bunch of NULL vs. 0 issues spotted by gcc 4.5. (Closed) Base URL: svn://svn.chromium.org/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
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 "chrome/browser/gtk/options/languages_page_gtk.h" 5 #include "chrome/browser/gtk/options/languages_page_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 EXPECT_EQ(FALSE, gtk_toggle_button_get_active( 249 EXPECT_EQ(FALSE, gtk_toggle_button_get_active(
250 GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_))); 250 GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_)));
251 251
252 profile_->GetPrefs()->SetBoolean(prefs::kEnableSpellCheck, true); 252 profile_->GetPrefs()->SetBoolean(prefs::kEnableSpellCheck, true);
253 EXPECT_EQ(TRUE, gtk_toggle_button_get_active( 253 EXPECT_EQ(TRUE, gtk_toggle_button_get_active(
254 GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_))); 254 GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_)));
255 255
256 gtk_button_clicked(GTK_BUTTON(page.enable_spellchecking_checkbox_)); 256 gtk_button_clicked(GTK_BUTTON(page.enable_spellchecking_checkbox_));
257 EXPECT_EQ(FALSE, gtk_toggle_button_get_active( 257 EXPECT_EQ(FALSE, gtk_toggle_button_get_active(
258 GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_))); 258 GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_)));
259 EXPECT_EQ(false, profile_->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); 259 EXPECT_FALSE(profile_->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck));
260 260
261 gtk_button_clicked(GTK_BUTTON(page.enable_spellchecking_checkbox_)); 261 gtk_button_clicked(GTK_BUTTON(page.enable_spellchecking_checkbox_));
262 EXPECT_EQ(TRUE, gtk_toggle_button_get_active( 262 EXPECT_EQ(TRUE, gtk_toggle_button_get_active(
263 GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_))); 263 GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_)));
264 EXPECT_EQ(true, profile_->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); 264 EXPECT_EQ(true, profile_->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck));
265 } 265 }
266 266
267 // TODO(mattm): add EnableAutoSpellChecking test 267 // TODO(mattm): add EnableAutoSpellChecking test
268 268
269 TEST_F(LanguagesPageGtkTest, DictionaryLanguage) { 269 TEST_F(LanguagesPageGtkTest, DictionaryLanguage) {
(...skipping 30 matching lines...) Expand all
300 EXPECT_STREQ("French", GetDisplayedSpellCheckerLang(page).c_str()); 300 EXPECT_STREQ("French", GetDisplayedSpellCheckerLang(page).c_str());
301 301
302 gtk_combo_box_set_active( 302 gtk_combo_box_set_active(
303 GTK_COMBO_BOX(page.dictionary_language_combobox_), 303 GTK_COMBO_BOX(page.dictionary_language_combobox_),
304 page.dictionary_language_model_->GetIndexFromLocale("it")); 304 page.dictionary_language_model_->GetIndexFromLocale("it"));
305 EXPECT_STREQ("Italian", GetDisplayedLangs(page).c_str()); 305 EXPECT_STREQ("Italian", GetDisplayedLangs(page).c_str());
306 EXPECT_STREQ("it", 306 EXPECT_STREQ("it",
307 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages).c_str()); 307 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages).c_str());
308 EXPECT_STREQ("Italian", GetDisplayedSpellCheckerLang(page).c_str()); 308 EXPECT_STREQ("Italian", GetDisplayedSpellCheckerLang(page).c_str());
309 } 309 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/history/top_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698