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

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

Issue 2918433002: [Media Router tests] Fix MANUAL_Fail_StartCancelledNoSupportedSinks. (Closed)
Patch Set: Update comments Created 3 years, 6 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
« no previous file with comments | « chrome/test/media_router/media_router_integration_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include <memory> 4 #include <memory>
5 5
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "chrome/test/media_router/media_router_integration_browsertest.h" 8 #include "chrome/test/media_router/media_router_integration_browsertest.h"
9 #include "content/public/test/test_utils.h" 9 #include "content/public/test/test_utils.h"
10 #include "net/base/filename_util.h" 10 #include "net/base/filename_util.h"
11 #include "net/test/embedded_test_server/embedded_test_server.h" 11 #include "net/test/embedded_test_server/embedded_test_server.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using content::WebContents; 14 using content::WebContents;
15 15
16 namespace media_router { 16 namespace media_router {
17 17
18 namespace { 18 namespace {
19 const char kInitiateCloseFromReceiverPageScript[] = 19 const char kInitiateCloseFromReceiverPageScript[] =
20 "initiateCloseFromReceiverPage();"; 20 "initiateCloseFromReceiverPage();";
21 } 21 }
22 22
23 class MediaRouterOneUAIntegrationBrowserTest 23 class MediaRouterIntegrationOneUABrowserTest
24 : public MediaRouterIntegrationBrowserTest { 24 : public MediaRouterIntegrationBrowserTest {
25 public: 25 public:
26 void SetUpOnMainThread() override { 26 void SetUpOnMainThread() override {
27 MediaRouterIntegrationBrowserTest::SetUpOnMainThread(); 27 MediaRouterIntegrationBrowserTest::SetUpOnMainThread();
28 28
29 // Set up embedded test server to serve offscreen presentation with relative 29 // Set up embedded test server to serve offscreen presentation with relative
30 // URL "presentation_receiver.html". 30 // URL "presentation_receiver.html".
31 base::FilePath base_dir; 31 base::FilePath base_dir;
32 CHECK(PathService::Get(base::DIR_MODULE, &base_dir)); 32 CHECK(PathService::Get(base::DIR_MODULE, &base_dir));
33 base::FilePath resource_dir = base_dir.Append( 33 base::FilePath resource_dir = base_dir.Append(
34 FILE_PATH_LITERAL("media_router/browser_test_resources/")); 34 FILE_PATH_LITERAL("media_router/browser_test_resources/"));
35 embedded_test_server()->ServeFilesFromDirectory(resource_dir); 35 embedded_test_server()->ServeFilesFromDirectory(resource_dir);
36 ASSERT_TRUE(embedded_test_server()->Start()); 36 ASSERT_TRUE(embedded_test_server()->Start());
37 } 37 }
38 38
39 GURL GetTestPageUrl(const base::FilePath& full_path) override { 39 GURL GetTestPageUrl(const base::FilePath& full_path) override {
40 GURL url = embedded_test_server()->GetURL("/basic_test.html"); 40 GURL url = embedded_test_server()->GetURL("/basic_test.html");
41 return GURL(url.spec() + "?__oneUA__=true"); 41 return GURL(url.spec() + "?__oneUA__=true");
42 } 42 }
43 }; 43 };
44 44
45 IN_PROC_BROWSER_TEST_F(MediaRouterOneUAIntegrationBrowserTest, MANUAL_Basic) { 45 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUABrowserTest, MANUAL_Basic) {
46 RunBasicTest(); 46 RunBasicTest();
47 } 47 }
48 48
49 IN_PROC_BROWSER_TEST_F(MediaRouterOneUAIntegrationBrowserTest, 49 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUABrowserTest,
50 MANUAL_SendAndOnMessage) { 50 MANUAL_SendAndOnMessage) {
51 RunSendMessageTest("foo"); 51 RunSendMessageTest("foo");
52 } 52 }
53 53
54 IN_PROC_BROWSER_TEST_F(MediaRouterOneUAIntegrationBrowserTest, 54 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUABrowserTest,
55 MANUAL_ReceiverCloseConnection) { 55 MANUAL_ReceiverCloseConnection) {
56 WebContents* web_contents = StartSessionWithTestPageAndChooseSink(); 56 WebContents* web_contents = StartSessionWithTestPageAndChooseSink();
57 CheckSessionValidity(web_contents); 57 CheckSessionValidity(web_contents);
58 ExecuteJavaScriptAPI(web_contents, kInitiateCloseFromReceiverPageScript); 58 ExecuteJavaScriptAPI(web_contents, kInitiateCloseFromReceiverPageScript);
59 } 59 }
60 60
61 IN_PROC_BROWSER_TEST_F(MediaRouterOneUAIntegrationBrowserTest, 61 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUABrowserTest,
62 MANUAL_Fail_SendMessage) { 62 MANUAL_Fail_SendMessage) {
63 RunFailToSendMessageTest(); 63 RunFailToSendMessageTest();
64 } 64 }
65 65
66 IN_PROC_BROWSER_TEST_F(MediaRouterOneUAIntegrationBrowserTest, 66 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUABrowserTest,
67 MANUAL_ReconnectSession) { 67 MANUAL_ReconnectSession) {
68 RunReconnectSessionTest(); 68 RunReconnectSessionTest();
69 } 69 }
70 70
71 IN_PROC_BROWSER_TEST_F(MediaRouterOneUAIntegrationBrowserTest, 71 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUABrowserTest,
72 MANUAL_ReconnectSessionSameTab) { 72 MANUAL_ReconnectSessionSameTab) {
73 RunReconnectSessionSameTabTest(); 73 RunReconnectSessionSameTabTest();
74 } 74 }
75 75
76 class MediaRouterOneUANoReceiverIntegrationBrowserTest 76 class MediaRouterIntegrationOneUANoReceiverBrowserTest
77 : public MediaRouterIntegrationBrowserTest { 77 : public MediaRouterIntegrationBrowserTest {
78 public: 78 public:
79 GURL GetTestPageUrl(const base::FilePath& full_path) override { 79 GURL GetTestPageUrl(const base::FilePath& full_path) override {
80 GURL url = MediaRouterIntegrationBrowserTest::GetTestPageUrl(full_path); 80 GURL url = MediaRouterIntegrationBrowserTest::GetTestPageUrl(full_path);
81 return GURL(url.spec() + "?__oneUANoReceiver__=true"); 81 return GURL(url.spec() + "?__oneUANoReceiver__=true");
82 } 82 }
83 }; 83 };
84 84
85 IN_PROC_BROWSER_TEST_F(MediaRouterOneUANoReceiverIntegrationBrowserTest, 85 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUANoReceiverBrowserTest,
86 MANUAL_Basic) { 86 MANUAL_Basic) {
87 RunBasicTest(); 87 RunBasicTest();
88 } 88 }
89 89
90 IN_PROC_BROWSER_TEST_F(MediaRouterOneUANoReceiverIntegrationBrowserTest, 90 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUANoReceiverBrowserTest,
91 MANUAL_Fail_SendMessage) { 91 MANUAL_Fail_SendMessage) {
92 RunFailToSendMessageTest(); 92 RunFailToSendMessageTest();
93 } 93 }
94 94
95 IN_PROC_BROWSER_TEST_F(MediaRouterOneUANoReceiverIntegrationBrowserTest, 95 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUANoReceiverBrowserTest,
96 MANUAL_ReconnectSession) { 96 MANUAL_ReconnectSession) {
97 RunReconnectSessionTest(); 97 RunReconnectSessionTest();
98 } 98 }
99 99
100 IN_PROC_BROWSER_TEST_F(MediaRouterOneUANoReceiverIntegrationBrowserTest, 100 IN_PROC_BROWSER_TEST_F(MediaRouterIntegrationOneUANoReceiverBrowserTest,
101 MANUAL_ReconnectSessionSameTab) { 101 MANUAL_ReconnectSessionSameTab) {
102 RunReconnectSessionSameTabTest(); 102 RunReconnectSessionSameTabTest();
103 } 103 }
104 104
105 } // namespace media_router 105 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/test/media_router/media_router_integration_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698