| 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 #ifndef CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_INTEGRATION_BROWSERTEST_H_ | 5 #ifndef CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_INTEGRATION_BROWSERTEST_H_ |
| 6 #define CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_INTEGRATION_BROWSERTEST_H_ | 6 #define CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_INTEGRATION_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/debug/stack_trace.h" | 10 #include "base/debug/stack_trace.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 static void ExecuteJavaScriptAPI(content::WebContents* web_contents, | 39 static void ExecuteJavaScriptAPI(content::WebContents* web_contents, |
| 40 const std::string& script); | 40 const std::string& script); |
| 41 | 41 |
| 42 static int ExecuteScriptAndExtractInt( | 42 static int ExecuteScriptAndExtractInt( |
| 43 const content::ToRenderFrameHost& adapter, | 43 const content::ToRenderFrameHost& adapter, |
| 44 const std::string& script); | 44 const std::string& script); |
| 45 | 45 |
| 46 static std::string ExecuteScriptAndExtractString( | 46 static std::string ExecuteScriptAndExtractString( |
| 47 const content::ToRenderFrameHost& adapter, const std::string& script); | 47 const content::ToRenderFrameHost& adapter, const std::string& script); |
| 48 | 48 |
| 49 void ClickDialog(); |
| 50 |
| 49 // Get the chrome modal dialog. | 51 // Get the chrome modal dialog. |
| 50 // |web_contents|: The web contents of the test page which invokes the popup | 52 // |web_contents|: The web contents of the test page which invokes the popup |
| 51 // dialog. | 53 // dialog. |
| 52 content::WebContents* GetMRDialog(content::WebContents* web_contents); | 54 content::WebContents* GetMRDialog(content::WebContents* web_contents); |
| 53 | 55 |
| 56 // Checks that the chrome modal dialog does not exist. |
| 57 bool IsDialogClosed(content::WebContents* web_contents); |
| 58 void WaitUntilDialogClosed(content::WebContents* web_contents); |
| 59 void CheckDialogRemainsOpen(content::WebContents* web_contents); |
| 60 |
| 54 void OpenTestPage(base::FilePath::StringPieceType file); | 61 void OpenTestPage(base::FilePath::StringPieceType file); |
| 55 void OpenTestPageInNewTab(base::FilePath::StringPieceType file); | 62 void OpenTestPageInNewTab(base::FilePath::StringPieceType file); |
| 56 | 63 |
| 57 void SetTestData(base::FilePath::StringPieceType test_data_file); | 64 void SetTestData(base::FilePath::StringPieceType test_data_file); |
| 58 | 65 |
| 59 // Start session and wait until the pop dialog shows up. | 66 // Start session and wait until the pop dialog shows up. |
| 60 // |web_contents|: The web contents of the test page which invokes the popup | 67 // |web_contents|: The web contents of the test page which invokes the popup |
| 61 // dialog. | 68 // dialog. |
| 62 void StartSession(content::WebContents* web_contents); | 69 void StartSession(content::WebContents* web_contents); |
| 63 | 70 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 94 // browser_test_resources/ | 101 // browser_test_resources/ |
| 95 base::FilePath GetResourceFile( | 102 base::FilePath GetResourceFile( |
| 96 base::FilePath::StringPieceType relative_path) const; | 103 base::FilePath::StringPieceType relative_path) const; |
| 97 | 104 |
| 98 scoped_ptr<content::TestNavigationObserver> test_navigation_observer_; | 105 scoped_ptr<content::TestNavigationObserver> test_navigation_observer_; |
| 99 }; | 106 }; |
| 100 | 107 |
| 101 } // namespace media_router | 108 } // namespace media_router |
| 102 | 109 |
| 103 #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_INTEGRATION_BROWSERTEST_H_ | 110 #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_INTEGRATION_BROWSERTEST_H_ |
| OLD | NEW |