| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // the javascript for the given |preload_test_fixture| and | 101 // the javascript for the given |preload_test_fixture| and |
| 102 // |preload_test_name|. chrome.send will be overridden to allow javascript | 102 // |preload_test_name|. chrome.send will be overridden to allow javascript |
| 103 // handler mocking. | 103 // handler mocking. |
| 104 void BrowsePreload(const GURL& browse_to, | 104 void BrowsePreload(const GURL& browse_to, |
| 105 const std::string& preload_test_fixture, | 105 const std::string& preload_test_fixture, |
| 106 const std::string& preload_test_name); | 106 const std::string& preload_test_name); |
| 107 | 107 |
| 108 // Called by javascript-generated test bodies to browse to a page and preload | 108 // Called by javascript-generated test bodies to browse to a page and preload |
| 109 // the javascript for the given |preload_test_fixture| and | 109 // the javascript for the given |preload_test_fixture| and |
| 110 // |preload_test_name|. chrome.send will be overridden to allow javascript | 110 // |preload_test_name|. chrome.send will be overridden to allow javascript |
| 111 // handler mocking. | 111 // handler mocking. When |print| is true, call browser()->Print() |
| 112 void BrowsePrintPreload(const GURL& browse_to, | 112 void BrowsePrintPreload(const GURL& browse_to, |
| 113 const std::string& preload_test_fixture, | 113 const std::string& preload_test_fixture, |
| 114 const std::string& preload_test_name); | 114 const std::string& preload_test_name, |
| 115 bool print); |
| 115 | 116 |
| 116 protected: | 117 protected: |
| 117 // URL to dummy WebUI page for testing framework. | 118 // URL to dummy WebUI page for testing framework. |
| 118 static const char kDummyURL[]; | 119 static const char kDummyURL[]; |
| 119 | 120 |
| 120 WebUIBrowserTest(); | 121 WebUIBrowserTest(); |
| 121 | 122 |
| 122 // Set up test path & override for |kDummyURL|. | 123 // Set up test path & override for |kDummyURL|. |
| 123 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 124 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; |
| 124 | 125 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // again. | 175 // again. |
| 175 bool libraries_preloaded_; | 176 bool libraries_preloaded_; |
| 176 | 177 |
| 177 // Saves the states of |test_fixture| and |test_name| for calling | 178 // Saves the states of |test_fixture| and |test_name| for calling |
| 178 // PreloadJavascriptLibraries(). | 179 // PreloadJavascriptLibraries(). |
| 179 std::string preload_test_fixture_; | 180 std::string preload_test_fixture_; |
| 180 std::string preload_test_name_; | 181 std::string preload_test_name_; |
| 181 }; | 182 }; |
| 182 | 183 |
| 183 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ | 184 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ |
| OLD | NEW |