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

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

Issue 2524913002: DevTools: expect length/size hints in descriptions with parenthesis (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return remoteObject.type; 63 return remoteObject.type;
64 } 64 }
65 65
66 /** 66 /**
67 * @param {!SDK.RemoteObject|!Protocol.Runtime.RemoteObject|!Protocol.Runtime. ObjectPreview} object 67 * @param {!SDK.RemoteObject|!Protocol.Runtime.RemoteObject|!Protocol.Runtime. ObjectPreview} object
68 * @return {number} 68 * @return {number}
69 */ 69 */
70 static arrayLength(object) { 70 static arrayLength(object) {
71 if (object.subtype !== 'array' && object.subtype !== 'typedarray') 71 if (object.subtype !== 'array' && object.subtype !== 'typedarray')
72 return 0; 72 return 0;
73 var matches = object.description.match(/\[([0-9]+)\]/); 73 var matches = object.description.match(/\[([0-9]+)\]/) || object.description .match(/\(([0-9]+)\)/);
74 if (!matches) 74 if (!matches)
75 return 0; 75 return 0;
76 return parseInt(matches[1], 10); 76 return parseInt(matches[1], 10);
77 } 77 }
78 78
79 /** 79 /**
80 * @param {!Protocol.Runtime.RemoteObject|!SDK.RemoteObject|number|string|bool ean|undefined|null} object 80 * @param {!Protocol.Runtime.RemoteObject|!SDK.RemoteObject|number|string|bool ean|undefined|null} object
81 * @return {!Protocol.Runtime.CallArgument} 81 * @return {!Protocol.Runtime.CallArgument}
82 */ 82 */
83 static toCallArgument(object) { 83 static toCallArgument(object) {
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 } 1414 }
1415 } 1415 }
1416 1416
1417 /** 1417 /**
1418 * @return {!SDK.RemoteObject} 1418 * @return {!SDK.RemoteObject}
1419 */ 1419 */
1420 object() { 1420 object() {
1421 return this._object; 1421 return this._object;
1422 } 1422 }
1423 }; 1423 };
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698