Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ | |
| 6 #define ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ | |
| 7 | |
| 8 #include "ash/common/palette_delegate.h" | |
| 9 #include "base/macros.h" | |
| 10 | |
| 11 namespace ash { | |
| 12 | |
| 13 // A simple test double for a PaletteDelegate. | |
| 14 class TestPaletteDelegate : public ash::PaletteDelegate { | |
|
James Cook
2016/08/16 22:08:45
nit: no ash
jdufault
2016/08/16 22:45:52
Done.
| |
| 15 public: | |
| 16 TestPaletteDelegate(); | |
| 17 ~TestPaletteDelegate() override; | |
| 18 | |
| 19 int create_note_count() const { return create_note_count_; } | |
| 20 | |
| 21 int has_note_app_count() const { return has_note_app_count_; } | |
| 22 | |
| 23 void set_has_note_app(bool has_note_app) { has_note_app_ = has_note_app; } | |
| 24 | |
| 25 private: | |
| 26 // ash::PaletteDelegate: | |
|
James Cook
2016/08/16 22:08:45
ditto
jdufault
2016/08/16 22:45:52
Done.
| |
| 27 void CreateNote() override; | |
| 28 bool HasNoteApp() override; | |
| 29 | |
| 30 bool has_note_app_ = false; | |
| 31 int create_note_count_ = 0; | |
| 32 int has_note_app_count_ = 0; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(TestPaletteDelegate); | |
|
James Cook
2016/08/16 22:08:45
I presume this isn't a local class in the unit tes
jdufault
2016/08/16 22:45:52
Yep
| |
| 35 }; | |
|
James Cook
2016/08/16 22:08:45
Hooray for small simple test doubles!
jdufault
2016/08/16 22:45:52
:)
| |
| 36 | |
| 37 } // namespace ash | |
| 38 | |
| 39 #endif // ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ | |
| OLD | NEW |