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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/Connections.js

Issue 2522613003: DevTools: respect isUnderTest conditions in the browser tests. (Closed)
Patch Set: Created 4 years, 1 month 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 * @implements {InspectorBackendClass.Connection} 5 * @implements {InspectorBackendClass.Connection}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 SDK.MainConnection = class { 8 SDK.MainConnection = class {
9 /** 9 /**
10 * @param {!InspectorBackendClass.Connection.Params} params 10 * @param {!InspectorBackendClass.Connection.Params} params
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 this._onMessage.call(null, this._messageBuffer); 54 this._onMessage.call(null, this._messageBuffer);
55 this._messageBuffer = ''; 55 this._messageBuffer = '';
56 this._messageSize = 0; 56 this._messageSize = 0;
57 } 57 }
58 } 58 }
59 59
60 /** 60 /**
61 * @param {!Common.Event} event 61 * @param {!Common.Event} event
62 */ 62 */
63 _evaluateForTestInFrontend(event) { 63 _evaluateForTestInFrontend(event) {
64 if (!InspectorFrontendHost.isUnderTest()) 64 if (!Host.isUnderTest())
65 return; 65 return;
66 66
67 var callId = /** @type {number} */ (event.data['callId']); 67 var callId = /** @type {number} */ (event.data['callId']);
68 var script = /** @type {number} */ (event.data['script']); 68 var script = /** @type {number} */ (event.data['script']);
69 69
70 /** 70 /**
71 * @suppressGlobalPropertiesCheck 71 * @suppressGlobalPropertiesCheck
72 */ 72 */
73 function invokeMethod() { 73 function invokeMethod() {
74 try { 74 try {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 * @override 224 * @override
225 * @return {!Promise} 225 * @return {!Promise}
226 */ 226 */
227 disconnect() { 227 disconnect() {
228 this._onDisconnect.call(null, 'force disconnect'); 228 this._onDisconnect.call(null, 'force disconnect');
229 this._onDisconnect = null; 229 this._onDisconnect = null;
230 this._onMessage = null; 230 this._onMessage = null;
231 return Promise.resolve(); 231 return Promise.resolve();
232 } 232 }
233 }; 233 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698