diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-24 15:36:57 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-24 15:36:57 +0000 |
commit | 366d01d8fc1b7e05795fb4525ef1d627baee1c3c (patch) | |
tree | b1599a87630a4e2ab2dcda5586490c50ab758402 /chrome/test/base/ui_test_utils.cc | |
parent | 46cc0a4dd4ddd93336e83dbbf19da94c45c339a3 (diff) | |
download | chromium_src-366d01d8fc1b7e05795fb4525ef1d627baee1c3c.zip chromium_src-366d01d8fc1b7e05795fb4525ef1d627baee1c3c.tar.gz chromium_src-366d01d8fc1b7e05795fb4525ef1d627baee1c3c.tar.bz2 |
Simplify how LayoutBrowserTest scraps a tab. This allows removal of a whole bunch of ancient code.
BUG=90448
Review URL: https://chromiumcodereview.appspot.com/10800090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148111 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/base/ui_test_utils.cc')
-rw-r--r-- | chrome/test/base/ui_test_utils.cc | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index ab3d344..77e4a18 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -48,7 +48,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension_action.h" -#include "chrome/test/automation/javascript_execution_controller.h" #include "chrome/test/base/bookmark_load_observer.h" #include "content/public/browser/dom_operation_notification_details.h" #include "content/public/browser/download_item.h" @@ -192,40 +191,6 @@ class FindInPageNotificationObserver : public content::NotificationObserver { DISALLOW_COPY_AND_ASSIGN(FindInPageNotificationObserver); }; -class InProcessJavaScriptExecutionController - : public base::RefCounted<InProcessJavaScriptExecutionController>, - public JavaScriptExecutionController { - public: - explicit InProcessJavaScriptExecutionController( - RenderViewHost* render_view_host) - : render_view_host_(render_view_host) {} - - protected: - // Executes |script| and sets the JSON response |json|. - virtual bool ExecuteJavaScriptAndGetJSON(const std::string& script, - std::string* json) { - DOMOperationObserver dom_op_observer(render_view_host_); - render_view_host_->ExecuteJavascriptInWebFrame(string16(), - UTF8ToUTF16(script)); - return dom_op_observer.WaitAndGetResponse(json); - } - - virtual void FirstObjectAdded() { - AddRef(); - } - - virtual void LastObjectRemoved() { - Release(); - } - - private: - friend class base::RefCounted<InProcessJavaScriptExecutionController>; - virtual ~InProcessJavaScriptExecutionController() {} - - // Weak pointer to the associated RenderViewHost. - RenderViewHost* render_view_host_; -}; - // Specifying a prototype so that we can add the WARN_UNUSED_RESULT attribute. bool ExecuteJavaScriptHelper(RenderViewHost* render_view_host, const std::wstring& frame_xpath, @@ -481,15 +446,6 @@ void NavigateToURLBlockUntilNavigationsComplete(Browser* browser, BROWSER_TEST_WAIT_FOR_NAVIGATION); } -DOMElementProxyRef GetActiveDOMDocument(Browser* browser) { - JavaScriptExecutionController* executor = - new InProcessJavaScriptExecutionController( - chrome::GetActiveWebContents(browser)->GetRenderViewHost()); - int element_handle; - executor->ExecuteJavaScriptAndGetReturn("document;", &element_handle); - return executor->GetObjectProxy<DOMElementProxy>(element_handle); -} - bool ExecuteJavaScript(RenderViewHost* render_view_host, const std::wstring& frame_xpath, const std::wstring& original_script) { |