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

Side by Side Diff: services/navigation/navigation_unittest.cc

Issue 2055553002: Send Navigation notifications to clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 unified diff | Download patch
« no previous file with comments | « mash/webtest/webtest.cc ('k') | services/navigation/public/interfaces/view.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "services/navigation/public/interfaces/view.mojom.h" 9 #include "services/navigation/public/interfaces/view.mojom.h"
10 #include "services/shell/public/cpp/shell_client.h" 10 #include "services/shell/public/cpp/shell_client.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool can_go_back, 46 bool can_go_back,
47 bool can_go_forward) override {} 47 bool can_go_forward) override {}
48 void LoadProgressChanged(double progress) override {} 48 void LoadProgressChanged(double progress) override {}
49 void UpdateHoverURL(const GURL& url) override {} 49 void UpdateHoverURL(const GURL& url) override {}
50 void ViewCreated(mojom::ViewPtr, 50 void ViewCreated(mojom::ViewPtr,
51 mojom::ViewClientRequest, 51 mojom::ViewClientRequest,
52 bool, 52 bool,
53 const gfx::Rect&, 53 const gfx::Rect&,
54 bool) override {} 54 bool) override {}
55 void Close() override {} 55 void Close() override {}
56 void NavigationPending(mojom::NavigationEntryPtr entry) override {}
57 void NavigationCommitted(
58 mojom::NavigationCommittedDetailsPtr details,
59 int current_index) override {}
60 void NavigationEntryChanged(mojom::NavigationEntryPtr entry,
61 int entry_index) override {}
62 void NavigationListPruned(bool from_front, int count) override {}
56 63
57 int load_count_ = 0; 64 int load_count_ = 0;
58 mojo::Binding<mojom::ViewClient> binding_; 65 mojo::Binding<mojom::ViewClient> binding_;
59 base::RunLoop* loop_ = nullptr; 66 base::RunLoop* loop_ = nullptr;
60 std::unique_ptr<shell::Connection> window_manager_connection_; 67 std::unique_ptr<shell::Connection> window_manager_connection_;
61 68
62 DISALLOW_COPY_AND_ASSIGN(NavigationTest); 69 DISALLOW_COPY_AND_ASSIGN(NavigationTest);
63 }; 70 };
64 71
65 TEST_F(NavigationTest, Navigate) { 72 TEST_F(NavigationTest, Navigate) {
66 mojom::ViewFactoryPtr view_factory; 73 mojom::ViewFactoryPtr view_factory;
67 connector()->ConnectToInterface("exe:navigation", &view_factory); 74 connector()->ConnectToInterface("exe:navigation", &view_factory);
68 75
69 mojom::ViewPtr view; 76 mojom::ViewPtr view;
70 view_factory->CreateView(GetViewClient(), GetProxy(&view)); 77 view_factory->CreateView(GetViewClient(), GetProxy(&view));
71 view->NavigateTo(GURL("about:blank")); 78 view->NavigateTo(GURL("about:blank"));
72 79
73 base::RunLoop loop; 80 base::RunLoop loop;
74 QuitOnLoadingStateChange(&loop); 81 QuitOnLoadingStateChange(&loop);
75 loop.Run(); 82 loop.Run();
76 } 83 }
77 84
78 } // namespace navigation 85 } // namespace navigation
OLDNEW
« no previous file with comments | « mash/webtest/webtest.cc ('k') | services/navigation/public/interfaces/view.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698