Chromium Code Reviews| Index: blimp/client/core/blimp_client_context_impl_unittest.cc |
| diff --git a/blimp/client/core/blimp_client_context_impl_unittest.cc b/blimp/client/core/blimp_client_context_impl_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2b4204b107367409fffe07324c186b52238f8426 |
| --- /dev/null |
| +++ b/blimp/client/core/blimp_client_context_impl_unittest.cc |
| @@ -0,0 +1,30 @@ |
| +// 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. |
| + |
| +#include "blimp/client/core/blimp_client_context_impl.h" |
| + |
| +#include "blimp/client/public/blimp_client_context_delegate.h" |
| +#include "blimp/client/public/blimp_contents.h" |
| +#include "blimp/client/test/test_blimp_client_context_delegate.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace blimp { |
| +namespace client { |
| +namespace { |
| + |
| +TEST(BlimpClientContextImpl, CreatedBlimpContentsGetsHelpersAttached) { |
| + BlimpClientContextImpl blimp_client_context; |
| + TestBlimpClientContextDelegate delegate; |
| + blimp_client_context.SetDelegate(&delegate); |
| + |
| + std::unique_ptr<BlimpContents> blimp_contents = |
| + blimp_client_context.CreateBlimpContents(); |
| + DCHECK(blimp_contents); |
| + DCHECK_EQ(blimp_contents.get(), |
| + delegate.GetBlimpContentsWithLastAttachedHelpers()); |
|
David Trainor- moved to gerrit
2016/07/14 19:07:13
Should we use gmock for this?
nyquist
2016/07/14 22:56:50
I would love to! I'm not sure it's possible though
|
| +} |
| + |
| +} // namespace |
| +} // namespace client |
| +} // namespace blimp |