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

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

Issue 679273002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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) 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 "base/files/file_util.h" 5 #include "base/files/file_util.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 spell_check_->spellcheck_.platform_spelling_engine_.reset( 63 spell_check_->spellcheck_.platform_spelling_engine_.reset(
64 new HunspellEngine); 64 new HunspellEngine);
65 #endif 65 #endif
66 spell_check_->Init(file.Pass(), std::set<std::string>(), language); 66 spell_check_->Init(file.Pass(), std::set<std::string>(), language);
67 } 67 }
68 68
69 void EnableAutoCorrect(bool enable_autocorrect) { 69 void EnableAutoCorrect(bool enable_autocorrect) {
70 spell_check_->OnEnableAutoSpellCorrect(enable_autocorrect); 70 spell_check_->OnEnableAutoSpellCorrect(enable_autocorrect);
71 } 71 }
72 72
73 virtual ~SpellCheckTest() { 73 ~SpellCheckTest() override {}
74 }
75 74
76 SpellCheck* spell_check() { return spell_check_.get(); } 75 SpellCheck* spell_check() { return spell_check_.get(); }
77 76
78 bool CheckSpelling(const std::string& word, int tag) { 77 bool CheckSpelling(const std::string& word, int tag) {
79 return spell_check_->spellcheck_.platform_spelling_engine_->CheckSpelling( 78 return spell_check_->spellcheck_.platform_spelling_engine_->CheckSpelling(
80 base::ASCIIToUTF16(word), tag); 79 base::ASCIIToUTF16(word), tag);
81 } 80 }
82 81
83 #if !defined(OS_MACOSX) 82 #if !defined(OS_MACOSX)
84 protected: 83 protected:
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 strlen(kTestCases[i].misspelled), 1363 strlen(kTestCases[i].misspelled),
1365 0, 1364 0,
1366 &misspelling_start, 1365 &misspelling_start,
1367 &misspelling_length, 1366 &misspelling_length,
1368 &suggestions)); 1367 &suggestions));
1369 EXPECT_GE(suggestions.size(), static_cast<size_t>(1)); 1368 EXPECT_GE(suggestions.size(), static_cast<size_t>(1));
1370 if (suggestions.size() > 0) 1369 if (suggestions.size() > 0)
1371 EXPECT_EQ(suggestions[0], base::ASCIIToUTF16(kTestCases[i].suggestion)); 1370 EXPECT_EQ(suggestions[0], base::ASCIIToUTF16(kTestCases[i].suggestion));
1372 } 1371 }
1373 } 1372 }
OLDNEW
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider_test.h ('k') | chrome/renderer/translate/translate_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698