Chromium Code Reviews| Index: ash/common/test/test_palette_delegate.h |
| diff --git a/ash/common/test/test_palette_delegate.h b/ash/common/test/test_palette_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..416a9088763fa746537c8f7871e1252029bb2724 |
| --- /dev/null |
| +++ b/ash/common/test/test_palette_delegate.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ |
| +#define ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ |
| + |
| +#include "ash/common/palette_delegate.h" |
| +#include "base/macros.h" |
| + |
| +namespace ash { |
| + |
| +// A simple test double for a PaletteDelegate. |
| +class TestPaletteDelegate : public ash::PaletteDelegate { |
|
James Cook
2016/08/16 22:08:45
nit: no ash
jdufault
2016/08/16 22:45:52
Done.
|
| + public: |
| + TestPaletteDelegate(); |
| + ~TestPaletteDelegate() override; |
| + |
| + int create_note_count() const { return create_note_count_; } |
| + |
| + int has_note_app_count() const { return has_note_app_count_; } |
| + |
| + void set_has_note_app(bool has_note_app) { has_note_app_ = has_note_app; } |
| + |
| + private: |
| + // ash::PaletteDelegate: |
|
James Cook
2016/08/16 22:08:45
ditto
jdufault
2016/08/16 22:45:52
Done.
|
| + void CreateNote() override; |
| + bool HasNoteApp() override; |
| + |
| + bool has_note_app_ = false; |
| + int create_note_count_ = 0; |
| + int has_note_app_count_ = 0; |
| + |
| + 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
|
| +}; |
|
James Cook
2016/08/16 22:08:45
Hooray for small simple test doubles!
jdufault
2016/08/16 22:45:52
:)
|
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_COMMON_TEST_TEST_PALETTE_DELEGATE_H_ |