Chromium Code Reviews| Index: chrome/test/ui/named_interface_uitest.cc |
| =================================================================== |
| --- chrome/test/ui/named_interface_uitest.cc (revision 0) |
| +++ chrome/test/ui/named_interface_uitest.cc (revision 0) |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/test/ui/ui_test.h" |
| + |
| +#include "chrome/common/url_constants.h" |
| +#include "chrome/test/automation/proxy_launcher.h" |
| + |
| +// The named testing interface enables the use of a named socket for controlling |
| +// the browser. This eliminates the dependency that the browser must be forked |
| +// from the controlling process. |
| +namespace { |
| + |
| +class NamedInterfaceTest : public UITest { |
| + public: |
| + NamedInterfaceTest() { |
| + show_window_ = true; |
| + } |
| + |
| + virtual ProxyLauncher *CreateProxyLauncher() { |
| + return new NamedProxyLauncher(true, true); |
| + } |
| +}; |
| + |
| +// Basic sanity test for named testing interface which |
| +// launches a browser instance that uses a named socket, then |
| +// sends it some commands to open some tabs over that socket. |
| +TEST_F(NamedInterfaceTest, BasicNamedInterface) { |
| + scoped_refptr<BrowserProxy> browser_proxy( |
| + automation()->GetBrowserWindow(0)); |
| + ASSERT_TRUE(browser_proxy.get()); |
| + |
| + for (int i = 0; i < 10; ++i) |
| + ASSERT_TRUE(browser_proxy->AppendTab(GURL(chrome::kAboutBlankURL))); |
| +} |
| + |
|
John Grabowski
2010/11/12 23:32:53
Add a test which launches browser, then connects,
dtu
2010/11/16 01:30:40
This is not implemented yet and looks to be a litt
John Grabowski
2010/11/16 01:33:03
Fine to defer. Can you put a TODO(dtu) in here wit
|
| +} // namespace |
| + |
| Property changes on: chrome/test/ui/named_interface_uitest.cc |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |