OLD | NEW |
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 "chrome/test/media_router/media_router_integration_browsertest.h" | 5 #include "chrome/test/media_router/media_router_integration_browsertest.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 content::TestNavigationObserver test_navigation_observer(web_contents, 1); | 561 content::TestNavigationObserver test_navigation_observer(web_contents, 1); |
562 StartSession(web_contents); | 562 StartSession(web_contents); |
563 | 563 |
564 MediaRouterDialogControllerImpl* controller = | 564 MediaRouterDialogControllerImpl* controller = |
565 MediaRouterDialogControllerImpl::GetOrCreateForWebContents(web_contents); | 565 MediaRouterDialogControllerImpl::GetOrCreateForWebContents(web_contents); |
566 EXPECT_TRUE(controller->IsShowingMediaRouterDialog()); | 566 EXPECT_TRUE(controller->IsShowingMediaRouterDialog()); |
567 controller->HideMediaRouterDialog(); | 567 controller->HideMediaRouterDialog(); |
568 CheckStartFailed(web_contents, "AbortError", "Dialog closed."); | 568 CheckStartFailed(web_contents, "AbortError", "Dialog closed."); |
569 } | 569 } |
570 | 570 |
| 571 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, |
| 572 MANUAL_Fail_StartCancelledNoSinks) { |
| 573 SetTestData(FILE_PATH_LITERAL("no_sinks.json")); |
| 574 OpenTestPage(FILE_PATH_LITERAL("basic_test.html")); |
| 575 content::WebContents* web_contents = |
| 576 browser()->tab_strip_model()->GetActiveWebContents(); |
| 577 ASSERT_TRUE(web_contents); |
| 578 content::TestNavigationObserver test_navigation_observer(web_contents, 1); |
| 579 StartSession(web_contents); |
| 580 |
| 581 MediaRouterDialogControllerImpl* controller = |
| 582 MediaRouterDialogControllerImpl::GetOrCreateForWebContents(web_contents); |
| 583 EXPECT_TRUE(controller->IsShowingMediaRouterDialog()); |
| 584 controller->HideMediaRouterDialog(); |
| 585 CheckStartFailed(web_contents, "NotFoundError", "No screens found."); |
| 586 } |
| 587 |
| 588 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationBrowserTest, |
| 589 MANUAL_Fail_StartCancelledNoSupportedSinks) { |
| 590 SetTestData(FILE_PATH_LITERAL("no_supported_sinks.json")); |
| 591 OpenTestPage(FILE_PATH_LITERAL("basic_test.html")); |
| 592 content::WebContents* web_contents = |
| 593 browser()->tab_strip_model()->GetActiveWebContents(); |
| 594 ASSERT_TRUE(web_contents); |
| 595 content::TestNavigationObserver test_navigation_observer(web_contents, 1); |
| 596 StartSession(web_contents); |
| 597 |
| 598 MediaRouterDialogControllerImpl* controller = |
| 599 MediaRouterDialogControllerImpl::GetOrCreateForWebContents(web_contents); |
| 600 EXPECT_TRUE(controller->IsShowingMediaRouterDialog()); |
| 601 WaitUntilSinkDiscoveredOnUI(); |
| 602 controller->HideMediaRouterDialog(); |
| 603 CheckStartFailed(web_contents, "NotFoundError", "No screens found."); |
| 604 } |
| 605 |
571 } // namespace media_router | 606 } // namespace media_router |
OLD | NEW |