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..2dd0a12840891db5e1ac02f40eee039d6751e43e 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 |
| + // PreloadJavascriptLibrarie(). |
|
David Tseng
2011/07/07 19:26:28
Librarie -> Library?
Sheridan Rawlins
2011/07/07 23:39:23
Done.
|
| + bool override_chrome_send_; |
| + |
| protected: |
| WebUIBrowserTest(); |
| @@ -83,6 +94,9 @@ class WebUIBrowserTest : public InProcessBrowserTest { |
| static GURL WebUITestDataPathToURL(const FilePath::StringType& path); |
| private: |
| + // TestNavigationObserver::LoadStartObserver: |
| + virtual void OnLoadStart() OVERRIDE; |
| + |
| // Builds a string containing all added javascript libraries. |
| void BuildJavascriptLibraries(std::string* content); |