Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2825)

Unified Diff: chrome/test/automation/automation_proxy_uitest.cc

Issue 5707006: Revert "Add named testing interface." (Closed)
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/automation/automation_proxy_uitest.h ('k') | chrome/test/automation/proxy_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/automation_proxy_uitest.cc
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index eb197e67b53a7b12a5364a8ed442456bc7477dcb..f25ce10fd760815f3bb11d35c69ce86b6595b8b8 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -29,7 +29,6 @@
#include "chrome/test/automation/autocomplete_edit_proxy.h"
#include "chrome/test/automation/automation_proxy_uitest.h"
#include "chrome/test/automation/browser_proxy.h"
-#include "chrome/test/automation/proxy_launcher.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui_test_utils.h"
@@ -48,34 +47,6 @@ using testing::CreateFunctor;
using testing::StrEq;
using testing::_;
-
-// Replace the default automation proxy with our mock client.
-class ExternalTabUITestMockLauncher : public ProxyLauncher {
- public:
- explicit ExternalTabUITestMockLauncher(ExternalTabUITestMockClient **mock)
- : mock_(mock) {
- channel_id_ = AutomationProxy::GenerateChannelID();
- }
-
- AutomationProxy* CreateAutomationProxy(int execution_timeout) {
- *mock_ = new ExternalTabUITestMockClient(execution_timeout);
- (*mock_)->InitializeChannel(channel_id_, false);
- return *mock_;
- }
-
- void InitializeConnection(UITestBase* ui_test_base) const {
- ui_test_base->LaunchBrowserAndServer();
- }
-
- std::string PrefixedChannelID() const {
- return channel_id_;
- }
-
- private:
- ExternalTabUITestMockClient **mock_;
- std::string channel_id_; // Channel id of automation proxy.
-};
-
class AutomationProxyTest : public UITest {
protected:
AutomationProxyTest() {
@@ -870,9 +841,9 @@ template <typename T> T** ReceivePointer(scoped_refptr<T>& p) { // NOLINT
return reinterpret_cast<T**>(&p);
}
-// Replace the default automation proxy with our mock client.
-ProxyLauncher* ExternalTabUITest::CreateProxyLauncher() {
- return new ExternalTabUITestMockLauncher(&mock_);
+AutomationProxy* ExternalTabUITest::CreateAutomationProxy(int exec_timeout) {
+ mock_ = new ExternalTabUITestMockClient(exec_timeout);
+ return mock_;
}
// Create with specifying a url
« no previous file with comments | « chrome/test/automation/automation_proxy_uitest.h ('k') | chrome/test/automation/proxy_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698