| OLD | NEW |
| 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 "components/spellcheck/renderer/spellcheck_provider_test.h" | 5 #include "components/spellcheck/renderer/spellcheck_provider_test.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | |
| 8 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 9 #include "components/spellcheck/common/spellcheck_marker.h" | 8 #include "components/spellcheck/common/spellcheck_marker.h" |
| 10 #include "components/spellcheck/common/spellcheck_messages.h" | 9 #include "components/spellcheck/common/spellcheck_messages.h" |
| 11 #include "components/spellcheck/renderer/spellcheck.h" | 10 #include "components/spellcheck/renderer/spellcheck.h" |
| 12 #include "components/spellcheck/spellcheck_build_features.h" | 11 #include "components/spellcheck/spellcheck_build_features.h" |
| 13 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
| 14 | 13 |
| 15 class MockSpellcheck: public SpellCheck { | 14 class MockSpellcheck: public SpellCheck { |
| 16 }; | 15 }; |
| 17 | 16 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 OnCallSpellingService) | 55 OnCallSpellingService) |
| 57 IPC_MESSAGE_UNHANDLED(handled = false) | 56 IPC_MESSAGE_UNHANDLED(handled = false) |
| 58 IPC_END_MESSAGE_MAP() | 57 IPC_END_MESSAGE_MAP() |
| 59 | 58 |
| 60 if (handled) { | 59 if (handled) { |
| 61 delete message; | 60 delete message; |
| 62 return true; | 61 return true; |
| 63 } | 62 } |
| 64 #endif | 63 #endif |
| 65 | 64 |
| 66 messages_.push_back(base::WrapUnique<IPC::Message>(message)); | 65 messages_.push_back(message); |
| 67 return true; | 66 return true; |
| 68 } | 67 } |
| 69 | 68 |
| 70 void TestingSpellCheckProvider::OnCallSpellingService(int route_id, | 69 void TestingSpellCheckProvider::OnCallSpellingService(int route_id, |
| 71 int identifier, | 70 int identifier, |
| 72 const base::string16& text, | 71 const base::string16& text, |
| 73 const std::vector<SpellCheckMarker>& markers) { | 72 const std::vector<SpellCheckMarker>& markers) { |
| 74 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | 73 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) |
| 75 NOTREACHED(); | 74 NOTREACHED(); |
| 76 #else | 75 #else |
| (...skipping 29 matching lines...) Expand all Loading... |
| 106 | 105 |
| 107 bool TestingSpellCheckProvider::SatisfyRequestFromCache( | 106 bool TestingSpellCheckProvider::SatisfyRequestFromCache( |
| 108 const base::string16& text, | 107 const base::string16& text, |
| 109 blink::WebTextCheckingCompletion* completion) { | 108 blink::WebTextCheckingCompletion* completion) { |
| 110 return SpellCheckProvider::SatisfyRequestFromCache(text, completion); | 109 return SpellCheckProvider::SatisfyRequestFromCache(text, completion); |
| 111 } | 110 } |
| 112 | 111 |
| 113 SpellCheckProviderTest::SpellCheckProviderTest() {} | 112 SpellCheckProviderTest::SpellCheckProviderTest() {} |
| 114 SpellCheckProviderTest::~SpellCheckProviderTest() {} | 113 SpellCheckProviderTest::~SpellCheckProviderTest() {} |
| 115 | 114 |
| OLD | NEW |