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

Side by Side Diff: chrome/renderer/spellchecker/spellcheck_provider_test.h

Issue 15318004: Store feedback for spellcheck results from spelling service (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 7 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
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 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ 5 #ifndef CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_
6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ 6 #define CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 25 matching lines...) Expand all
36 36
37 // Faked test target, which stores sent message for verification. 37 // Faked test target, which stores sent message for verification.
38 class TestingSpellCheckProvider : public SpellCheckProvider { 38 class TestingSpellCheckProvider : public SpellCheckProvider {
39 public: 39 public:
40 TestingSpellCheckProvider(); 40 TestingSpellCheckProvider();
41 41
42 virtual ~TestingSpellCheckProvider(); 42 virtual ~TestingSpellCheckProvider();
43 virtual bool Send(IPC::Message* message) OVERRIDE; 43 virtual bool Send(IPC::Message* message) OVERRIDE;
44 void OnCallSpellingService(int route_id, 44 void OnCallSpellingService(int route_id,
45 int identifier, 45 int identifier,
46 const string16& text); 46 const string16& text,
47 const std::vector<SpellCheckMarker>& markers);
47 void ResetResult(); 48 void ResetResult();
48 49
49 string16 text_; 50 string16 text_;
50 ScopedVector<IPC::Message> messages_; 51 ScopedVector<IPC::Message> messages_;
51 size_t spelling_service_call_count_; 52 size_t spelling_service_call_count_;
52 }; 53 };
53 54
54 // SpellCheckProvider test fixture. 55 // SpellCheckProvider test fixture.
55 class SpellCheckProviderTest : public testing::Test { 56 class SpellCheckProviderTest : public testing::Test {
56 public: 57 public:
57 SpellCheckProviderTest(); 58 SpellCheckProviderTest();
58 virtual ~SpellCheckProviderTest(); 59 virtual ~SpellCheckProviderTest();
59 60
60 protected: 61 protected:
61 TestingSpellCheckProvider provider_; 62 TestingSpellCheckProvider provider_;
62 }; 63 };
63 64
64 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_ 65 #endif // CHROME_RENDERER_SPELLCHECKER_SPELLCHECK_PROVIDER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698