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

Side by Side Diff: chrome/browser/ui/webui/options2/options_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/browser/ui/webui/options2/options_ui_browsertest.h" 5 #include "chrome/browser/ui/webui/options2/options_ui_browsertest.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
11 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
12 #include "chrome/test/base/ui_test_utils.h" 12 #include "chrome/test/base/ui_test_utils.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 16
17 namespace options2 { 17 namespace options2 {
18 18
19 OptionsBrowserTest::OptionsBrowserTest() { 19 OptionsBrowserTest::OptionsBrowserTest() {
20 EnableDOMAutomation();
21 } 20 }
22 21
23 void OptionsBrowserTest::NavigateToSettings() { 22 void OptionsBrowserTest::NavigateToSettings() {
24 const GURL& url = GURL(chrome::kChromeUISettingsURL); 23 const GURL& url = GURL(chrome::kChromeUISettingsURL);
25 ui_test_utils::NavigateToURL(browser(), url); 24 ui_test_utils::NavigateToURL(browser(), url);
26 } 25 }
27 26
28 void OptionsBrowserTest::VerifyNavbar() { 27 void OptionsBrowserTest::VerifyNavbar() {
29 bool navbar_exist = false; 28 bool navbar_exist = false;
30 EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( 29 EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
(...skipping 11 matching lines...) Expand all
42 } 41 }
43 42
44 // Flaky, see http://crbug.com/119671. 43 // Flaky, see http://crbug.com/119671.
45 IN_PROC_BROWSER_TEST_F(OptionsBrowserTest, FLAKY_LoadOptionsByURL) { 44 IN_PROC_BROWSER_TEST_F(OptionsBrowserTest, FLAKY_LoadOptionsByURL) {
46 NavigateToSettings(); 45 NavigateToSettings();
47 VerifyTitle(); 46 VerifyTitle();
48 VerifyNavbar(); 47 VerifyNavbar();
49 } 48 }
50 49
51 } // namespace options2 50 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698