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

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

Issue 2493693003: Mojo C++ bindings: switch services/navigation mojom target to use STL types. (Closed)
Patch Set: Created 4 years, 1 month 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/cpp/view.h » ('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 "mojo/public/cpp/bindings/binding.h" 9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "services/navigation/public/interfaces/view.mojom.h" 10 #include "services/navigation/public/interfaces/view.mojom.h"
(...skipping 26 matching lines...) Expand all
37 37
38 private: 38 private:
39 // mojom::ViewClient: 39 // mojom::ViewClient:
40 void OpenURL(mojom::OpenURLParamsPtr params) override {} 40 void OpenURL(mojom::OpenURLParamsPtr params) override {}
41 void LoadingStateChanged(bool is_loading) override { 41 void LoadingStateChanged(bool is_loading) override {
42 // Should see loading start, then stop. 42 // Should see loading start, then stop.
43 if (++load_count_ == 2 && loop_) 43 if (++load_count_ == 2 && loop_)
44 loop_->Quit(); 44 loop_->Quit();
45 } 45 }
46 void NavigationStateChanged(const GURL& url, 46 void NavigationStateChanged(const GURL& url,
47 const mojo::String& title, 47 const std::string& title,
48 bool can_go_back, 48 bool can_go_back,
49 bool can_go_forward) override {} 49 bool can_go_forward) override {}
50 void LoadProgressChanged(double progress) override {} 50 void LoadProgressChanged(double progress) override {}
51 void UpdateHoverURL(const GURL& url) override {} 51 void UpdateHoverURL(const GURL& url) override {}
52 void ViewCreated(mojom::ViewPtr, 52 void ViewCreated(mojom::ViewPtr,
53 mojom::ViewClientRequest, 53 mojom::ViewClientRequest,
54 bool, 54 bool,
55 const gfx::Rect&, 55 const gfx::Rect&,
56 bool) override {} 56 bool) override {}
57 void Close() override {} 57 void Close() override {}
(...skipping 21 matching lines...) Expand all
79 mojom::ViewPtr view; 79 mojom::ViewPtr view;
80 view_factory->CreateView(GetViewClient(), GetProxy(&view)); 80 view_factory->CreateView(GetViewClient(), GetProxy(&view));
81 view->NavigateTo(GURL("about:blank")); 81 view->NavigateTo(GURL("about:blank"));
82 82
83 base::RunLoop loop; 83 base::RunLoop loop;
84 QuitOnLoadingStateChange(&loop); 84 QuitOnLoadingStateChange(&loop);
85 loop.Run(); 85 loop.Run();
86 } 86 }
87 87
88 } // namespace navigation 88 } // namespace navigation
OLDNEW
« no previous file with comments | « mash/webtest/webtest.cc ('k') | services/navigation/public/cpp/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698