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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "mojo/public/cpp/application/application_connection.h" | 8 #include "mojo/public/cpp/application/application_connection.h" |
9 #include "mojo/public/cpp/application/application_delegate.h" | 9 #include "mojo/public/cpp/application/application_delegate.h" |
10 #include "mojo/public/cpp/application/application_impl.h" | 10 #include "mojo/public/cpp/application/application_impl.h" |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 loop_.Run(); | 515 loop_.Run(); |
516 | 516 |
517 // Kills the a app. | 517 // Kills the a app. |
518 sm.SetLoaderForURL(scoped_ptr<ServiceLoader>(), GURL(kTestAURLString)); | 518 sm.SetLoaderForURL(scoped_ptr<ServiceLoader>(), GURL(kTestAURLString)); |
519 loop_.Run(); | 519 loop_.Run(); |
520 EXPECT_EQ(1, context.num_b_deletes); | 520 EXPECT_EQ(1, context.num_b_deletes); |
521 } | 521 } |
522 | 522 |
523 // Confirm that the url of a service is correctly passed to another service that | 523 // Confirm that the url of a service is correctly passed to another service that |
524 // it loads, and that it can be rejected. | 524 // it loads, and that it can be rejected. |
525 TEST_F(ServiceManagerTest, ANoLoadB) { | 525 // http://crbug.com/396300 |
| 526 TEST_F(ServiceManagerTest, DISABLED_ANoLoadB) { |
526 TesterContext context; | 527 TesterContext context; |
527 ServiceManager sm; | 528 ServiceManager sm; |
528 | 529 |
529 // Any url can load a. | 530 // Any url can load a. |
530 sm.SetLoaderForURL( | 531 sm.SetLoaderForURL( |
531 scoped_ptr<ServiceLoader>(new Tester(&context, std::string())), | 532 scoped_ptr<ServiceLoader>(new Tester(&context, std::string())), |
532 GURL(kTestAURLString)); | 533 GURL(kTestAURLString)); |
533 | 534 |
534 // Only c can load b, so this will fail. | 535 // Only c can load b, so this will fail. |
535 sm.SetLoaderForURL( | 536 sm.SetLoaderForURL( |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 std::string url("test:test3"); | 574 std::string url("test:test3"); |
574 TestServicePtr test_service; | 575 TestServicePtr test_service; |
575 sm.ConnectToService(GURL(url), &test_service); | 576 sm.ConnectToService(GURL(url), &test_service); |
576 | 577 |
577 EXPECT_EQ(1, interceptor.call_count()); | 578 EXPECT_EQ(1, interceptor.call_count()); |
578 EXPECT_EQ(url, interceptor.url_spec()); | 579 EXPECT_EQ(url, interceptor.url_spec()); |
579 EXPECT_EQ(1, default_loader->num_loads()); | 580 EXPECT_EQ(1, default_loader->num_loads()); |
580 } | 581 } |
581 | 582 |
582 } // namespace mojo | 583 } // namespace mojo |
OLD | NEW |