Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1996)

Unified Diff: blimp/client/core/blimp_contents_impl_unittest.cc

Issue 2058263002: Tied up BlimpNavigationController to NavigationFeature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blimp_core
Patch Set: Addressed code review comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698