Merge lp:~alan-griffiths/mir/fix-1276704 into lp:mir
- fix-1276704
- Merge into development-branch
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Daniel van Vugt | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1381 | ||||
Proposed branch: | lp:~alan-griffiths/mir/fix-1276704 | ||||
Merge into: | lp:mir | ||||
Diff against target: |
903 lines (+194/-91) 24 files modified
examples/demo-inprocess-surface-client/inprocess_egl_client.cpp (+4/-2) include/server/mir/frontend/shell.h (+8/-2) include/server/mir/shell/session.h (+6/-5) include/test/mir_test_doubles/mock_shell.h (+6/-3) include/test/mir_test_doubles/mock_shell_session.h (+2/-1) include/test/mir_test_doubles/stub_ipc_factory.h (+2/-2) include/test/mir_test_doubles/stub_shell.h (+1/-1) include/test/mir_test_doubles/stub_shell_session.h (+6/-1) src/server/frontend/default_configuration.cpp (+5/-2) src/server/frontend/protobuf_ipc_factory.h (+7/-2) src/server/frontend/protobuf_session_creator.cpp (+2/-2) src/server/frontend/session_mediator.cpp (+4/-2) src/server/frontend/session_mediator.h (+3/-1) src/server/scene/application_session.cpp (+8/-1) src/server/scene/application_session.h (+4/-1) src/server/scene/session_manager.cpp (+6/-4) src/server/scene/session_manager.h (+5/-2) tests/integration-tests/test_session.cpp (+2/-1) tests/integration-tests/test_session_manager.cpp (+6/-6) tests/unit-tests/frontend/test_session_mediator.cpp (+5/-5) tests/unit-tests/frontend/test_session_mediator_android.cpp (+1/-1) tests/unit-tests/frontend/test_session_mediator_mesa.cpp (+2/-2) tests/unit-tests/scene/test_application_session.cpp (+91/-34) tests/unit-tests/scene/test_session_manager.cpp (+8/-8) |
||||
To merge this branch: | bzr merge lp:~alan-griffiths/mir/fix-1276704 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gerry Boland (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+205357@code.launchpad.net |
Commit message
frontend, shell: provide the client process ID in the shell::Session interface (LP: #1276704)
Description of the change
frontend, shell: provide the client process ID in the shell::Session interface
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1382
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Gerry Boland (gerboland) wrote : | # |
Gives me what I need, thanks!
Daniel van Vugt (vanvugt) wrote : | # |
I haven't reviewed it, but it seems we're desperate to push this to archive, so top-approving.
Preview Diff
1 | === modified file 'examples/demo-inprocess-surface-client/inprocess_egl_client.cpp' | |||
2 | --- examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2014-01-13 06:12:33 +0000 | |||
3 | +++ examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2014-02-07 14:29:43 +0000 | |||
4 | @@ -1,5 +1,5 @@ | |||
5 | 1 | /* | 1 | /* |
7 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013-2014 Canonical Ltd. |
8 | 3 | * | 3 | * |
9 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
10 | 5 | * it under the terms of the GNU General Public License version 3 as | 5 | * it under the terms of the GNU General Public License version 3 as |
11 | @@ -41,6 +41,8 @@ | |||
12 | 41 | 41 | ||
13 | 42 | #include <xkbcommon/xkbcommon-keysyms.h> | 42 | #include <xkbcommon/xkbcommon-keysyms.h> |
14 | 43 | 43 | ||
15 | 44 | #include <unistd.h> | ||
16 | 45 | |||
17 | 44 | #include <functional> | 46 | #include <functional> |
18 | 45 | 47 | ||
19 | 46 | #include <assert.h> | 48 | #include <assert.h> |
20 | @@ -93,7 +95,7 @@ | |||
21 | 93 | .of_size(surface_size) | 95 | .of_size(surface_size) |
22 | 94 | .of_buffer_usage(mg::BufferUsage::hardware) | 96 | .of_buffer_usage(mg::BufferUsage::hardware) |
23 | 95 | .of_pixel_format(mir_pixel_format_argb_8888); | 97 | .of_pixel_format(mir_pixel_format_argb_8888); |
25 | 96 | auto session = shell->open_session("Inprocess client", std::make_shared<NullEventSink>()); | 98 | auto session = shell->open_session(getpid(), "Inprocess client", std::make_shared<NullEventSink>()); |
26 | 97 | // TODO: Why do we get an ID? ~racarr | 99 | // TODO: Why do we get an ID? ~racarr |
27 | 98 | auto surface = session->get_surface(shell->create_surface_for(session, params)); | 100 | auto surface = session->get_surface(shell->create_surface_for(session, params)); |
28 | 99 | 101 | ||
29 | 100 | 102 | ||
30 | === modified file 'include/server/mir/frontend/shell.h' | |||
31 | --- include/server/mir/frontend/shell.h 2014-01-13 06:12:33 +0000 | |||
32 | +++ include/server/mir/frontend/shell.h 2014-02-07 14:29:43 +0000 | |||
33 | @@ -1,5 +1,5 @@ | |||
34 | 1 | /* | 1 | /* |
36 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
37 | 3 | * | 3 | * |
38 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
39 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
40 | @@ -20,6 +20,9 @@ | |||
41 | 20 | #define MIR_FRONTEND_SHELL_H_ | 20 | #define MIR_FRONTEND_SHELL_H_ |
42 | 21 | 21 | ||
43 | 22 | #include "mir/frontend/surface_id.h" | 22 | #include "mir/frontend/surface_id.h" |
44 | 23 | |||
45 | 24 | #include <sys/types.h> | ||
46 | 25 | |||
47 | 23 | #include <memory> | 26 | #include <memory> |
48 | 24 | 27 | ||
49 | 25 | namespace mir | 28 | namespace mir |
50 | @@ -39,7 +42,10 @@ | |||
51 | 39 | virtual ~Shell() = default; | 42 | virtual ~Shell() = default; |
52 | 40 | 43 | ||
53 | 41 | virtual std::shared_ptr<Session> open_session( | 44 | virtual std::shared_ptr<Session> open_session( |
55 | 42 | std::string const& name, std::shared_ptr<EventSink> const& sink) = 0; | 45 | pid_t client_pid, |
56 | 46 | std::string const& name, | ||
57 | 47 | std::shared_ptr<EventSink> const& sink) = 0; | ||
58 | 48 | |||
59 | 43 | virtual void close_session(std::shared_ptr<Session> const& session) = 0; | 49 | virtual void close_session(std::shared_ptr<Session> const& session) = 0; |
60 | 44 | 50 | ||
61 | 45 | virtual SurfaceId create_surface_for(std::shared_ptr<Session> const& session, | 51 | virtual SurfaceId create_surface_for(std::shared_ptr<Session> const& session, |
62 | 46 | 52 | ||
63 | === modified file 'include/server/mir/shell/session.h' | |||
64 | --- include/server/mir/shell/session.h 2014-01-13 06:12:33 +0000 | |||
65 | +++ include/server/mir/shell/session.h 2014-02-07 14:29:43 +0000 | |||
66 | @@ -1,5 +1,5 @@ | |||
67 | 1 | /* | 1 | /* |
69 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
70 | 3 | * | 3 | * |
71 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
72 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
73 | @@ -7,11 +7,11 @@ | |||
74 | 7 | * | 7 | * |
75 | 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
76 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
78 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
79 | 11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
80 | 12 | * | 12 | * |
81 | 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
83 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
84 | 15 | * | 15 | * |
85 | 16 | * Authored By: Robert Carr <racarr@canonical.com> | 16 | * Authored By: Robert Carr <racarr@canonical.com> |
86 | 17 | */ | 17 | */ |
87 | @@ -22,9 +22,10 @@ | |||
88 | 22 | #include "mir/frontend/session.h" | 22 | #include "mir/frontend/session.h" |
89 | 23 | #include "mir/shell/snapshot.h" | 23 | #include "mir/shell/snapshot.h" |
90 | 24 | 24 | ||
91 | 25 | #include <sys/types.h> | ||
92 | 26 | |||
93 | 25 | namespace mir | 27 | namespace mir |
94 | 26 | { | 28 | { |
95 | 27 | |||
96 | 28 | namespace shell | 29 | namespace shell |
97 | 29 | { | 30 | { |
98 | 30 | class Surface; | 31 | class Surface; |
99 | @@ -34,12 +35,12 @@ | |||
100 | 34 | public: | 35 | public: |
101 | 35 | virtual std::string name() const = 0; | 36 | virtual std::string name() const = 0; |
102 | 36 | virtual void force_requests_to_complete() = 0; | 37 | virtual void force_requests_to_complete() = 0; |
103 | 38 | virtual pid_t process_id() const = 0; | ||
104 | 37 | 39 | ||
105 | 38 | virtual void take_snapshot(SnapshotCallback const& snapshot_taken) = 0; | 40 | virtual void take_snapshot(SnapshotCallback const& snapshot_taken) = 0; |
106 | 39 | virtual std::shared_ptr<Surface> default_surface() const = 0; | 41 | virtual std::shared_ptr<Surface> default_surface() const = 0; |
107 | 40 | virtual void set_lifecycle_state(MirLifecycleState state) = 0; | 42 | virtual void set_lifecycle_state(MirLifecycleState state) = 0; |
108 | 41 | }; | 43 | }; |
109 | 42 | |||
110 | 43 | } | 44 | } |
111 | 44 | } | 45 | } |
112 | 45 | 46 | ||
113 | 46 | 47 | ||
114 | === modified file 'include/test/mir_test_doubles/mock_shell.h' | |||
115 | --- include/test/mir_test_doubles/mock_shell.h 2013-08-28 03:41:48 +0000 | |||
116 | +++ include/test/mir_test_doubles/mock_shell.h 2014-02-07 14:29:43 +0000 | |||
117 | @@ -1,5 +1,5 @@ | |||
118 | 1 | /* | 1 | /* |
120 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013-2014 Canonical Ltd. |
121 | 3 | * | 3 | * |
122 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
123 | 5 | * it under the terms of the GNU General Public License version 3 as | 5 | * it under the terms of the GNU General Public License version 3 as |
124 | @@ -34,8 +34,11 @@ | |||
125 | 34 | 34 | ||
126 | 35 | struct MockShell : public frontend::Shell | 35 | struct MockShell : public frontend::Shell |
127 | 36 | { | 36 | { |
130 | 37 | MOCK_METHOD2(open_session, std::shared_ptr<frontend::Session>( | 37 | MOCK_METHOD3(open_session, std::shared_ptr<frontend::Session>( |
131 | 38 | std::string const&, std::shared_ptr<frontend::EventSink> const&)); | 38 | pid_t client_pid, |
132 | 39 | std::string const&, | ||
133 | 40 | std::shared_ptr<frontend::EventSink> const&)); | ||
134 | 41 | |||
135 | 39 | MOCK_METHOD1(close_session, void(std::shared_ptr<frontend::Session> const&)); | 42 | MOCK_METHOD1(close_session, void(std::shared_ptr<frontend::Session> const&)); |
136 | 40 | 43 | ||
137 | 41 | MOCK_METHOD2(create_surface_for, frontend::SurfaceId(std::shared_ptr<frontend::Session> const&, shell::SurfaceCreationParameters const&)); | 44 | MOCK_METHOD2(create_surface_for, frontend::SurfaceId(std::shared_ptr<frontend::Session> const&, shell::SurfaceCreationParameters const&)); |
138 | 42 | 45 | ||
139 | === modified file 'include/test/mir_test_doubles/mock_shell_session.h' | |||
140 | --- include/test/mir_test_doubles/mock_shell_session.h 2014-01-13 06:12:33 +0000 | |||
141 | +++ include/test/mir_test_doubles/mock_shell_session.h 2014-02-07 14:29:43 +0000 | |||
142 | @@ -1,5 +1,5 @@ | |||
143 | 1 | /* | 1 | /* |
145 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013-2014 Canonical Ltd. |
146 | 3 | * | 3 | * |
147 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
148 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
149 | @@ -42,6 +42,7 @@ | |||
150 | 42 | MOCK_CONST_METHOD0(default_surface, std::shared_ptr<shell::Surface>()); | 42 | MOCK_CONST_METHOD0(default_surface, std::shared_ptr<shell::Surface>()); |
151 | 43 | 43 | ||
152 | 44 | MOCK_CONST_METHOD0(name, std::string()); | 44 | MOCK_CONST_METHOD0(name, std::string()); |
153 | 45 | MOCK_CONST_METHOD0(process_id, pid_t()); | ||
154 | 45 | MOCK_METHOD0(force_requests_to_complete, void()); | 46 | MOCK_METHOD0(force_requests_to_complete, void()); |
155 | 46 | 47 | ||
156 | 47 | MOCK_METHOD0(hide, void()); | 48 | MOCK_METHOD0(hide, void()); |
157 | 48 | 49 | ||
158 | === modified file 'include/test/mir_test_doubles/stub_ipc_factory.h' | |||
159 | --- include/test/mir_test_doubles/stub_ipc_factory.h 2014-01-21 06:27:40 +0000 | |||
160 | +++ include/test/mir_test_doubles/stub_ipc_factory.h 2014-02-07 14:29:43 +0000 | |||
161 | @@ -1,5 +1,5 @@ | |||
162 | 1 | /* | 1 | /* |
164 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
165 | 3 | * | 3 | * |
166 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
167 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
168 | @@ -41,7 +41,7 @@ | |||
169 | 41 | } | 41 | } |
170 | 42 | 42 | ||
171 | 43 | std::shared_ptr<protobuf::DisplayServer> make_ipc_server( | 43 | std::shared_ptr<protobuf::DisplayServer> make_ipc_server( |
173 | 44 | std::shared_ptr<frontend::EventSink> const&, bool) override | 44 | pid_t, std::shared_ptr<frontend::EventSink> const&, bool) override |
174 | 45 | { | 45 | { |
175 | 46 | return server; | 46 | return server; |
176 | 47 | } | 47 | } |
177 | 48 | 48 | ||
178 | === modified file 'include/test/mir_test_doubles/stub_shell.h' | |||
179 | --- include/test/mir_test_doubles/stub_shell.h 2013-08-28 03:41:48 +0000 | |||
180 | +++ include/test/mir_test_doubles/stub_shell.h 2014-02-07 14:29:43 +0000 | |||
181 | @@ -34,7 +34,7 @@ | |||
182 | 34 | StubShell() : stub_session(std::make_shared<StubSession>()) | 34 | StubShell() : stub_session(std::make_shared<StubSession>()) |
183 | 35 | { | 35 | { |
184 | 36 | } | 36 | } |
186 | 37 | std::shared_ptr<frontend::Session> open_session(std::string const& /* name */, std::shared_ptr<frontend::EventSink> const& /* sink */) override | 37 | std::shared_ptr<frontend::Session> open_session(pid_t, std::string const& /* name */, std::shared_ptr<frontend::EventSink> const& /* sink */) override |
187 | 38 | { | 38 | { |
188 | 39 | return stub_session; | 39 | return stub_session; |
189 | 40 | } | 40 | } |
190 | 41 | 41 | ||
191 | === modified file 'include/test/mir_test_doubles/stub_shell_session.h' | |||
192 | --- include/test/mir_test_doubles/stub_shell_session.h 2014-01-13 06:12:33 +0000 | |||
193 | +++ include/test/mir_test_doubles/stub_shell_session.h 2014-02-07 14:29:43 +0000 | |||
194 | @@ -1,5 +1,5 @@ | |||
195 | 1 | /* | 1 | /* |
197 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013-2014 Canonical Ltd. |
198 | 3 | * | 3 | * |
199 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
200 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
201 | @@ -45,6 +45,11 @@ | |||
202 | 45 | { | 45 | { |
203 | 46 | return std::string(); | 46 | return std::string(); |
204 | 47 | } | 47 | } |
205 | 48 | pid_t process_id() const override | ||
206 | 49 | { | ||
207 | 50 | return -1; | ||
208 | 51 | } | ||
209 | 52 | |||
210 | 48 | void force_requests_to_complete() override | 53 | void force_requests_to_complete() override |
211 | 49 | { | 54 | { |
212 | 50 | } | 55 | } |
213 | 51 | 56 | ||
214 | === modified file 'src/server/frontend/default_configuration.cpp' | |||
215 | --- src/server/frontend/default_configuration.cpp 2014-01-30 13:27:59 +0000 | |||
216 | +++ src/server/frontend/default_configuration.cpp 2014-02-07 14:29:43 +0000 | |||
217 | @@ -1,5 +1,5 @@ | |||
218 | 1 | /* | 1 | /* |
220 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
221 | 3 | * | 3 | * |
222 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
223 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
224 | @@ -64,7 +64,9 @@ | |||
225 | 64 | std::shared_ptr<mf::Screencast> const screencast; | 64 | std::shared_ptr<mf::Screencast> const screencast; |
226 | 65 | 65 | ||
227 | 66 | virtual std::shared_ptr<mir::protobuf::DisplayServer> make_ipc_server( | 66 | virtual std::shared_ptr<mir::protobuf::DisplayServer> make_ipc_server( |
229 | 67 | std::shared_ptr<mf::EventSink> const& sink, bool authorized_to_resize_display) | 67 | pid_t client_pid, |
230 | 68 | std::shared_ptr<mf::EventSink> const& sink, | ||
231 | 69 | bool authorized_to_resize_display) override | ||
232 | 68 | { | 70 | { |
233 | 69 | std::shared_ptr<mf::DisplayChanger> changer; | 71 | std::shared_ptr<mf::DisplayChanger> changer; |
234 | 70 | if(authorized_to_resize_display) | 72 | if(authorized_to_resize_display) |
235 | @@ -77,6 +79,7 @@ | |||
236 | 77 | } | 79 | } |
237 | 78 | 80 | ||
238 | 79 | return std::make_shared<mf::SessionMediator>( | 81 | return std::make_shared<mf::SessionMediator>( |
239 | 82 | client_pid, | ||
240 | 80 | shell, | 83 | shell, |
241 | 81 | graphics_platform, | 84 | graphics_platform, |
242 | 82 | changer, | 85 | changer, |
243 | 83 | 86 | ||
244 | === modified file 'src/server/frontend/protobuf_ipc_factory.h' | |||
245 | --- src/server/frontend/protobuf_ipc_factory.h 2014-01-21 06:27:40 +0000 | |||
246 | +++ src/server/frontend/protobuf_ipc_factory.h 2014-02-07 14:29:43 +0000 | |||
247 | @@ -1,5 +1,5 @@ | |||
248 | 1 | /* | 1 | /* |
250 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
251 | 3 | * | 3 | * |
252 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
253 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
254 | @@ -19,6 +19,8 @@ | |||
255 | 19 | #ifndef MIR_FRONTEND_PROTOBUF_IPC_FACTORY_H_ | 19 | #ifndef MIR_FRONTEND_PROTOBUF_IPC_FACTORY_H_ |
256 | 20 | #define MIR_FRONTEND_PROTOBUF_IPC_FACTORY_H_ | 20 | #define MIR_FRONTEND_PROTOBUF_IPC_FACTORY_H_ |
257 | 21 | 21 | ||
258 | 22 | #include <sys/types.h> | ||
259 | 23 | |||
260 | 22 | #include <memory> | 24 | #include <memory> |
261 | 23 | 25 | ||
262 | 24 | namespace mir | 26 | namespace mir |
263 | @@ -37,7 +39,10 @@ | |||
264 | 37 | { | 39 | { |
265 | 38 | public: | 40 | public: |
266 | 39 | virtual std::shared_ptr<protobuf::DisplayServer> make_ipc_server( | 41 | virtual std::shared_ptr<protobuf::DisplayServer> make_ipc_server( |
268 | 40 | std::shared_ptr<EventSink> const& sink, bool authorized_to_resize_display) = 0; | 42 | pid_t client_pid, |
269 | 43 | std::shared_ptr<EventSink> const& sink, | ||
270 | 44 | bool authorized_to_resize_display) = 0; | ||
271 | 45 | |||
272 | 41 | virtual std::shared_ptr<ResourceCache> resource_cache() = 0; | 46 | virtual std::shared_ptr<ResourceCache> resource_cache() = 0; |
273 | 42 | 47 | ||
274 | 43 | protected: | 48 | protected: |
275 | 44 | 49 | ||
276 | === modified file 'src/server/frontend/protobuf_session_creator.cpp' | |||
277 | --- src/server/frontend/protobuf_session_creator.cpp 2014-01-22 15:54:11 +0000 | |||
278 | +++ src/server/frontend/protobuf_session_creator.cpp 2014-02-07 14:29:43 +0000 | |||
279 | @@ -1,5 +1,5 @@ | |||
280 | 1 | /* | 1 | /* |
282 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013-2014 Canonical Ltd. |
283 | 3 | * | 3 | * |
284 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
285 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
286 | @@ -69,7 +69,7 @@ | |||
287 | 69 | auto const event_sink = std::make_shared<detail::EventSender>(messenger); | 69 | auto const event_sink = std::make_shared<detail::EventSender>(messenger); |
288 | 70 | auto const msg_processor = create_processor( | 70 | auto const msg_processor = create_processor( |
289 | 71 | message_sender, | 71 | message_sender, |
291 | 72 | ipc_factory->make_ipc_server(event_sink, authorized_to_resize_display), | 72 | ipc_factory->make_ipc_server(client_pid, event_sink, authorized_to_resize_display), |
292 | 73 | report); | 73 | report); |
293 | 74 | 74 | ||
294 | 75 | const auto& session = std::make_shared<mfd::SocketSession>(messenger, next_id(), connected_sessions, msg_processor); | 75 | const auto& session = std::make_shared<mfd::SocketSession>(messenger, next_id(), connected_sessions, msg_processor); |
295 | 76 | 76 | ||
296 | === modified file 'src/server/frontend/session_mediator.cpp' | |||
297 | --- src/server/frontend/session_mediator.cpp 2014-02-06 09:51:46 +0000 | |||
298 | +++ src/server/frontend/session_mediator.cpp 2014-02-07 14:29:43 +0000 | |||
299 | @@ -1,5 +1,5 @@ | |||
300 | 1 | /* | 1 | /* |
302 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
303 | 3 | * | 3 | * |
304 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
305 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
306 | @@ -56,6 +56,7 @@ | |||
307 | 56 | namespace geom = mir::geometry; | 56 | namespace geom = mir::geometry; |
308 | 57 | 57 | ||
309 | 58 | mf::SessionMediator::SessionMediator( | 58 | mf::SessionMediator::SessionMediator( |
310 | 59 | pid_t client_pid, | ||
311 | 59 | std::shared_ptr<frontend::Shell> const& shell, | 60 | std::shared_ptr<frontend::Shell> const& shell, |
312 | 60 | std::shared_ptr<graphics::Platform> const & graphics_platform, | 61 | std::shared_ptr<graphics::Platform> const & graphics_platform, |
313 | 61 | std::shared_ptr<mf::DisplayChanger> const& display_changer, | 62 | std::shared_ptr<mf::DisplayChanger> const& display_changer, |
314 | @@ -64,6 +65,7 @@ | |||
315 | 64 | std::shared_ptr<EventSink> const& sender, | 65 | std::shared_ptr<EventSink> const& sender, |
316 | 65 | std::shared_ptr<ResourceCache> const& resource_cache, | 66 | std::shared_ptr<ResourceCache> const& resource_cache, |
317 | 66 | std::shared_ptr<Screencast> const& screencast) : | 67 | std::shared_ptr<Screencast> const& screencast) : |
318 | 68 | client_pid(client_pid), | ||
319 | 67 | shell(shell), | 69 | shell(shell), |
320 | 68 | graphics_platform(graphics_platform), | 70 | graphics_platform(graphics_platform), |
321 | 69 | surface_pixel_formats(surface_pixel_formats), | 71 | surface_pixel_formats(surface_pixel_formats), |
322 | @@ -95,7 +97,7 @@ | |||
323 | 95 | 97 | ||
324 | 96 | { | 98 | { |
325 | 97 | std::unique_lock<std::mutex> lock(session_mutex); | 99 | std::unique_lock<std::mutex> lock(session_mutex); |
327 | 98 | weak_session = shell->open_session(request->application_name(), event_sink); | 100 | weak_session = shell->open_session(client_pid, request->application_name(), event_sink); |
328 | 99 | } | 101 | } |
329 | 100 | 102 | ||
330 | 101 | auto ipc_package = graphics_platform->get_ipc_package(); | 103 | auto ipc_package = graphics_platform->get_ipc_package(); |
331 | 102 | 104 | ||
332 | === modified file 'src/server/frontend/session_mediator.h' | |||
333 | --- src/server/frontend/session_mediator.h 2014-02-06 09:51:46 +0000 | |||
334 | +++ src/server/frontend/session_mediator.h 2014-02-07 14:29:43 +0000 | |||
335 | @@ -1,5 +1,5 @@ | |||
336 | 1 | /* | 1 | /* |
338 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
339 | 3 | * | 3 | * |
340 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
341 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
342 | @@ -60,6 +60,7 @@ | |||
343 | 60 | { | 60 | { |
344 | 61 | public: | 61 | public: |
345 | 62 | SessionMediator( | 62 | SessionMediator( |
346 | 63 | pid_t client_pid, | ||
347 | 63 | std::shared_ptr<Shell> const& shell, | 64 | std::shared_ptr<Shell> const& shell, |
348 | 64 | std::shared_ptr<graphics::Platform> const& graphics_platform, | 65 | std::shared_ptr<graphics::Platform> const& graphics_platform, |
349 | 65 | std::shared_ptr<frontend::DisplayChanger> const& display_changer, | 66 | std::shared_ptr<frontend::DisplayChanger> const& display_changer, |
350 | @@ -135,6 +136,7 @@ | |||
351 | 135 | bool need_full_ipc); | 136 | bool need_full_ipc); |
352 | 136 | 137 | ||
353 | 137 | void advance_buffer(SurfaceId surf_id, Surface& surface, std::function<void(graphics::Buffer*, bool)> complete); | 138 | void advance_buffer(SurfaceId surf_id, Surface& surface, std::function<void(graphics::Buffer*, bool)> complete); |
354 | 139 | pid_t client_pid; | ||
355 | 138 | std::shared_ptr<Shell> const shell; | 140 | std::shared_ptr<Shell> const shell; |
356 | 139 | std::shared_ptr<graphics::Platform> const graphics_platform; | 141 | std::shared_ptr<graphics::Platform> const graphics_platform; |
357 | 140 | 142 | ||
358 | 141 | 143 | ||
359 | === modified file 'src/server/scene/application_session.cpp' | |||
360 | --- src/server/scene/application_session.cpp 2014-01-13 06:12:33 +0000 | |||
361 | +++ src/server/scene/application_session.cpp 2014-02-07 14:29:43 +0000 | |||
362 | @@ -1,5 +1,5 @@ | |||
363 | 1 | /* | 1 | /* |
365 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
366 | 3 | * | 3 | * |
367 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
368 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
369 | @@ -37,11 +37,13 @@ | |||
370 | 37 | 37 | ||
371 | 38 | ms::ApplicationSession::ApplicationSession( | 38 | ms::ApplicationSession::ApplicationSession( |
372 | 39 | std::shared_ptr<msh::SurfaceFactory> const& surface_factory, | 39 | std::shared_ptr<msh::SurfaceFactory> const& surface_factory, |
373 | 40 | pid_t pid, | ||
374 | 40 | std::string const& session_name, | 41 | std::string const& session_name, |
375 | 41 | std::shared_ptr<SnapshotStrategy> const& snapshot_strategy, | 42 | std::shared_ptr<SnapshotStrategy> const& snapshot_strategy, |
376 | 42 | std::shared_ptr<msh::SessionListener> const& session_listener, | 43 | std::shared_ptr<msh::SessionListener> const& session_listener, |
377 | 43 | std::shared_ptr<mf::EventSink> const& sink) : | 44 | std::shared_ptr<mf::EventSink> const& sink) : |
378 | 44 | surface_factory(surface_factory), | 45 | surface_factory(surface_factory), |
379 | 46 | pid(pid), | ||
380 | 45 | session_name(session_name), | 47 | session_name(session_name), |
381 | 46 | snapshot_strategy(snapshot_strategy), | 48 | snapshot_strategy(snapshot_strategy), |
382 | 47 | session_listener(session_listener), | 49 | session_listener(session_listener), |
383 | @@ -125,6 +127,11 @@ | |||
384 | 125 | return session_name; | 127 | return session_name; |
385 | 126 | } | 128 | } |
386 | 127 | 129 | ||
387 | 130 | pid_t ms::ApplicationSession::process_id() const | ||
388 | 131 | { | ||
389 | 132 | return pid; | ||
390 | 133 | } | ||
391 | 134 | |||
392 | 128 | void ms::ApplicationSession::force_requests_to_complete() | 135 | void ms::ApplicationSession::force_requests_to_complete() |
393 | 129 | { | 136 | { |
394 | 130 | std::unique_lock<std::mutex> lock(surfaces_mutex); | 137 | std::unique_lock<std::mutex> lock(surfaces_mutex); |
395 | 131 | 138 | ||
396 | === modified file 'src/server/scene/application_session.h' | |||
397 | --- src/server/scene/application_session.h 2014-01-13 06:12:33 +0000 | |||
398 | +++ src/server/scene/application_session.h 2014-02-07 14:29:43 +0000 | |||
399 | @@ -1,5 +1,5 @@ | |||
400 | 1 | /* | 1 | /* |
402 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013-2014 Canonical Ltd. |
403 | 3 | * | 3 | * |
404 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
405 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
406 | @@ -45,6 +45,7 @@ | |||
407 | 45 | public: | 45 | public: |
408 | 46 | ApplicationSession( | 46 | ApplicationSession( |
409 | 47 | std::shared_ptr<shell::SurfaceFactory> const& surface_factory, | 47 | std::shared_ptr<shell::SurfaceFactory> const& surface_factory, |
410 | 48 | pid_t pid, | ||
411 | 48 | std::string const& session_name, | 49 | std::string const& session_name, |
412 | 49 | std::shared_ptr<SnapshotStrategy> const& snapshot_strategy, | 50 | std::shared_ptr<SnapshotStrategy> const& snapshot_strategy, |
413 | 50 | std::shared_ptr<shell::SessionListener> const& session_listener, | 51 | std::shared_ptr<shell::SessionListener> const& session_listener, |
414 | @@ -60,6 +61,7 @@ | |||
415 | 60 | std::shared_ptr<shell::Surface> default_surface() const; | 61 | std::shared_ptr<shell::Surface> default_surface() const; |
416 | 61 | 62 | ||
417 | 62 | std::string name() const; | 63 | std::string name() const; |
418 | 64 | pid_t process_id() const override; | ||
419 | 63 | 65 | ||
420 | 64 | void force_requests_to_complete(); | 66 | void force_requests_to_complete(); |
421 | 65 | 67 | ||
422 | @@ -77,6 +79,7 @@ | |||
423 | 77 | 79 | ||
424 | 78 | private: | 80 | private: |
425 | 79 | std::shared_ptr<shell::SurfaceFactory> const surface_factory; | 81 | std::shared_ptr<shell::SurfaceFactory> const surface_factory; |
426 | 82 | pid_t const pid; | ||
427 | 80 | std::string const session_name; | 83 | std::string const session_name; |
428 | 81 | std::shared_ptr<SnapshotStrategy> const snapshot_strategy; | 84 | std::shared_ptr<SnapshotStrategy> const snapshot_strategy; |
429 | 82 | std::shared_ptr<shell::SessionListener> const session_listener; | 85 | std::shared_ptr<shell::SessionListener> const session_listener; |
430 | 83 | 86 | ||
431 | === modified file 'src/server/scene/session_manager.cpp' | |||
432 | --- src/server/scene/session_manager.cpp 2014-01-13 06:12:33 +0000 | |||
433 | +++ src/server/scene/session_manager.cpp 2014-02-07 14:29:43 +0000 | |||
434 | @@ -1,5 +1,5 @@ | |||
435 | 1 | /* | 1 | /* |
437 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
438 | 3 | * | 3 | * |
439 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
440 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
441 | @@ -73,12 +73,14 @@ | |||
442 | 73 | close_session(session); | 73 | close_session(session); |
443 | 74 | } | 74 | } |
444 | 75 | 75 | ||
447 | 76 | std::shared_ptr<mf::Session> ms::SessionManager::open_session(std::string const& name, | 76 | std::shared_ptr<mf::Session> ms::SessionManager::open_session( |
448 | 77 | std::shared_ptr<mf::EventSink> const& sender) | 77 | pid_t client_pid, |
449 | 78 | std::string const& name, | ||
450 | 79 | std::shared_ptr<mf::EventSink> const& sender) | ||
451 | 78 | { | 80 | { |
452 | 79 | std::shared_ptr<msh::Session> new_session = | 81 | std::shared_ptr<msh::Session> new_session = |
453 | 80 | std::make_shared<ApplicationSession>( | 82 | std::make_shared<ApplicationSession>( |
455 | 81 | surface_factory, name, snapshot_strategy, session_listener, sender); | 83 | surface_factory, client_pid, name, snapshot_strategy, session_listener, sender); |
456 | 82 | 84 | ||
457 | 83 | app_container->insert_session(new_session); | 85 | app_container->insert_session(new_session); |
458 | 84 | 86 | ||
459 | 85 | 87 | ||
460 | === modified file 'src/server/scene/session_manager.h' | |||
461 | --- src/server/scene/session_manager.h 2014-01-13 06:12:33 +0000 | |||
462 | +++ src/server/scene/session_manager.h 2014-02-07 14:29:43 +0000 | |||
463 | @@ -1,5 +1,5 @@ | |||
464 | 1 | /* | 1 | /* |
466 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
467 | 3 | * | 3 | * |
468 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
469 | 5 | * under the terms of the GNU General Public License version 3, | 5 | * under the terms of the GNU General Public License version 3, |
470 | @@ -55,7 +55,10 @@ | |||
471 | 55 | virtual ~SessionManager(); | 55 | virtual ~SessionManager(); |
472 | 56 | 56 | ||
473 | 57 | virtual std::shared_ptr<frontend::Session> open_session( | 57 | virtual std::shared_ptr<frontend::Session> open_session( |
475 | 58 | std::string const& name, std::shared_ptr<frontend::EventSink> const& sink); | 58 | pid_t client_pid, |
476 | 59 | std::string const& name, | ||
477 | 60 | std::shared_ptr<frontend::EventSink> const& sink); | ||
478 | 61 | |||
479 | 59 | virtual void close_session(std::shared_ptr<frontend::Session> const& session); | 62 | virtual void close_session(std::shared_ptr<frontend::Session> const& session); |
480 | 60 | 63 | ||
481 | 61 | frontend::SurfaceId create_surface_for(std::shared_ptr<frontend::Session> const& session, | 64 | frontend::SurfaceId create_surface_for(std::shared_ptr<frontend::Session> const& session, |
482 | 62 | 65 | ||
483 | === modified file 'tests/integration-tests/test_session.cpp' | |||
484 | --- tests/integration-tests/test_session.cpp 2014-01-31 11:13:57 +0000 | |||
485 | +++ tests/integration-tests/test_session.cpp 2014-02-07 14:29:43 +0000 | |||
486 | @@ -1,5 +1,5 @@ | |||
487 | 1 | /* | 1 | /* |
489 | 2 | * Copyright © 2013 Canonical Ltd. | 2 | * Copyright © 2013-2014 Canonical Ltd. |
490 | 3 | * | 3 | * |
491 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
492 | 5 | * it under the terms of the GNU General Public License version 3 as | 5 | * it under the terms of the GNU General Public License version 3 as |
493 | @@ -170,6 +170,7 @@ | |||
494 | 170 | 170 | ||
495 | 171 | ms::ApplicationSession session{ | 171 | ms::ApplicationSession session{ |
496 | 172 | conf.the_shell_surface_factory(), | 172 | conf.the_shell_surface_factory(), |
497 | 173 | __LINE__, | ||
498 | 173 | "stress", | 174 | "stress", |
499 | 174 | conf.the_snapshot_strategy(), | 175 | conf.the_snapshot_strategy(), |
500 | 175 | std::make_shared<msh::NullSessionListener>(), | 176 | std::make_shared<msh::NullSessionListener>(), |
501 | 176 | 177 | ||
502 | === modified file 'tests/integration-tests/test_session_manager.cpp' | |||
503 | --- tests/integration-tests/test_session_manager.cpp 2014-01-13 06:12:33 +0000 | |||
504 | +++ tests/integration-tests/test_session_manager.cpp 2014-02-07 14:29:43 +0000 | |||
505 | @@ -76,9 +76,9 @@ | |||
506 | 76 | 76 | ||
507 | 77 | EXPECT_CALL(focus_setter, set_focus_to(_)).Times(3); | 77 | EXPECT_CALL(focus_setter, set_focus_to(_)).Times(3); |
508 | 78 | 78 | ||
512 | 79 | auto session1 = session_manager.open_session("Visual Basic Studio", std::make_shared<mtd::NullEventSink>()); | 79 | auto session1 = session_manager.open_session(__LINE__, "Visual Basic Studio", std::make_shared<mtd::NullEventSink>()); |
513 | 80 | auto session2 = session_manager.open_session("Microsoft Access", std::make_shared<mtd::NullEventSink>()); | 80 | auto session2 = session_manager.open_session(__LINE__, "Microsoft Access", std::make_shared<mtd::NullEventSink>()); |
514 | 81 | auto session3 = session_manager.open_session("WordPerfect", std::make_shared<mtd::NullEventSink>()); | 81 | auto session3 = session_manager.open_session(__LINE__, "WordPerfect", std::make_shared<mtd::NullEventSink>()); |
515 | 82 | 82 | ||
516 | 83 | Mock::VerifyAndClearExpectations(&focus_setter); | 83 | Mock::VerifyAndClearExpectations(&focus_setter); |
517 | 84 | 84 | ||
518 | @@ -105,9 +105,9 @@ | |||
519 | 105 | 105 | ||
520 | 106 | EXPECT_CALL(focus_setter, set_focus_to(_)).Times(3); | 106 | EXPECT_CALL(focus_setter, set_focus_to(_)).Times(3); |
521 | 107 | 107 | ||
525 | 108 | auto session1 = session_manager.open_session("Visual Basic Studio", std::make_shared<mtd::NullEventSink>()); | 108 | auto session1 = session_manager.open_session(__LINE__, "Visual Basic Studio", std::make_shared<mtd::NullEventSink>()); |
526 | 109 | auto session2 = session_manager.open_session("Microsoft Access", std::make_shared<mtd::NullEventSink>()); | 109 | auto session2 = session_manager.open_session(__LINE__, "Microsoft Access", std::make_shared<mtd::NullEventSink>()); |
527 | 110 | auto session3 = session_manager.open_session("WordPerfect", std::make_shared<mtd::NullEventSink>()); | 110 | auto session3 = session_manager.open_session(__LINE__, "WordPerfect", std::make_shared<mtd::NullEventSink>()); |
528 | 111 | 111 | ||
529 | 112 | Mock::VerifyAndClearExpectations(&focus_setter); | 112 | Mock::VerifyAndClearExpectations(&focus_setter); |
530 | 113 | 113 | ||
531 | 114 | 114 | ||
532 | === modified file 'tests/unit-tests/frontend/test_session_mediator.cpp' | |||
533 | --- tests/unit-tests/frontend/test_session_mediator.cpp 2014-02-06 09:51:46 +0000 | |||
534 | +++ tests/unit-tests/frontend/test_session_mediator.cpp 2014-02-07 14:29:43 +0000 | |||
535 | @@ -1,5 +1,5 @@ | |||
536 | 1 | /* | 1 | /* |
538 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
539 | 3 | * | 3 | * |
540 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
541 | 5 | * it under the terms of the GNU General Public License version 3 as | 5 | * it under the terms of the GNU General Public License version 3 as |
542 | @@ -206,7 +206,7 @@ | |||
543 | 206 | report{std::make_shared<mf::NullSessionMediatorReport>()}, | 206 | report{std::make_shared<mf::NullSessionMediatorReport>()}, |
544 | 207 | resource_cache{std::make_shared<mf::ResourceCache>()}, | 207 | resource_cache{std::make_shared<mf::ResourceCache>()}, |
545 | 208 | stub_screencast{std::make_shared<StubScreencast>()}, | 208 | stub_screencast{std::make_shared<StubScreencast>()}, |
547 | 209 | mediator{shell, graphics_platform, graphics_changer, | 209 | mediator{__LINE__, shell, graphics_platform, graphics_changer, |
548 | 210 | surface_pixel_formats, report, | 210 | surface_pixel_formats, report, |
549 | 211 | std::make_shared<mtd::NullEventSink>(), | 211 | std::make_shared<mtd::NullEventSink>(), |
550 | 212 | resource_cache, stub_screencast}, | 212 | resource_cache, stub_screencast}, |
551 | @@ -215,7 +215,7 @@ | |||
552 | 215 | { | 215 | { |
553 | 216 | using namespace ::testing; | 216 | using namespace ::testing; |
554 | 217 | 217 | ||
556 | 218 | ON_CALL(*shell, open_session(_, _)).WillByDefault(Return(stubbed_session)); | 218 | ON_CALL(*shell, open_session(_, _, _)).WillByDefault(Return(stubbed_session)); |
557 | 219 | ON_CALL(*shell, create_surface_for(_, _)) | 219 | ON_CALL(*shell, create_surface_for(_, _)) |
558 | 220 | .WillByDefault(WithArg<1>(Invoke(stubbed_session.get(), &StubbedSession::create_surface))); | 220 | .WillByDefault(WithArg<1>(Invoke(stubbed_session.get(), &StubbedSession::create_surface))); |
559 | 221 | } | 221 | } |
560 | @@ -370,7 +370,7 @@ | |||
561 | 370 | .Times(1) | 370 | .Times(1) |
562 | 371 | .WillOnce(Return(mt::fake_shared(config))); | 371 | .WillOnce(Return(mt::fake_shared(config))); |
563 | 372 | mf::SessionMediator mediator( | 372 | mf::SessionMediator mediator( |
565 | 373 | shell, graphics_platform, mock_display, | 373 | __LINE__, shell, graphics_platform, mock_display, |
566 | 374 | surface_pixel_formats, report, | 374 | surface_pixel_formats, report, |
567 | 375 | std::make_shared<mtd::NullEventSink>(), | 375 | std::make_shared<mtd::NullEventSink>(), |
568 | 376 | resource_cache, std::make_shared<mtd::NullScreencast>()); | 376 | resource_cache, std::make_shared<mtd::NullScreencast>()); |
569 | @@ -602,7 +602,7 @@ | |||
570 | 602 | .WillOnce(Return(mt::fake_shared(stub_display_config))); | 602 | .WillOnce(Return(mt::fake_shared(stub_display_config))); |
571 | 603 | 603 | ||
572 | 604 | mf::SessionMediator session_mediator{ | 604 | mf::SessionMediator session_mediator{ |
574 | 605 | shell, graphics_platform, mock_display_selector, | 605 | __LINE__, shell, graphics_platform, mock_display_selector, |
575 | 606 | surface_pixel_formats, report, | 606 | surface_pixel_formats, report, |
576 | 607 | std::make_shared<mtd::NullEventSink>(), resource_cache, | 607 | std::make_shared<mtd::NullEventSink>(), resource_cache, |
577 | 608 | std::make_shared<mtd::NullScreencast>()}; | 608 | std::make_shared<mtd::NullScreencast>()}; |
578 | 609 | 609 | ||
579 | === modified file 'tests/unit-tests/frontend/test_session_mediator_android.cpp' | |||
580 | --- tests/unit-tests/frontend/test_session_mediator_android.cpp 2014-01-29 18:02:33 +0000 | |||
581 | +++ tests/unit-tests/frontend/test_session_mediator_android.cpp 2014-02-07 14:29:43 +0000 | |||
582 | @@ -57,7 +57,7 @@ | |||
583 | 57 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, | 57 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, |
584 | 58 | report{std::make_shared<mf::NullSessionMediatorReport>()}, | 58 | report{std::make_shared<mf::NullSessionMediatorReport>()}, |
585 | 59 | resource_cache{std::make_shared<mf::ResourceCache>()}, | 59 | resource_cache{std::make_shared<mf::ResourceCache>()}, |
587 | 60 | mediator{shell, graphics_platform, display_changer, | 60 | mediator{__LINE__, shell, graphics_platform, display_changer, |
588 | 61 | surface_pixel_formats, report, | 61 | surface_pixel_formats, report, |
589 | 62 | std::make_shared<mtd::NullEventSink>(), | 62 | std::make_shared<mtd::NullEventSink>(), |
590 | 63 | resource_cache, std::make_shared<mtd::NullScreencast>()}, | 63 | resource_cache, std::make_shared<mtd::NullScreencast>()}, |
591 | 64 | 64 | ||
592 | === modified file 'tests/unit-tests/frontend/test_session_mediator_mesa.cpp' | |||
593 | --- tests/unit-tests/frontend/test_session_mediator_mesa.cpp 2014-01-29 18:02:33 +0000 | |||
594 | +++ tests/unit-tests/frontend/test_session_mediator_mesa.cpp 2014-02-07 14:29:43 +0000 | |||
595 | @@ -1,5 +1,5 @@ | |||
596 | 1 | /* | 1 | /* |
598 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
599 | 3 | * | 3 | * |
600 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
601 | 5 | * it under the terms of the GNU General Public License version 3 as | 5 | * it under the terms of the GNU General Public License version 3 as |
602 | @@ -70,7 +70,7 @@ | |||
603 | 70 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, | 70 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, |
604 | 71 | report{std::make_shared<mf::NullSessionMediatorReport>()}, | 71 | report{std::make_shared<mf::NullSessionMediatorReport>()}, |
605 | 72 | resource_cache{std::make_shared<mf::ResourceCache>()}, | 72 | resource_cache{std::make_shared<mf::ResourceCache>()}, |
607 | 73 | mediator{shell, mock_platform, display_changer, | 73 | mediator{__LINE__, shell, mock_platform, display_changer, |
608 | 74 | surface_pixel_formats, report, | 74 | surface_pixel_formats, report, |
609 | 75 | std::make_shared<mtd::NullEventSink>(), | 75 | std::make_shared<mtd::NullEventSink>(), |
610 | 76 | resource_cache, std::make_shared<mtd::NullScreencast>()}, | 76 | resource_cache, std::make_shared<mtd::NullScreencast>()}, |
611 | 77 | 77 | ||
612 | === modified file 'tests/unit-tests/scene/test_application_session.cpp' | |||
613 | --- tests/unit-tests/scene/test_application_session.cpp 2014-01-13 06:12:33 +0000 | |||
614 | +++ tests/unit-tests/scene/test_application_session.cpp 2014-02-07 14:29:43 +0000 | |||
615 | @@ -1,5 +1,5 @@ | |||
616 | 1 | /* | 1 | /* |
618 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
619 | 3 | * | 3 | * |
620 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
621 | 5 | * it under the terms of the GNU General Public License version 3 as | 5 | * it under the terms of the GNU General Public License version 3 as |
622 | @@ -69,10 +69,13 @@ | |||
623 | 69 | EXPECT_CALL(listener, destroying_surface(_, _)) | 69 | EXPECT_CALL(listener, destroying_surface(_, _)) |
624 | 70 | .Times(1); | 70 | .Times(1); |
625 | 71 | 71 | ||
630 | 72 | ms::ApplicationSession session(mt::fake_shared(surface_factory), "Foo", | 72 | ms::ApplicationSession session( |
631 | 73 | std::make_shared<mtd::NullSnapshotStrategy>(), | 73 | mt::fake_shared(surface_factory), |
632 | 74 | mt::fake_shared(listener), | 74 | __LINE__, |
633 | 75 | mt::fake_shared(sender)); | 75 | "Foo", |
634 | 76 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
635 | 77 | mt::fake_shared(listener), | ||
636 | 78 | mt::fake_shared(sender)); | ||
637 | 76 | 79 | ||
638 | 77 | msh::SurfaceCreationParameters params; | 80 | msh::SurfaceCreationParameters params; |
639 | 78 | auto surf = session.create_surface(params); | 81 | auto surf = session.create_surface(params); |
640 | @@ -97,9 +100,13 @@ | |||
641 | 97 | EXPECT_CALL(listener, destroying_surface(_, _)).Times(1); | 100 | EXPECT_CALL(listener, destroying_surface(_, _)).Times(1); |
642 | 98 | 101 | ||
643 | 99 | { | 102 | { |
647 | 100 | ms::ApplicationSession session(mt::fake_shared(surface_factory), "Foo", | 103 | ms::ApplicationSession session( |
648 | 101 | std::make_shared<mtd::NullSnapshotStrategy>(), mt::fake_shared(listener), | 104 | mt::fake_shared(surface_factory), |
649 | 102 | mt::fake_shared(sender)); | 105 | __LINE__, |
650 | 106 | "Foo", | ||
651 | 107 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
652 | 108 | mt::fake_shared(listener), | ||
653 | 109 | mt::fake_shared(sender)); | ||
654 | 103 | 110 | ||
655 | 104 | msh::SurfaceCreationParameters params; | 111 | msh::SurfaceCreationParameters params; |
656 | 105 | session.create_surface(params); | 112 | session.create_surface(params); |
657 | @@ -123,9 +130,13 @@ | |||
658 | 123 | .WillOnce(Return(make_mock_surface())); | 130 | .WillOnce(Return(make_mock_surface())); |
659 | 124 | } | 131 | } |
660 | 125 | 132 | ||
664 | 126 | ms::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo", | 133 | ms::ApplicationSession app_session( |
665 | 127 | std::make_shared<mtd::NullSnapshotStrategy>(), | 134 | mt::fake_shared(surface_factory), |
666 | 128 | std::make_shared<msh::NullSessionListener>(), mt::fake_shared(sender)); | 135 | __LINE__, |
667 | 136 | "Foo", | ||
668 | 137 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
669 | 138 | std::make_shared<msh::NullSessionListener>(), | ||
670 | 139 | mt::fake_shared(sender)); | ||
671 | 129 | 140 | ||
672 | 130 | 141 | ||
673 | 131 | msh::SurfaceCreationParameters params; | 142 | msh::SurfaceCreationParameters params; |
674 | @@ -156,9 +167,13 @@ | |||
675 | 156 | mtd::MockSurfaceFactory surface_factory; | 167 | mtd::MockSurfaceFactory surface_factory; |
676 | 157 | ON_CALL(surface_factory, create_surface(_, _, _, _)).WillByDefault(Return(mock_surface)); | 168 | ON_CALL(surface_factory, create_surface(_, _, _, _)).WillByDefault(Return(mock_surface)); |
677 | 158 | 169 | ||
681 | 159 | ms::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo", | 170 | ms::ApplicationSession app_session( |
682 | 160 | std::make_shared<mtd::NullSnapshotStrategy>(), | 171 | mt::fake_shared(surface_factory), |
683 | 161 | std::make_shared<msh::NullSessionListener>(), mt::fake_shared(sender)); | 172 | __LINE__, |
684 | 173 | "Foo", | ||
685 | 174 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
686 | 175 | std::make_shared<msh::NullSessionListener>(), | ||
687 | 176 | mt::fake_shared(sender)); | ||
688 | 162 | 177 | ||
689 | 163 | EXPECT_CALL(surface_factory, create_surface(_, _, _, _)); | 178 | EXPECT_CALL(surface_factory, create_surface(_, _, _, _)); |
690 | 164 | 179 | ||
691 | @@ -177,15 +192,20 @@ | |||
692 | 177 | app_session.destroy_surface(surf); | 192 | app_session.destroy_surface(surf); |
693 | 178 | } | 193 | } |
694 | 179 | 194 | ||
696 | 180 | TEST(Session, get_invalid_surface_throw_behavior) | 195 | TEST(ApplicationSession, get_invalid_surface_throw_behavior) |
697 | 181 | { | 196 | { |
698 | 182 | using namespace ::testing; | 197 | using namespace ::testing; |
699 | 183 | 198 | ||
700 | 184 | mtd::NullEventSink sender; | 199 | mtd::NullEventSink sender; |
701 | 185 | mtd::MockSurfaceFactory surface_factory; | 200 | mtd::MockSurfaceFactory surface_factory; |
705 | 186 | ms::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo", | 201 | ms::ApplicationSession app_session( |
706 | 187 | std::make_shared<mtd::NullSnapshotStrategy>(), | 202 | mt::fake_shared(surface_factory), |
707 | 188 | std::make_shared<msh::NullSessionListener>(), mt::fake_shared(sender)); | 203 | __LINE__, |
708 | 204 | "Foo", | ||
709 | 205 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
710 | 206 | std::make_shared<msh::NullSessionListener>(), | ||
711 | 207 | mt::fake_shared(sender)); | ||
712 | 208 | |||
713 | 189 | mf::SurfaceId invalid_surface_id(1); | 209 | mf::SurfaceId invalid_surface_id(1); |
714 | 190 | 210 | ||
715 | 191 | EXPECT_THROW({ | 211 | EXPECT_THROW({ |
716 | @@ -193,15 +213,20 @@ | |||
717 | 193 | }, std::runtime_error); | 213 | }, std::runtime_error); |
718 | 194 | } | 214 | } |
719 | 195 | 215 | ||
721 | 196 | TEST(Session, destroy_invalid_surface_throw_behavior) | 216 | TEST(ApplicationSession, destroy_invalid_surface_throw_behavior) |
722 | 197 | { | 217 | { |
723 | 198 | using namespace ::testing; | 218 | using namespace ::testing; |
724 | 199 | 219 | ||
725 | 200 | mtd::NullEventSink sender; | 220 | mtd::NullEventSink sender; |
726 | 201 | mtd::MockSurfaceFactory surface_factory; | 221 | mtd::MockSurfaceFactory surface_factory; |
730 | 202 | ms::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo", | 222 | ms::ApplicationSession app_session( |
731 | 203 | std::make_shared<mtd::NullSnapshotStrategy>(), | 223 | mt::fake_shared(surface_factory), |
732 | 204 | std::make_shared<msh::NullSessionListener>(), mt::fake_shared(sender)); | 224 | __LINE__, |
733 | 225 | "Foo", | ||
734 | 226 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
735 | 227 | std::make_shared<msh::NullSessionListener>(), | ||
736 | 228 | mt::fake_shared(sender)); | ||
737 | 229 | |||
738 | 205 | mf::SurfaceId invalid_surface_id(1); | 230 | mf::SurfaceId invalid_surface_id(1); |
739 | 206 | 231 | ||
740 | 207 | EXPECT_THROW({ | 232 | EXPECT_THROW({ |
741 | @@ -209,7 +234,7 @@ | |||
742 | 209 | }, std::runtime_error); | 234 | }, std::runtime_error); |
743 | 210 | } | 235 | } |
744 | 211 | 236 | ||
746 | 212 | TEST(Session, uses_snapshot_strategy) | 237 | TEST(ApplicationSession, uses_snapshot_strategy) |
747 | 213 | { | 238 | { |
748 | 214 | using namespace ::testing; | 239 | using namespace ::testing; |
749 | 215 | 240 | ||
750 | @@ -226,9 +251,13 @@ | |||
751 | 226 | auto snapshot_strategy = std::make_shared<MockSnapshotStrategy>(); | 251 | auto snapshot_strategy = std::make_shared<MockSnapshotStrategy>(); |
752 | 227 | mtd::NullEventSink sender; | 252 | mtd::NullEventSink sender; |
753 | 228 | mtd::MockSurfaceFactory surface_factory; | 253 | mtd::MockSurfaceFactory surface_factory; |
757 | 229 | ms::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo", | 254 | ms::ApplicationSession app_session( |
758 | 230 | snapshot_strategy, | 255 | mt::fake_shared(surface_factory), |
759 | 231 | std::make_shared<msh::NullSessionListener>(), mt::fake_shared(sender)); | 256 | __LINE__, |
760 | 257 | "Foo", | ||
761 | 258 | snapshot_strategy, | ||
762 | 259 | std::make_shared<msh::NullSessionListener>(), | ||
763 | 260 | mt::fake_shared(sender)); | ||
764 | 232 | 261 | ||
765 | 233 | EXPECT_CALL(*snapshot_strategy, take_snapshot_of(_,_)); | 262 | EXPECT_CALL(*snapshot_strategy, take_snapshot_of(_,_)); |
766 | 234 | 263 | ||
767 | @@ -245,7 +274,7 @@ | |||
768 | 245 | MOCK_METHOD1(handle_display_config_change, void(mir::graphics::DisplayConfiguration const&)); | 274 | MOCK_METHOD1(handle_display_config_change, void(mir::graphics::DisplayConfiguration const&)); |
769 | 246 | }; | 275 | }; |
770 | 247 | } | 276 | } |
772 | 248 | TEST(Session, display_config_sender) | 277 | TEST(ApplicationSession, display_config_sender) |
773 | 249 | { | 278 | { |
774 | 250 | using namespace ::testing; | 279 | using namespace ::testing; |
775 | 251 | 280 | ||
776 | @@ -256,14 +285,18 @@ | |||
777 | 256 | EXPECT_CALL(sender, handle_display_config_change(testing::Ref(stub_config))) | 285 | EXPECT_CALL(sender, handle_display_config_change(testing::Ref(stub_config))) |
778 | 257 | .Times(1); | 286 | .Times(1); |
779 | 258 | 287 | ||
783 | 259 | ms::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo", | 288 | ms::ApplicationSession app_session( |
784 | 260 | std::make_shared<mtd::NullSnapshotStrategy>(), | 289 | mt::fake_shared(surface_factory), |
785 | 261 | std::make_shared<msh::NullSessionListener>(), mt::fake_shared(sender)); | 290 | __LINE__, |
786 | 291 | "Foo", | ||
787 | 292 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
788 | 293 | std::make_shared<msh::NullSessionListener>(), | ||
789 | 294 | mt::fake_shared(sender)); | ||
790 | 262 | 295 | ||
791 | 263 | app_session.send_display_config(stub_config); | 296 | app_session.send_display_config(stub_config); |
792 | 264 | } | 297 | } |
793 | 265 | 298 | ||
795 | 266 | TEST(Session, lifecycle_event_sender) | 299 | TEST(ApplicationSession, lifecycle_event_sender) |
796 | 267 | { | 300 | { |
797 | 268 | using namespace ::testing; | 301 | using namespace ::testing; |
798 | 269 | 302 | ||
799 | @@ -271,11 +304,35 @@ | |||
800 | 271 | mtd::MockSurfaceFactory surface_factory; | 304 | mtd::MockSurfaceFactory surface_factory; |
801 | 272 | MockEventSink sender; | 305 | MockEventSink sender; |
802 | 273 | 306 | ||
806 | 274 | ms::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo", | 307 | ms::ApplicationSession app_session( |
807 | 275 | std::make_shared<mtd::NullSnapshotStrategy>(), | 308 | mt::fake_shared(surface_factory), |
808 | 276 | std::make_shared<msh::NullSessionListener>(), mt::fake_shared(sender)); | 309 | __LINE__, |
809 | 310 | "Foo", | ||
810 | 311 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
811 | 312 | std::make_shared<msh::NullSessionListener>(), | ||
812 | 313 | mt::fake_shared(sender)); | ||
813 | 277 | 314 | ||
814 | 278 | EXPECT_CALL(sender, handle_lifecycle_event(exp_state)).Times(1); | 315 | EXPECT_CALL(sender, handle_lifecycle_event(exp_state)).Times(1); |
815 | 279 | 316 | ||
816 | 280 | app_session.set_lifecycle_state(mir_lifecycle_state_will_suspend); | 317 | app_session.set_lifecycle_state(mir_lifecycle_state_will_suspend); |
817 | 281 | } | 318 | } |
818 | 319 | |||
819 | 320 | TEST(ApplicationSession, process_id) | ||
820 | 321 | { | ||
821 | 322 | using namespace ::testing; | ||
822 | 323 | |||
823 | 324 | pid_t const pid{__LINE__}; | ||
824 | 325 | |||
825 | 326 | mtd::MockSurfaceFactory surface_factory; | ||
826 | 327 | MockEventSink sender; | ||
827 | 328 | |||
828 | 329 | ms::ApplicationSession app_session( | ||
829 | 330 | mt::fake_shared(surface_factory), | ||
830 | 331 | pid, | ||
831 | 332 | "Foo", | ||
832 | 333 | std::make_shared<mtd::NullSnapshotStrategy>(), | ||
833 | 334 | std::make_shared<msh::NullSessionListener>(), | ||
834 | 335 | mt::fake_shared(sender)); | ||
835 | 336 | |||
836 | 337 | EXPECT_THAT(app_session.process_id(), Eq(pid)); | ||
837 | 338 | } | ||
838 | 282 | 339 | ||
839 | === modified file 'tests/unit-tests/scene/test_session_manager.cpp' | |||
840 | --- tests/unit-tests/scene/test_session_manager.cpp 2014-01-13 06:12:33 +0000 | |||
841 | +++ tests/unit-tests/scene/test_session_manager.cpp 2014-02-07 14:29:43 +0000 | |||
842 | @@ -1,5 +1,5 @@ | |||
843 | 1 | /* | 1 | /* |
845 | 2 | * Copyright © 2012 Canonical Ltd. | 2 | * Copyright © 2012-2014 Canonical Ltd. |
846 | 3 | * | 3 | * |
847 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
848 | 5 | * it under the terms of the GNU General Public License version 3 as | 5 | * it under the terms of the GNU General Public License version 3 as |
849 | @@ -104,7 +104,7 @@ | |||
850 | 104 | EXPECT_CALL(focus_setter, set_focus_to(_)); | 104 | EXPECT_CALL(focus_setter, set_focus_to(_)); |
851 | 105 | EXPECT_CALL(focus_setter, set_focus_to(std::shared_ptr<msh::Session>())).Times(1); | 105 | EXPECT_CALL(focus_setter, set_focus_to(std::shared_ptr<msh::Session>())).Times(1); |
852 | 106 | 106 | ||
854 | 107 | auto session = session_manager.open_session("Visual Basic Studio", std::shared_ptr<mf::EventSink>()); | 107 | auto session = session_manager.open_session(__LINE__, "Visual Basic Studio", std::shared_ptr<mf::EventSink>()); |
855 | 108 | session_manager.close_session(session); | 108 | session_manager.close_session(session); |
856 | 109 | } | 109 | } |
857 | 110 | 110 | ||
858 | @@ -126,7 +126,7 @@ | |||
859 | 126 | EXPECT_CALL(focus_setter, set_focus_to(_)).Times(1); | 126 | EXPECT_CALL(focus_setter, set_focus_to(_)).Times(1); |
860 | 127 | EXPECT_CALL(focus_setter, set_focus_to(std::shared_ptr<msh::Session>())).Times(1); | 127 | EXPECT_CALL(focus_setter, set_focus_to(std::shared_ptr<msh::Session>())).Times(1); |
861 | 128 | 128 | ||
863 | 129 | auto session = session_manager.open_session("Visual Basic Studio", std::shared_ptr<mf::EventSink>()); | 129 | auto session = session_manager.open_session(__LINE__, "Visual Basic Studio", std::shared_ptr<mf::EventSink>()); |
864 | 130 | session->create_surface(msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}})); | 130 | session->create_surface(msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}})); |
865 | 131 | 131 | ||
866 | 132 | session_manager.close_session(session); | 132 | session_manager.close_session(session); |
867 | @@ -140,7 +140,7 @@ | |||
868 | 140 | EXPECT_CALL(container, insert_session(_)).Times(1); | 140 | EXPECT_CALL(container, insert_session(_)).Times(1); |
869 | 141 | EXPECT_CALL(focus_setter, set_focus_to(_)).WillOnce(SaveArg<0>(&new_session)); | 141 | EXPECT_CALL(focus_setter, set_focus_to(_)).WillOnce(SaveArg<0>(&new_session)); |
870 | 142 | 142 | ||
872 | 143 | auto session = session_manager.open_session("Visual Basic Studio", std::shared_ptr<mf::EventSink>()); | 143 | auto session = session_manager.open_session(__LINE__, "Visual Basic Studio", std::shared_ptr<mf::EventSink>()); |
873 | 144 | EXPECT_EQ(session, new_session); | 144 | EXPECT_EQ(session, new_session); |
874 | 145 | } | 145 | } |
875 | 146 | 146 | ||
876 | @@ -161,7 +161,7 @@ | |||
877 | 161 | EXPECT_CALL(focus_setter, set_focus_to(_)).Times(1); // Post Surface creation | 161 | EXPECT_CALL(focus_setter, set_focus_to(_)).Times(1); // Post Surface creation |
878 | 162 | } | 162 | } |
879 | 163 | 163 | ||
881 | 164 | auto session1 = session_manager.open_session("Weather Report", std::shared_ptr<mf::EventSink>()); | 164 | auto session1 = session_manager.open_session(__LINE__, "Weather Report", std::shared_ptr<mf::EventSink>()); |
882 | 165 | session_manager.create_surface_for(session1, msh::a_surface()); | 165 | session_manager.create_surface_for(session1, msh::a_surface()); |
883 | 166 | } | 166 | } |
884 | 167 | 167 | ||
885 | @@ -200,7 +200,7 @@ | |||
886 | 200 | EXPECT_CALL(session_listener, stopping(_)).Times(1); | 200 | EXPECT_CALL(session_listener, stopping(_)).Times(1); |
887 | 201 | EXPECT_CALL(session_listener, unfocused()).Times(1); | 201 | EXPECT_CALL(session_listener, unfocused()).Times(1); |
888 | 202 | 202 | ||
890 | 203 | auto session = session_manager.open_session("XPlane", std::shared_ptr<mf::EventSink>()); | 203 | auto session = session_manager.open_session(__LINE__, "XPlane", std::shared_ptr<mf::EventSink>()); |
891 | 204 | session_manager.close_session(session); | 204 | session_manager.close_session(session); |
892 | 205 | } | 205 | } |
893 | 206 | 206 | ||
894 | @@ -237,8 +237,8 @@ | |||
895 | 237 | 237 | ||
896 | 238 | EXPECT_CALL(session_event_sink, handle_focus_change(_)).Times(2); | 238 | EXPECT_CALL(session_event_sink, handle_focus_change(_)).Times(2); |
897 | 239 | 239 | ||
900 | 240 | auto session = session_manager.open_session("XPlane", std::shared_ptr<mf::EventSink>()); | 240 | auto session = session_manager.open_session(__LINE__, "XPlane", std::shared_ptr<mf::EventSink>()); |
901 | 241 | auto session1 = session_manager.open_session("Bla", std::shared_ptr<mf::EventSink>()); | 241 | auto session1 = session_manager.open_session(__LINE__, "Bla", std::shared_ptr<mf::EventSink>()); |
902 | 242 | 242 | ||
903 | 243 | Mock::VerifyAndClearExpectations(&session_event_sink); | 243 | Mock::VerifyAndClearExpectations(&session_event_sink); |
904 | 244 | 244 |
FAILED: Continuous integration, rev:1381 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- ci/803/ jenkins. qa.ubuntu. com/job/ mir-android- trusty- i386-build/ 842/console jenkins. qa.ubuntu. com/job/ mir-clang- trusty- amd64-build/ 839 jenkins. qa.ubuntu. com/job/ mir-mediumtests -trusty- touch/437/ console jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 533 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 533/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- armhf-ci/ 537/console jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- trusty- armhf/438/ console
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- team-mir- development- branch- ci/803/ rebuild
http://