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

Side by Side Diff: LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html

Issue 486543003: Remove redundant checks for hasOwnProperty being defined (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/inspector-test.js » ('j') | 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) 2012 Samsung Electronics. All rights reserved. 2 Copyright (C) 2012 Samsung Electronics. 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 5 modification, are permitted provided that the following conditions
6 are met: 6 are met:
7 7
8 1. Redistributions of source code must retain the above copyright 8 1. 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 2. Redistributions in binary form must reproduce the above copyright 10 2. Redistributions in binary form must reproduce the above copyright
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 function dumpProperties(object, prefix, firstLinePrefix) 194 function dumpProperties(object, prefix, firstLinePrefix)
195 { 195 {
196 prefix = prefix || ""; 196 prefix = prefix || "";
197 firstLinePrefix = firstLinePrefix || prefix; 197 firstLinePrefix = firstLinePrefix || prefix;
198 lines.push(firstLinePrefix + "{"); 198 lines.push(firstLinePrefix + "{");
199 199
200 var propertyNames = Object.keys(object); 200 var propertyNames = Object.keys(object);
201 propertyNames.sort(); 201 propertyNames.sort();
202 for (var i = 0; i < propertyNames.length; ++i) { 202 for (var i = 0; i < propertyNames.length; ++i) {
203 var name = propertyNames[i]; 203 var name = propertyNames[i];
204 if (typeof object.hasOwnProperty === "function" && !object.hasOwnPro perty(name)) 204 if (!object.hasOwnProperty(name))
205 continue; 205 continue;
206 var prefixWithName = " " + prefix + name + " : "; 206 var prefixWithName = " " + prefix + name + " : ";
207 dumpValue(object[name], " " + prefix, prefixWithName); 207 dumpValue(object[name], " " + prefix, prefixWithName);
208 } 208 }
209 lines.push(prefix + "}"); 209 lines.push(prefix + "}");
210 } 210 }
211 211
212 function dumpItems(object, prefix, firstLinePrefix) 212 function dumpItems(object, prefix, firstLinePrefix)
213 { 213 {
214 prefix = prefix || ""; 214 prefix = prefix || "";
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 function enableInspectorAgent() 317 function enableInspectorAgent()
318 { 318 {
319 InspectorTest.sendCommand("Inspector.enable", { }); 319 InspectorTest.sendCommand("Inspector.enable", { });
320 } 320 }
321 321
322 window.addEventListener("load", enableInspectorAgent, false); 322 window.addEventListener("load", enableInspectorAgent, false);
323 323
324 </script> 324 </script>
325 </head> 325 </head>
326 </html> 326 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/inspector-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698