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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/app/chrome_command_ids.h" 6 #include "chrome/app/chrome_command_ids.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
11 #include "chrome/test/base/in_process_browser_test.h" 11 #include "chrome/test/base/in_process_browser_test.h"
12 #include "chrome/test/base/ui_test_utils.h" 12 #include "chrome/test/base/ui_test_utils.h"
13 #include "content/public/browser/notification_service.h" 13 #include "content/public/browser/notification_service.h"
14 #include "content/public/browser/notification_types.h" 14 #include "content/public/browser/notification_types.h"
15 #include "content/public/test/test_navigation_observer.h" 15 #include "content/public/test/test_navigation_observer.h"
16 16
17 namespace { 17 namespace {
18 18
19 class PrintPreviewTest : public InProcessBrowserTest { 19 class PrintPreviewTest : public InProcessBrowserTest {
20 public: 20 public:
21 PrintPreviewTest() { 21 PrintPreviewTest() {}
22 EnableDOMAutomation();
23 }
24 22
25 #if !defined(GOOGLE_CHROME_BUILD) 23 #if !defined(GOOGLE_CHROME_BUILD)
26 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 24 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
27 command_line->AppendSwitch(switches::kEnablePrintPreview); 25 command_line->AppendSwitch(switches::kEnablePrintPreview);
28 } 26 }
29 #endif 27 #endif
30 28
31 void Print() { 29 void Print() {
32 ui_test_utils::WindowedNotificationObserver observer( 30 ui_test_utils::WindowedNotificationObserver observer(
33 content::NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED, 31 content::NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED,
(...skipping 27 matching lines...) Expand all
61 chrome::Reload(browser(), CURRENT_TAB); 59 chrome::Reload(browser(), CURRENT_TAB);
62 reload_observer.Wait(); 60 reload_observer.Wait();
63 61
64 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT)); 62 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT));
65 63
66 // Make sure advanced print command (Ctrl+Shift+p) is enabled. 64 // Make sure advanced print command (Ctrl+Shift+p) is enabled.
67 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT)); 65 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT));
68 } 66 }
69 67
70 } // namespace 68 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options2/options_ui_browsertest.cc ('k') | chrome/test/automation/dom_automation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698