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

Side by Side Diff: chrome/renderer/spellchecker/spellcheck_unittest.cc

Issue 10356025: chrome: Instead of doing a conversion just use string16(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/ui/tab_modal_confirm_dialog_browsertest.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/glue/webkit_glue.h" 5 #include "webkit/glue/webkit_glue.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 TestSpellCheckParagraph(text, expected); 840 TestSpellCheckParagraph(text, expected);
841 } 841 }
842 842
843 // We also skip RequestSpellCheck tests on Mac, because a system spellchecker 843 // We also skip RequestSpellCheck tests on Mac, because a system spellchecker
844 // is used on Mac instead of SpellCheck::RequestTextChecking. 844 // is used on Mac instead of SpellCheck::RequestTextChecking.
845 845
846 // Make sure RequestTextChecking does not crash if input is empty. 846 // Make sure RequestTextChecking does not crash if input is empty.
847 TEST_F(SpellCheckTest, RequestSpellCheckWithEmptyString) { 847 TEST_F(SpellCheckTest, RequestSpellCheckWithEmptyString) {
848 MockTextCheckingCompletion completion; 848 MockTextCheckingCompletion completion;
849 849
850 const string16 text = ASCIIToUTF16(""); 850 const string16 text();
Ben Goodger (Google) 2012/05/04 21:21:00 text;
851 spell_check()->RequestTextChecking(text, 0, &completion); 851 spell_check()->RequestTextChecking(text, 0, &completion);
852 852
853 MessageLoop::current()->RunAllPending(); 853 MessageLoop::current()->RunAllPending();
854 854
855 EXPECT_EQ(completion.completion_count_, 1U); 855 EXPECT_EQ(completion.completion_count_, 1U);
856 } 856 }
857 857
858 // A simple test case having no misspellings. 858 // A simple test case having no misspellings.
859 TEST_F(SpellCheckTest, RequestSpellCheckWithoutMisspelling) { 859 TEST_F(SpellCheckTest, RequestSpellCheckWithoutMisspelling) {
860 MockTextCheckingCompletion completion; 860 MockTextCheckingCompletion completion;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 InitializeSpellCheck("en-US"); 965 InitializeSpellCheck("en-US");
966 966
967 // Calls PostDelayedSpellCheckTask instead of OnInit here for simplicity. 967 // Calls PostDelayedSpellCheckTask instead of OnInit here for simplicity.
968 spell_check()->PostDelayedSpellCheckTask(); 968 spell_check()->PostDelayedSpellCheckTask();
969 MessageLoop::current()->RunAllPending(); 969 MessageLoop::current()->RunAllPending();
970 for (int i = 0; i < 3; ++i) 970 for (int i = 0; i < 3; ++i)
971 EXPECT_EQ(completion[i].completion_count_, 1U); 971 EXPECT_EQ(completion[i].completion_count_, 1U);
972 } 972 }
973 973
974 #endif 974 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698