OLD | NEW |
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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 CheckStackFrame(stack_trace2[0], | 415 CheckStackFrame(stack_trace2[0], |
416 script_url, | 416 script_url, |
417 kAnonymousFunction, | 417 kAnonymousFunction, |
418 12u, | 418 12u, |
419 1u); | 419 1u); |
420 } | 420 } |
421 | 421 |
422 // Catch an error from a BrowserAction; this is more complex than a content | 422 // Catch an error from a BrowserAction; this is more complex than a content |
423 // script error, since browser actions are routed through our own code. | 423 // script error, since browser actions are routed through our own code. |
424 #if defined(OS_WIN) // Flakes on XP. http://crbug.com/517029 | 424 #if defined(OS_WIN) // Flakes on XP. http://crbug.com/517029 |
425 #define MAYBE_BrowserActionRuntimeError DISABLED_BrowserActionRuntimeError | 425 #define MAYBE_BrowserActionRuntimeError BrowserActionRuntimeError |
426 #else | 426 #else |
427 #define MAYBE_BrowserActionRuntimeError BrowserActionRuntimeError | 427 #define MAYBE_BrowserActionRuntimeError BrowserActionRuntimeError |
428 #endif | 428 #endif |
429 IN_PROC_BROWSER_TEST_F(ErrorConsoleBrowserTest, | 429 IN_PROC_BROWSER_TEST_F(ErrorConsoleBrowserTest, |
430 MAYBE_BrowserActionRuntimeError) { | 430 MAYBE_BrowserActionRuntimeError) { |
431 const Extension* extension = NULL; | 431 const Extension* extension = NULL; |
432 LoadExtensionAndCheckErrors( | 432 LoadExtensionAndCheckErrors( |
433 "browser_action_runtime_error", | 433 "browser_action_runtime_error", |
434 kNoFlags, | 434 kNoFlags, |
435 1u, // One error: A reference error from within the browser action. | 435 1u, // One error: A reference error from within the browser action. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 | 580 |
581 const StackTrace& stack_trace = GetStackTraceFromError(errors[0]); | 581 const StackTrace& stack_trace = GetStackTraceFromError(errors[0]); |
582 ASSERT_EQ(1u, stack_trace.size()); | 582 ASSERT_EQ(1u, stack_trace.size()); |
583 CheckStackFrame(stack_trace[0], | 583 CheckStackFrame(stack_trace[0], |
584 script_url, | 584 script_url, |
585 kAnonymousFunction, | 585 kAnonymousFunction, |
586 12u, 20u); | 586 12u, 20u); |
587 } | 587 } |
588 | 588 |
589 } // namespace extensions | 589 } // namespace extensions |
OLD | NEW |