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

Side by Side Diff: blimp/client/core/blimp_navigation_controller_impl_unittest.cc

Issue 2166563003: Split //blimp/client/core to relevant parts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-assignment-source
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "blimp/client/core/blimp_navigation_controller_impl.h"
6
7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h"
9 #include "blimp/client/core/blimp_navigation_controller_delegate.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace blimp {
13 namespace client {
14 namespace {
15
16 const GURL kExampleURL = GURL("https://www.example.com/");
17
18 class TestBlimpNavigationControllerDelegate
19 : public BlimpNavigationControllerDelegate {
20 public:
21 TestBlimpNavigationControllerDelegate() = default;
22 ~TestBlimpNavigationControllerDelegate() override = default;
23
24 void NotifyURLLoaded(const GURL& url) override { last_loaded_url_ = url; }
25
26 GURL GetLastLoadedURL() { return last_loaded_url_; }
27
28 private:
29 GURL last_loaded_url_;
30
31 DISALLOW_COPY_AND_ASSIGN(TestBlimpNavigationControllerDelegate);
32 };
33
34 TEST(BlimpNavigationControllerImplTest, Basic) {
35 base::MessageLoop loop;
36
37 TestBlimpNavigationControllerDelegate delegate;
38 BlimpNavigationControllerImpl navigation_controller(&delegate);
39
40 navigation_controller.LoadURL(kExampleURL);
41 EXPECT_EQ(kExampleURL, navigation_controller.GetURL());
42
43 loop.RunUntilIdle();
44 EXPECT_EQ(kExampleURL, delegate.GetLastLoadedURL());
45 }
46
47 } // namespace
48 } // namespace client
49 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/core/blimp_navigation_controller_impl.cc ('k') | blimp/client/core/contents/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698