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: extensions/browser/api/display_source/display_source_apitest.cc

Issue 1540563002: [chrome.displaySource] Add WiFi Display session class skeleton and mojo service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 11 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
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "content/public/test/test_utils.h" 6 #include "content/public/test/test_utils.h"
7 #include "extensions/browser/api/display_source/display_source_connection_delega te.h" 7 #include "extensions/browser/api/display_source/display_source_connection_delega te.h"
8 #include "extensions/browser/api/display_source/display_source_connection_delega te_factory.h" 8 #include "extensions/browser/api/display_source/display_source_connection_delega te_factory.h"
9 #include "extensions/shell/test/shell_apitest.h" 9 #include "extensions/shell/test/shell_apitest.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void RequestAuthentication(int sink_id, 44 void RequestAuthentication(int sink_id,
45 const AuthInfoCallback& auth_info_callback, 45 const AuthInfoCallback& auth_info_callback,
46 const FailureCallback& failure_callback) override { 46 const FailureCallback& failure_callback) override {
47 DisplaySourceAuthInfo info; 47 DisplaySourceAuthInfo info;
48 info.method = AUTHENTICATION_METHOD_PBC; 48 info.method = AUTHENTICATION_METHOD_PBC;
49 auth_info_callback.Run(info); 49 auth_info_callback.Run(info);
50 } 50 }
51 51
52 void Connect(int sink_id, 52 void Connect(int sink_id,
53 const DisplaySourceAuthInfo& auth_info, 53 const DisplaySourceAuthInfo& auth_info,
54 const base::Closure& connected_callback,
55 const FailureCallback& failure_callback) override {} 54 const FailureCallback& failure_callback) override {}
56 55
57 void Disconnect(const base::Closure& disconnected_callback, 56 void Disconnect(const FailureCallback& failure_callback) override {}
58 const FailureCallback& failure_callback) override {}
59 57
60 void StartWatchingSinks() override { 58 void StartWatchingAvailableSinks() override {
61 AddSink(CreateSinkInfoPtr(2, "sink 2", SINK_STATE_DISCONNECTED)); 59 AddSink(CreateSinkInfoPtr(2, "sink 2", SINK_STATE_DISCONNECTED));
62 } 60 }
63 61
64 void StopWatchingSinks() override {} 62 void StopWatchingAvailableSinks() override {}
65 63
66 private: 64 private:
67 void AddSink(DisplaySourceSinkInfoPtr sink) { 65 void AddSink(DisplaySourceSinkInfoPtr sink) {
68 sinks_.push_back(sink); 66 sinks_.push_back(sink);
69 FOR_EACH_OBSERVER(DisplaySourceConnectionDelegate::Observer, observers_, 67 FOR_EACH_OBSERVER(DisplaySourceConnectionDelegate::Observer, observers_,
70 OnSinksUpdated(sinks_)); 68 OnSinksUpdated(sinks_));
71 } 69 }
72 70
73 DisplaySourceSinkInfoList sinks_; 71 DisplaySourceSinkInfoList sinks_;
74 }; 72 };
(...skipping 15 matching lines...) Expand all
90 browser_context(), &CreateMockDelegate); 88 browser_context(), &CreateMockDelegate);
91 content::RunAllPendingInMessageLoop(); 89 content::RunAllPendingInMessageLoop();
92 } 90 }
93 }; 91 };
94 92
95 IN_PROC_BROWSER_TEST_F(DisplaySourceApiTest, DisplaySourceExtension) { 93 IN_PROC_BROWSER_TEST_F(DisplaySourceApiTest, DisplaySourceExtension) {
96 ASSERT_TRUE(RunAppTest("api_test/display_source/api")) << message_; 94 ASSERT_TRUE(RunAppTest("api_test/display_source/api")) << message_;
97 } 95 }
98 96
99 } // namespace extensions 97 } // namespace extensions
OLDNEW
« no previous file with comments | « build/config/features.gni ('k') | extensions/browser/api/display_source/display_source_connection_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698