diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-30 23:29:54 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-30 23:29:54 +0000 |
commit | 5d9c52a60b5e91819c2664572a6e0ef343a3ea28 (patch) | |
tree | 30406e4c144cf8d036a4ef1e4dabebcc1b6a8e05 /chrome/browser/browser_focus_uitest.cc | |
parent | 997c8ca739b3f79ff76adbbf421c7056af8ccdcb (diff) | |
download | chromium_src-5d9c52a60b5e91819c2664572a6e0ef343a3ea28.zip chromium_src-5d9c52a60b5e91819c2664572a6e0ef343a3ea28.tar.gz chromium_src-5d9c52a60b5e91819c2664572a6e0ef343a3ea28.tar.bz2 |
Revert 7508.7509 and 7510
Review URL: http://codereview.chromium.org/17030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_focus_uitest.cc')
-rw-r--r-- | chrome/browser/browser_focus_uitest.cc | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc index 160c3ab..ca89162 100644 --- a/chrome/browser/browser_focus_uitest.cc +++ b/chrome/browser/browser_focus_uitest.cc @@ -55,12 +55,10 @@ bool ActivateTabByClick(AutomationProxy* automation, } // namespace TEST_F(BrowserFocusTest, BrowsersRememberFocus) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot); - ASSERT_TRUE(NULL != server.get()); + TestServer server(kDocRoot); // First we navigate to our test page. - GURL url = server->TestServerPageW(kSimplePage); + GURL url = server.TestServerPageW(kSimplePage); scoped_ptr<TabProxy> tab(GetActiveTab()); EXPECT_NE(AUTOMATION_MSG_NAVIGATION_ERROR, tab->NavigateToURL(url)); @@ -132,9 +130,7 @@ TEST_F(BrowserFocusTest, BrowsersRememberFocus) { // Tabs remember focus. TEST_F(BrowserFocusTest, TabsRememberFocus) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot); - ASSERT_TRUE(NULL != server.get()); + TestServer server(kDocRoot); scoped_ptr<WindowProxy> window(automation()->GetActiveWindow()); ASSERT_TRUE(window.get() != NULL); @@ -143,7 +139,7 @@ TEST_F(BrowserFocusTest, TabsRememberFocus) { ASSERT_TRUE(browser.get() != NULL); // First we navigate to our test page. - GURL url = server->TestServerPageW(kSimplePage); + GURL url = server.TestServerPageW(kSimplePage); scoped_ptr<TabProxy> tab(GetActiveTab()); tab->NavigateToURL(url); @@ -198,12 +194,10 @@ TEST_F(BrowserFocusTest, TabsRememberFocus) { // Background window does not steal focus. TEST_F(BrowserFocusTest, BackgroundBrowserDontStealFocus) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot); - ASSERT_TRUE(NULL != server.get()); + TestServer server(kDocRoot); // First we navigate to our test page. - GURL simple_page_url = server->TestServerPageW(kSimplePage); + GURL simple_page_url = server.TestServerPageW(kSimplePage); scoped_ptr<TabProxy> tab(GetActiveTab()); tab->NavigateToURL(simple_page_url); @@ -221,7 +215,7 @@ TEST_F(BrowserFocusTest, BackgroundBrowserDontStealFocus) { automation()->GetBrowserForWindow(new_window.get())); ASSERT_TRUE(new_browser.get() != NULL); - GURL steal_focus_url = server->TestServerPageW(kStealFocusPage); + GURL steal_focus_url = server.TestServerPageW(kStealFocusPage); new_browser->AppendTab(steal_focus_url); // Make the first browser active @@ -238,12 +232,10 @@ TEST_F(BrowserFocusTest, BackgroundBrowserDontStealFocus) { // Page cannot steal focus when focus is on location bar. TEST_F(BrowserFocusTest, LocationBarLockFocus) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot); - ASSERT_TRUE(NULL != server.get()); + TestServer server(kDocRoot); // Open the page that steals focus. - GURL url = server->TestServerPageW(kStealFocusPage); + GURL url = server.TestServerPageW(kStealFocusPage); scoped_ptr<TabProxy> tab(GetActiveTab()); tab->NavigateToURL(url); @@ -272,12 +264,10 @@ TEST_F(BrowserFocusTest, LocationBarLockFocus) { // Focus traversal TEST_F(BrowserFocusTest, FocusTraversal) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot); - ASSERT_TRUE(NULL != server.get()); + TestServer server(kDocRoot); // Open the page the test page. - GURL url = server->TestServerPageW(kTypicalPage); + GURL url = server.TestServerPageW(kTypicalPage); scoped_ptr<TabProxy> tab(GetActiveTab()); tab->NavigateToURL(url); @@ -347,12 +337,10 @@ TEST_F(BrowserFocusTest, FocusTraversal) { // Make sure Find box can request focus, even when it is already open. TEST_F(BrowserFocusTest, FindFocusTest) { - scoped_refptr<HTTPTestServer> server = - HTTPTestServer::CreateServer(kDocRoot); - ASSERT_TRUE(NULL != server.get()); + TestServer server(kDocRoot); // Open some page (any page that doesn't steal focus). - GURL url = server->TestServerPageW(kTypicalPage); + GURL url = server.TestServerPageW(kTypicalPage); scoped_ptr<TabProxy> tab(GetActiveTab()); tab->NavigateToURL(url); |