| OLD | NEW |
| 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" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 loaded_view_manager_ = NULL; | 292 loaded_view_manager_ = NULL; |
| 293 return view_manager; | 293 return view_manager; |
| 294 } | 294 } |
| 295 | 295 |
| 296 void UnloadApplication(const GURL& url) { | 296 void UnloadApplication(const GURL& url) { |
| 297 test_helper_.SetLoaderForURL(scoped_ptr<ApplicationLoader>(), url); | 297 test_helper_.SetLoaderForURL(scoped_ptr<ApplicationLoader>(), url); |
| 298 } | 298 } |
| 299 | 299 |
| 300 private: | 300 private: |
| 301 // Overridden from testing::Test: | 301 // Overridden from testing::Test: |
| 302 virtual void SetUp() override { | 302 void SetUp() override { |
| 303 ConnectApplicationLoader::LoadedCallback ready_callback = base::Bind( | 303 ConnectApplicationLoader::LoadedCallback ready_callback = base::Bind( |
| 304 &ViewManagerTest::OnViewManagerLoaded, base::Unretained(this)); | 304 &ViewManagerTest::OnViewManagerLoaded, base::Unretained(this)); |
| 305 test_helper_.Init(); | 305 test_helper_.Init(); |
| 306 test_helper_.SetLoaderForURL( | 306 test_helper_.SetLoaderForURL( |
| 307 scoped_ptr<ApplicationLoader>( | 307 scoped_ptr<ApplicationLoader>( |
| 308 new ConnectApplicationLoader(ready_callback)), | 308 new ConnectApplicationLoader(ready_callback)), |
| 309 GURL(kWindowManagerURL)); | 309 GURL(kWindowManagerURL)); |
| 310 test_helper_.SetLoaderForURL( | 310 test_helper_.SetLoaderForURL( |
| 311 scoped_ptr<ApplicationLoader>( | 311 scoped_ptr<ApplicationLoader>( |
| 312 new ConnectApplicationLoader(ready_callback)), | 312 new ConnectApplicationLoader(ready_callback)), |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 | 638 |
| 639 // TODO(beng): tests for view event dispatcher. | 639 // TODO(beng): tests for view event dispatcher. |
| 640 // - verify that we see events for all views. | 640 // - verify that we see events for all views. |
| 641 | 641 |
| 642 // TODO(beng): tests for focus: | 642 // TODO(beng): tests for focus: |
| 643 // - focus between two views known to a connection | 643 // - focus between two views known to a connection |
| 644 // - focus between views unknown to one of the connections. | 644 // - focus between views unknown to one of the connections. |
| 645 // - focus between views unknown to either connection. | 645 // - focus between views unknown to either connection. |
| 646 | 646 |
| 647 } // namespace mojo | 647 } // namespace mojo |
| OLD | NEW |