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

Side by Side Diff: chrome/test/media_router/media_router_integration_browsertest.cc

Issue 2108973002: [Media Router] Return NotFoundError on dialog exit if appropriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits, add unit tests, add integration test Created 4 years, 5 months 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 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
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_StartCancelledNoSupportedSinks) {
573 SetTestData(FILE_PATH_LITERAL("no_supported_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 WaitUntilSinkDiscoveredOnUI();
585 controller->HideMediaRouterDialog();
586 CheckStartFailed(web_contents, "NotFoundError", "No screens found.");
587 }
588
571 } // namespace media_router 589 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698