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

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

Issue 23923003: Expand RuntimeErrors for ErrorConsole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyright fix Created 7 years, 3 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/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 std::string(kExtensionScheme) + 44 std::string(kExtensionScheme) +
45 content::kStandardSchemeSeparator + 45 content::kStandardSchemeSeparator +
46 extension_id); 46 extension_id);
47 } 47 }
48 48
49 scoped_ptr<ExtensionError> CreateNewRuntimeError( 49 scoped_ptr<ExtensionError> CreateNewRuntimeError(
50 bool from_incognito, 50 bool from_incognito,
51 const std::string& extension_id, 51 const std::string& extension_id,
52 const string16& message) { 52 const string16& message) {
53 return scoped_ptr<ExtensionError>(new RuntimeError( 53 return scoped_ptr<ExtensionError>(new RuntimeError(
54 extension_id,
54 from_incognito, 55 from_incognito,
55 GetSourceForExtensionId(extension_id), 56 GetSourceForExtensionId(extension_id),
56 message, 57 message,
57 GetDefaultStackTrace(), 58 GetDefaultStackTrace(),
58 GURL::EmptyGURL(), // no context url 59 GURL::EmptyGURL(), // no context url
59 logging::LOG_INFO)); 60 logging::LOG_INFO));
60 } 61 }
61 62
62 } // namespace 63 } // namespace
63 64
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 error_console_->GetErrorsForExtension(kId); 198 error_console_->GetErrorsForExtension(kId);
198 ASSERT_EQ(kNumErrors, errors.size()); 199 ASSERT_EQ(kNumErrors, errors.size());
199 200
200 // The duplicate error should be the last reported (pointer comparison)... 201 // The duplicate error should be the last reported (pointer comparison)...
201 ASSERT_EQ(weak_error, errors.back()); 202 ASSERT_EQ(weak_error, errors.back());
202 // ... and should have two reported occurrences. 203 // ... and should have two reported occurrences.
203 ASSERT_EQ(2u, errors.back()->occurrences()); 204 ASSERT_EQ(2u, errors.back()->occurrences());
204 } 205 }
205 206
206 } // namespace extensions 207 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/error_console/error_console_browsertest.cc ('k') | chrome/browser/extensions/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698