Chromium Code Reviews| Index: blimp/client/core/blimp_contents_impl_unittest.cc |
| diff --git a/blimp/client/core/blimp_contents_impl_unittest.cc b/blimp/client/core/blimp_contents_impl_unittest.cc |
| index 0c9f846260ef56c19fc513c7ed7a32009d5b5626..43e4aac5b1d0afeb61708d9f966f202d0b2775de 100644 |
| --- a/blimp/client/core/blimp_contents_impl_unittest.cc |
| +++ b/blimp/client/core/blimp_contents_impl_unittest.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/message_loop/message_loop.h" |
| #include "blimp/client/core/blimp_contents_impl.h" |
| +#include "blimp/client/feature/mock_navigation_feature.h" |
| #include "blimp/client/public/blimp_contents_observer.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| @@ -31,6 +32,18 @@ class TestBlimpContentsObserver : public BlimpContentsObserver { |
| DISALLOW_COPY_AND_ASSIGN(TestBlimpContentsObserver); |
| }; |
| +class TestBlimpNavigationControllerDelegate |
| + : public BlimpNavigationControllerDelegate { |
| + public: |
| + TestBlimpNavigationControllerDelegate() = default; |
| + ~TestBlimpNavigationControllerDelegate() override = default; |
| + |
| + private: |
| + void OnNavigationStateChanged() override{}; |
|
David Trainor- moved to gerrit
2016/07/25 15:57:31
space after override
shaktisahu
2016/07/26 01:25:27
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(TestBlimpNavigationControllerDelegate); |
| +}; |
| + |
| TEST(BlimpContentsImplTest, Basic) { |
| base::MessageLoop loop; |
| BlimpContentsImpl blimp_contents; |
| @@ -43,6 +56,12 @@ TEST(BlimpContentsImplTest, Basic) { |
| TestBlimpContentsObserver observer2; |
| blimp_contents.AddObserver(&observer2); |
| + BlimpNavigationControllerImpl* nav_controller_impl = |
|
David Trainor- moved to gerrit
2016/07/25 15:57:31
Can we just convert it to an impl when we query it
shaktisahu
2016/07/26 01:25:27
Done.
|
| + static_cast<BlimpNavigationControllerImpl*>(&navigation_controller); |
| + MockNavigationFeature feature; |
| + feature.SetDelegate(1, nav_controller_impl); |
| + nav_controller_impl->SetNavigationFeatureForTesting(&feature); |
| + |
| navigation_controller.LoadURL(kExampleURL); |
| loop.RunUntilIdle(); |