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

Side by Side Diff: chrome/browser/ui/webui/bookmarks_ui_browsertest.cc

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include "base/test/test_timeouts.h" 7 #include "base/test/test_timeouts.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_tabstrip.h" 9 #include "chrome/browser/ui/browser_tabstrip.h"
10 #include "chrome/browser/ui/chrome_pages.h" 10 #include "chrome/browser/ui/chrome_pages.h"
11 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
12 #include "chrome/test/base/in_process_browser_test.h" 12 #include "chrome/test/base/in_process_browser_test.h"
13 #include "chrome/test/base/ui_test_utils.h" 13 #include "chrome/test/base/ui_test_utils.h"
14 #include "content/public/browser/notification_service.h" 14 #include "content/public/browser/notification_service.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 #include "content/public/test/test_navigation_observer.h" 16 #include "content/public/test/test_navigation_observer.h"
17 17
18 class BookmarksTest : public InProcessBrowserTest { 18 class BookmarksTest : public InProcessBrowserTest {
19 public: 19 public:
20 BookmarksTest() { 20 BookmarksTest() {}
21 EnableDOMAutomation();
22 }
23 21
24 void OpenBookmarksManager() { 22 void OpenBookmarksManager() {
25 content::TestNavigationObserver navigation_observer( 23 content::TestNavigationObserver navigation_observer(
26 content::NotificationService::AllSources(), NULL, 2); 24 content::NotificationService::AllSources(), NULL, 2);
27 25
28 // Bring up the bookmarks manager tab. 26 // Bring up the bookmarks manager tab.
29 chrome::ShowBookmarkManager(browser()); 27 chrome::ShowBookmarkManager(browser());
30 navigation_observer.Wait(); 28 navigation_observer.Wait();
31 } 29 }
32 30
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 navigation_observer.Wait(); 87 navigation_observer.Wait();
90 88
91 ASSERT_EQ(1, browser()->tab_count()); 89 ASSERT_EQ(1, browser()->tab_count());
92 } 90 }
93 91
94 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) { 92 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) {
95 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL)); 93 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL));
96 ASSERT_EQ(1, browser()->tab_count()); 94 ASSERT_EQ(1, browser()->tab_count());
97 AssertIsBookmarksPage(chrome::GetActiveWebContents(browser())); 95 AssertIsBookmarksPage(chrome::GetActiveWebContents(browser()));
98 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/keyboard_access_browsertest.cc ('k') | chrome/browser/ui/webui/inspect_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698