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

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: Hooked up the Java layer Created 4 years, 6 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 3d4a7c0aea665325a069fb9b56ce9c21100bcd74..6c9ee278663b3f9ac247dab8315642a11f0fdbc3 100644
--- a/blimp/client/core/blimp_contents_impl_unittest.cc
+++ b/blimp/client/core/blimp_contents_impl_unittest.cc
@@ -4,9 +4,12 @@
#include "blimp/client/core/blimp_contents_impl.h"
+#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "blimp/client/core/blimp_contents_impl.h"
#include "blimp/client/core/public/blimp_contents_observer.h"
+#include "blimp/client/feature/mock_navigation_feature.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blimp {
@@ -31,6 +34,21 @@ class TestBlimpContentsObserver : public BlimpContentsObserver {
DISALLOW_COPY_AND_ASSIGN(TestBlimpContentsObserver);
};
+class TestBlimpNavigationControllerDelegate
+ : public BlimpNavigationControllerDelegate {
+ public:
+ TestBlimpNavigationControllerDelegate() = default;
+ ~TestBlimpNavigationControllerDelegate() override = default;
+
+ private:
+ void OnUrlChanged(const GURL& url) override {}
David Trainor- moved to gerrit 2016/06/29 17:27:15 // BlimpNavigationControllerDelegate implementatio
shaktisahu 2016/07/19 21:45:29 Done.
+ void OnFaviconChanged(const SkBitmap& favicon) override {}
+ void OnTitleChanged(const std::string& title) override {}
+ void OnLoadingChanged(bool loading) override {}
+ void OnPageLoadStatusUpdate(bool completed) override {}
+ DISALLOW_COPY_AND_ASSIGN(TestBlimpNavigationControllerDelegate);
David Trainor- moved to gerrit 2016/06/29 17:27:15 New line before this?
shaktisahu 2016/07/19 21:45:29 Done.
+};
+
TEST(BlimpContentsImplTest, Basic) {
base::MessageLoop loop;
BlimpContentsImpl blimp_contents;
@@ -43,6 +61,12 @@ TEST(BlimpContentsImplTest, Basic) {
TestBlimpContentsObserver observer2;
blimp_contents.AddObserver(&observer2);
+ BlimpNavigationControllerImpl* nav_controller_impl =
+ 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