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

Unified Diff: chrome/browser/extensions/error_console/error_console_browsertest.cc

Issue 23604050: Namespace internal extension JavaScript modules with extensions:: so that they (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Error Console Tests Fixed (uploaded by rdevlin.cronin) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/renderer/extensions/module_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/error_console/error_console_browsertest.cc
diff --git a/chrome/browser/extensions/error_console/error_console_browsertest.cc b/chrome/browser/extensions/error_console/error_console_browsertest.cc
index e2bde82c0be3d3881d966c553ce09d8899a55de6..3e2ab2fc3c8f605775150a13ca3b86bb9f6feda5 100644
--- a/chrome/browser/extensions/error_console/error_console_browsertest.cc
+++ b/chrome/browser/extensions/error_console/error_console_browsertest.cc
@@ -7,6 +7,7 @@
#include "base/files/file_path.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string16.h"
+#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -426,6 +427,9 @@ IN_PROC_BROWSER_TEST_F(ErrorConsoleBrowserTest, BrowserActionRuntimeError) {
const ErrorConsole::ErrorList& errors =
error_console()->GetErrorsForExtension(extension->id());
+ std::string event_bindings_str =
+ base::StringPrintf("extensions::%s", kEventBindings);
+
CheckRuntimeError(
errors[0],
extension->id(),
@@ -444,10 +448,10 @@ IN_PROC_BROWSER_TEST_F(ErrorConsoleBrowserTest, BrowserActionRuntimeError) {
"extensions::SafeBuiltins",
std::string("Function.target.") + kAnonymousFunction);
CheckStackFrame(
- stack_trace[2], kEventBindings, "Event.dispatchToListener");
- CheckStackFrame(stack_trace[3], kEventBindings, "Event.dispatch_");
- CheckStackFrame(stack_trace[4], kEventBindings, "dispatchArgs");
- CheckStackFrame(stack_trace[5], kEventBindings, "dispatchEvent");
+ stack_trace[2], event_bindings_str, "Event.dispatchToListener");
+ CheckStackFrame(stack_trace[3], event_bindings_str, "Event.dispatch_");
+ CheckStackFrame(stack_trace[4], event_bindings_str, "dispatchArgs");
+ CheckStackFrame(stack_trace[5], event_bindings_str, "dispatchEvent");
}
// Test that we can catch an error for calling an API with improper arguments.
@@ -463,10 +467,13 @@ IN_PROC_BROWSER_TEST_F(ErrorConsoleBrowserTest, BadAPIArgumentsRuntimeError) {
const ErrorConsole::ErrorList& errors =
error_console()->GetErrorsForExtension(extension->id());
+ std::string schema_utils_str =
+ base::StringPrintf("extensions::%s", kSchemaUtils);
+
CheckRuntimeError(
errors[0],
extension->id(),
- kSchemaUtils, // API calls are checked in schemaUtils.js.
+ schema_utils_str, // API calls are checked in schemaUtils.js.
false, // not incognito
"Uncaught Error: Invocation of form "
"tabs.get(string, function) doesn't match definition "
@@ -478,7 +485,7 @@ IN_PROC_BROWSER_TEST_F(ErrorConsoleBrowserTest, BadAPIArgumentsRuntimeError) {
const StackTrace& stack_trace = GetStackTraceFromError(errors[0]);
ASSERT_EQ(1u, stack_trace.size());
CheckStackFrame(stack_trace[0],
- kSchemaUtils,
+ schema_utils_str,
kAnonymousFunction);
}
« no previous file with comments | « no previous file | chrome/renderer/extensions/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698