| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 this._messages = []; | 43 this._messages = []; |
| 44 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */ | 44 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */ |
| 45 this._messageByExceptionId = new Map(); | 45 this._messageByExceptionId = new Map(); |
| 46 this._warnings = 0; | 46 this._warnings = 0; |
| 47 this._errors = 0; | 47 this._errors = 0; |
| 48 this._revokedErrors = 0; | 48 this._revokedErrors = 0; |
| 49 this._logAgent = logAgent; | 49 this._logAgent = logAgent; |
| 50 if (this._logAgent) { | 50 if (this._logAgent) { |
| 51 target.registerLogDispatcher(new WebInspector.LogDispatcher(this)); | 51 target.registerLogDispatcher(new WebInspector.LogDispatcher(this)); |
| 52 this._logAgent.enable(); | 52 this._logAgent.enable(); |
| 53 if (!InspectorFrontendHost.isUnderTest()) | |
| 54 this._logAgent.setReportViolationsEnabled(true); | |
| 55 } | 53 } |
| 56 } | 54 } |
| 57 | 55 |
| 58 /** | 56 /** |
| 59 * @param {!WebInspector.ExecutionContext} executionContext | 57 * @param {!WebInspector.ExecutionContext} executionContext |
| 60 * @param {string} text | 58 * @param {string} text |
| 61 * @param {boolean=} useCommandLineAPI | 59 * @param {boolean=} useCommandLineAPI |
| 62 */ | 60 */ |
| 63 static evaluateCommandInConsole(executionContext, text, useCommandLineAPI) { | 61 static evaluateCommandInConsole(executionContext, text, useCommandLineAPI) { |
| 64 var target = executionContext.target(); | 62 var target = executionContext.target(); |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 WebInspector.ConsoleMessage.MessageSource = { | 487 WebInspector.ConsoleMessage.MessageSource = { |
| 490 XML: 'xml', | 488 XML: 'xml', |
| 491 JS: 'javascript', | 489 JS: 'javascript', |
| 492 Network: 'network', | 490 Network: 'network', |
| 493 ConsoleAPI: 'console-api', | 491 ConsoleAPI: 'console-api', |
| 494 Storage: 'storage', | 492 Storage: 'storage', |
| 495 AppCache: 'appcache', | 493 AppCache: 'appcache', |
| 496 Rendering: 'rendering', | 494 Rendering: 'rendering', |
| 497 CSS: 'css', | 495 CSS: 'css', |
| 498 Security: 'security', | 496 Security: 'security', |
| 499 Violation: 'violation', | |
| 500 Other: 'other', | 497 Other: 'other', |
| 501 Deprecation: 'deprecation', | 498 Deprecation: 'deprecation', |
| 502 Worker: 'worker' | 499 Worker: 'worker' |
| 503 }; | 500 }; |
| 504 | 501 |
| 505 /** | 502 /** |
| 506 * @enum {string} | 503 * @enum {string} |
| 507 */ | 504 */ |
| 508 WebInspector.ConsoleMessage.MessageType = { | 505 WebInspector.ConsoleMessage.MessageType = { |
| 509 Log: 'log', | 506 Log: 'log', |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 */ | 634 */ |
| 638 _commandEvaluated(event) { | 635 _commandEvaluated(event) { |
| 639 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvalua
ted, event.data); | 636 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvalua
ted, event.data); |
| 640 } | 637 } |
| 641 }; | 638 }; |
| 642 | 639 |
| 643 /** | 640 /** |
| 644 * @type {!WebInspector.MultitargetConsoleModel} | 641 * @type {!WebInspector.MultitargetConsoleModel} |
| 645 */ | 642 */ |
| 646 WebInspector.multitargetConsoleModel; | 643 WebInspector.multitargetConsoleModel; |
| OLD | NEW |