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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 switch (action) { | 241 switch (action) { |
242 case ACTION_NAVIGATE: { | 242 case ACTION_NAVIGATE: { |
243 ui_test_utils::NavigateToURL(browser(), GetTestURL()); | 243 ui_test_utils::NavigateToURL(browser(), GetTestURL()); |
244 break; | 244 break; |
245 } | 245 } |
246 case ACTION_BROWSER_ACTION: { | 246 case ACTION_BROWSER_ACTION: { |
247 ExtensionService* service = | 247 ExtensionService* service = |
248 extensions::ExtensionSystem::Get(profile())->extension_service(); | 248 extensions::ExtensionSystem::Get(profile())->extension_service(); |
249 service->toolbar_model()->ExecuteBrowserAction( | 249 service->toolbar_model()->ExecuteBrowserAction( |
250 *extension, browser(), NULL); | 250 *extension, browser(), NULL, true); |
251 break; | 251 break; |
252 } | 252 } |
253 case ACTION_NONE: | 253 case ACTION_NONE: |
254 break; | 254 break; |
255 default: | 255 default: |
256 NOTREACHED(); | 256 NOTREACHED(); |
257 } | 257 } |
258 | 258 |
259 observer.WaitForErrors(); | 259 observer.WaitForErrors(); |
260 | 260 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 518 |
519 const StackTrace& stack_trace = GetStackTraceFromError(errors[0]); | 519 const StackTrace& stack_trace = GetStackTraceFromError(errors[0]); |
520 ASSERT_EQ(1u, stack_trace.size()); | 520 ASSERT_EQ(1u, stack_trace.size()); |
521 CheckStackFrame(stack_trace[0], | 521 CheckStackFrame(stack_trace[0], |
522 script_url, | 522 script_url, |
523 kAnonymousFunction, | 523 kAnonymousFunction, |
524 5u, 1u); | 524 5u, 1u); |
525 } | 525 } |
526 | 526 |
527 } // namespace extensions | 527 } // namespace extensions |
OLD | NEW |