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

Side by Side Diff: mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc

Issue 694923002: Update mojo sdk to rev 91d94d6993c9b0c4135a95687a7d541ce90629b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/public/cpp/view_manager/view_manager.h" 5 #include "mojo/services/public/cpp/view_manager/view_manager.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/application_manager/application_manager.h" 10 #include "mojo/application_manager/application_manager.h"
11 #include "mojo/public/cpp/application/application_connection.h" 11 #include "mojo/public/cpp/application/application_connection.h"
12 #include "mojo/public/cpp/application/application_delegate.h" 12 #include "mojo/public/cpp/application/application_delegate.h"
13 #include "mojo/public/cpp/application/application_impl.h" 13 #include "mojo/public/cpp/application/application_impl.h"
14 #include "mojo/public/cpp/application/service_provider_impl.h" 14 #include "mojo/public/cpp/application/service_provider_impl.h"
15 #include "mojo/public/interfaces/application/service_provider.mojom.h" 15 #include "mojo/public/interfaces/application/service_provider.mojom.h"
16 #include "mojo/services/public/cpp/geometry/geometry_util.h"
16 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h" 17 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h"
17 #include "mojo/services/public/cpp/view_manager/lib/view_private.h" 18 #include "mojo/services/public/cpp/view_manager/lib/view_private.h"
18 #include "mojo/services/public/cpp/view_manager/util.h" 19 #include "mojo/services/public/cpp/view_manager/util.h"
19 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h" 20 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
20 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" 21 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
21 #include "mojo/services/public/cpp/view_manager/view_observer.h" 22 #include "mojo/services/public/cpp/view_manager/view_observer.h"
22 #include "mojo/shell/shell_test_helper.h" 23 #include "mojo/shell/shell_test_helper.h"
23 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
24 25
25 namespace mojo { 26 namespace mojo {
26 27
27 // TODO(jam): move these somewhere else so they can be shared?
28
29 inline bool operator==(const Rect& lhs, const Rect& rhs) {
30 return lhs.x == rhs.x && lhs.y == rhs.y && lhs.width == rhs.width &&
31 lhs.height == lhs.height;
32 }
33
34 inline bool operator!=(const Rect& lhs, const Rect& rhs) {
35 return !(lhs == rhs);
36 }
37
38 namespace { 28 namespace {
39 29
40 const char kWindowManagerURL[] = "mojo:window_manager"; 30 const char kWindowManagerURL[] = "mojo:window_manager";
41 const char kEmbeddedApp1URL[] = "mojo:embedded_app_1"; 31 const char kEmbeddedApp1URL[] = "mojo:embedded_app_1";
42 32
43 base::RunLoop* current_run_loop = NULL; 33 base::RunLoop* current_run_loop = NULL;
44 34
45 void DoRunLoop() { 35 void DoRunLoop() {
46 base::RunLoop run_loop; 36 base::RunLoop run_loop;
47 current_run_loop = &run_loop; 37 current_run_loop = &run_loop;
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 626
637 // TODO(beng): tests for view event dispatcher. 627 // TODO(beng): tests for view event dispatcher.
638 // - verify that we see events for all views. 628 // - verify that we see events for all views.
639 629
640 // TODO(beng): tests for focus: 630 // TODO(beng): tests for focus:
641 // - focus between two views known to a connection 631 // - focus between two views known to a connection
642 // - focus between views unknown to one of the connections. 632 // - focus between views unknown to one of the connections.
643 // - focus between views unknown to either connection. 633 // - focus between views unknown to either connection.
644 634
645 } // namespace mojo 635 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698