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

Side by Side Diff: Source/testing/runner/MockSpellCheck.h

Issue 23440025: TestRunner library classes should be marked as NonCopyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « Source/testing/runner/MockColorChooser.h ('k') | Source/testing/runner/MockWebAudioDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef MockSpellCheck_h 31 #ifndef MockSpellCheck_h
32 #define MockSpellCheck_h 32 #define MockSpellCheck_h
33 33
34 #include "public/platform/WebNonCopyable.h"
34 #include "public/platform/WebString.h" 35 #include "public/platform/WebString.h"
35 #include "public/platform/WebVector.h" 36 #include "public/platform/WebVector.h"
36 #include <vector> 37 #include <vector>
37 38
38 namespace WebTestRunner { 39 namespace WebTestRunner {
39 40
40 // A mock implementation of a spell-checker used for WebKit tests. 41 // A mock implementation of a spell-checker used for WebKit tests.
41 // This class only implements the minimal functionarities required by WebKit 42 // This class only implements the minimal functionarities required by WebKit
42 // tests, i.e. this class just compares the given string with known misspelled 43 // tests, i.e. this class just compares the given string with known misspelled
43 // words in webkit tests and mark them as missspelled. 44 // words in webkit tests and mark them as missspelled.
44 // Even though this is sufficent for webkit tests, this class is not suitable 45 // Even though this is sufficent for webkit tests, this class is not suitable
45 // for any other usages. 46 // for any other usages.
46 class MockSpellCheck { 47 class MockSpellCheck : public WebKit::WebNonCopyable {
47 public: 48 public:
48 static void fillSuggestionList(const WebKit::WebString& word, WebKit::WebVec tor<WebKit::WebString>* suggestions); 49 static void fillSuggestionList(const WebKit::WebString& word, WebKit::WebVec tor<WebKit::WebString>* suggestions);
49 50
50 MockSpellCheck(); 51 MockSpellCheck();
51 ~MockSpellCheck(); 52 ~MockSpellCheck();
52 53
53 // Checks the spellings of the specified text. 54 // Checks the spellings of the specified text.
54 // This function returns true if the text consists of valid words, and 55 // This function returns true if the text consists of valid words, and
55 // returns false if it includes invalid words. 56 // returns false if it includes invalid words.
56 // When the given text includes invalid words, this function sets the 57 // When the given text includes invalid words, this function sets the
(...skipping 20 matching lines...) Expand all
77 // A table that consists of misspelled words. 78 // A table that consists of misspelled words.
78 std::vector<string16> m_misspelledWords; 79 std::vector<string16> m_misspelledWords;
79 80
80 // A flag representing whether or not this object is initialized. 81 // A flag representing whether or not this object is initialized.
81 bool m_initialized; 82 bool m_initialized;
82 }; 83 };
83 84
84 } 85 }
85 86
86 #endif // MockSpellCheck_h 87 #endif // MockSpellCheck_h
OLDNEW
« no previous file with comments | « Source/testing/runner/MockColorChooser.h ('k') | Source/testing/runner/MockWebAudioDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698