Chromium Code Reviews| Index: chrome/browser/ui/webui/web_ui_browsertest.h |
| diff --git a/chrome/browser/ui/webui/web_ui_browsertest.h b/chrome/browser/ui/webui/web_ui_browsertest.h |
| index 91f136d697028f67ac353a72cc1d52ca3107c7ad..6db8c4c2416a269f5f8beb18f6bbf4122138defd 100644 |
| --- a/chrome/browser/ui/webui/web_ui_browsertest.h |
| +++ b/chrome/browser/ui/webui/web_ui_browsertest.h |
| @@ -11,6 +11,7 @@ |
| #include "base/file_path.h" |
| #include "chrome/browser/ui/webui/web_ui_test_handler.h" |
| #include "chrome/test/in_process_browser_test.h" |
| +#include "chrome/test/test_navigation_observer.h" |
| class Value; |
| class WebUIMessageHandler; |
| @@ -29,7 +30,8 @@ class WebUIMessageHandler; |
| // These tests should follow the form given in: |
| // chrome/test/data/webui/sample_downloads.js. |
| // and the lone test within this class. |
| -class WebUIBrowserTest : public InProcessBrowserTest { |
| +class WebUIBrowserTest : public InProcessBrowserTest, |
| + public TestNavigationObserver::LoadStartObserver { |
| public: |
| typedef std::vector<const Value*> ConstValueVector; |
| virtual ~WebUIBrowserTest(); |
| @@ -66,6 +68,15 @@ class WebUIBrowserTest : public InProcessBrowserTest { |
| // javascript to register handlers. |
| void PreLoadJavascriptLibraries(bool override_chrome_send); |
| + // Called by javascript-generated test bodies to browse to a page and preload |
| + // the javascript. chrome.send will be overridden if |override_chrome_send| is |
| + // set. |
| + void BrowsePreload(const GURL& browse_to, bool override_chrome_send); |
| + |
| + // Saves the state of |override_chrome_send| for calling |
| + // PreloadJavascriptLibraries(). |
| + bool override_chrome_send_; |
|
James Hawkins
2011/07/08 00:03:33
Shouldn't this be protected?
Sheridan Rawlins
2011/07/08 22:45:49
Replacements (preload_test_fixture_, preload_test_
|
| + |
| protected: |
| WebUIBrowserTest(); |
| @@ -83,6 +94,9 @@ class WebUIBrowserTest : public InProcessBrowserTest { |
| static GURL WebUITestDataPathToURL(const FilePath::StringType& path); |
| private: |
| + // TestNavigationObserver::LoadStartObserver: |
|
James Hawkins
2011/07/08 00:03:33
// TestNavigationObserver::LoadStartObserver imple
Sheridan Rawlins
2011/07/08 22:45:49
Done.
|
| + virtual void OnLoadStart() OVERRIDE; |
| + |
| // Builds a string containing all added javascript libraries. |
| void BuildJavascriptLibraries(std::string* content); |