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

Side by Side Diff: chrome/browser/extensions/error_console/error_console_browsertest.cc

Issue 215623002: Enable Error Console for ADT and <= Dev Channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/error_console/error_console.h" 5 #include "chrome/browser/extensions/error_console/error_console.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 ACTION_NEW_TAB, 196 ACTION_NEW_TAB,
197 // Do nothing (errors will be caused by a background script, 197 // Do nothing (errors will be caused by a background script,
198 // or by a manifest/loading warning). 198 // or by a manifest/loading warning).
199 ACTION_NONE 199 ACTION_NONE
200 }; 200 };
201 201
202 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 202 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
203 ExtensionBrowserTest::SetUpInProcessBrowserTestFixture(); 203 ExtensionBrowserTest::SetUpInProcessBrowserTestFixture();
204 204
205 // We need to enable the ErrorConsole FeatureSwitch in order to collect 205 // We need to enable the ErrorConsole FeatureSwitch in order to collect
206 // errors. 206 // errors. This should be enabled on any channel <= Dev, but let's make
207 // sure (in case a test is running on, e.g., a beta channel).
207 FeatureSwitch::error_console()->SetOverrideValue( 208 FeatureSwitch::error_console()->SetOverrideValue(
208 FeatureSwitch::OVERRIDE_ENABLED); 209 FeatureSwitch::OVERRIDE_ENABLED);
209 } 210 }
210 211
211 virtual void SetUpOnMainThread() OVERRIDE { 212 virtual void SetUpOnMainThread() OVERRIDE {
212 ExtensionBrowserTest::SetUpOnMainThread(); 213 ExtensionBrowserTest::SetUpOnMainThread();
213 214
214 // Errors are only kept if we have Developer Mode enabled. 215 // Errors are only kept if we have Developer Mode enabled.
215 profile()->GetPrefs()->SetBoolean(prefs::kExtensionsUIDeveloperMode, true); 216 profile()->GetPrefs()->SetBoolean(prefs::kExtensionsUIDeveloperMode, true);
216 217
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 const Extension* extension = NULL; 546 const Extension* extension = NULL;
546 LoadExtensionAndCheckErrors( 547 LoadExtensionAndCheckErrors(
547 "bad_extension_page", 548 "bad_extension_page",
548 kNoFlags, 549 kNoFlags,
549 1, // One error: the page will load JS which has a reference error. 550 1, // One error: the page will load JS which has a reference error.
550 ACTION_NEW_TAB, 551 ACTION_NEW_TAB,
551 &extension); 552 &extension);
552 } 553 }
553 554
554 } // namespace extensions 555 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698