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

Side by Side Diff: chrome/browser/instant/instant_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 "base/string_util.h" 6 #include "base/string_util.h"
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/content_settings/host_content_settings_map.h" 9 #include "chrome/browser/content_settings/host_content_settings_map.h"
10 #include "chrome/browser/instant/instant_controller.h" 10 #include "chrome/browser/instant/instant_controller.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #if defined(OS_LINUX) && !defined(USE_ASH) 45 #if defined(OS_LINUX) && !defined(USE_ASH)
46 #define MAYBE(TestName) DISABLED_ ## TestName 46 #define MAYBE(TestName) DISABLED_ ## TestName
47 #elif defined(OS_WIN) 47 #elif defined(OS_WIN)
48 #define MAYBE(TestName) FLAKY_ ## TestName 48 #define MAYBE(TestName) FLAKY_ ## TestName
49 #else 49 #else
50 #define MAYBE(TestName) TestName 50 #define MAYBE(TestName) TestName
51 #endif 51 #endif
52 52
53 class InstantTest : public InProcessBrowserTest { 53 class InstantTest : public InProcessBrowserTest {
54 public: 54 public:
55 InstantTest() { 55 InstantTest() {}
56 EnableDOMAutomation();
57 }
58 56
59 void EnableInstant() { 57 void EnableInstant() {
60 InstantController::Enable(browser()->profile()); 58 InstantController::Enable(browser()->profile());
61 } 59 }
62 60
63 void SetupInstantProvider(const std::string& page) { 61 void SetupInstantProvider(const std::string& page) {
64 Profile* profile = browser()->profile(); 62 Profile* profile = browser()->profile();
65 TemplateURLService* model = 63 TemplateURLService* model =
66 TemplateURLServiceFactory::GetForProfile(profile); 64 TemplateURLServiceFactory::GetForProfile(profile);
67 65
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 DetermineInstantSupport(); 835 DetermineInstantSupport();
838 SearchAndWaitForPreviewToShow(); 836 SearchAndWaitForPreviewToShow();
839 837
840 // Now there should be three rows, the third being the instant preview. 838 // Now there should be three rows, the third being the instant preview.
841 TaskManagerBrowserTestUtil::WaitForResourceChange(3); 839 TaskManagerBrowserTestUtil::WaitForResourceChange(3);
842 string16 prefix = l10n_util::GetStringFUTF16( 840 string16 prefix = l10n_util::GetStringFUTF16(
843 IDS_TASK_MANAGER_INSTANT_PREVIEW_PREFIX, string16()); 841 IDS_TASK_MANAGER_INSTANT_PREVIEW_PREFIX, string16());
844 string16 title = task_manager->GetResourceTitle(2); 842 string16 title = task_manager->GetResourceTitle(2);
845 EXPECT_TRUE(StartsWith(title, prefix, true)) << title << " vs " << prefix; 843 EXPECT_TRUE(StartsWith(title, prefix, true)) << title << " vs " << prefix;
846 } 844 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/loadtimes_extension_bindings_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698