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

Side by Side Diff: LayoutTests/http/tests/inspector/inspector-test.js

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 | « LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html ('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 var initialize_InspectorTest = function() { 1 var initialize_InspectorTest = function() {
2 2
3 var results = []; 3 var results = [];
4 var resultsSynchronized = false; 4 var resultsSynchronized = false;
5 5
6 function consoleOutputHook(messageType) 6 function consoleOutputHook(messageType)
7 { 7 {
8 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1)); 8 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1));
9 } 9 }
10 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 InspectorTest.addObject = function(object, customFormatters, prefix, firstLinePr efix) 183 InspectorTest.addObject = function(object, customFormatters, prefix, firstLinePr efix)
184 { 184 {
185 prefix = prefix || ""; 185 prefix = prefix || "";
186 firstLinePrefix = firstLinePrefix || prefix; 186 firstLinePrefix = firstLinePrefix || prefix;
187 InspectorTest.addResult(firstLinePrefix + "{"); 187 InspectorTest.addResult(firstLinePrefix + "{");
188 var propertyNames = Object.keys(object); 188 var propertyNames = Object.keys(object);
189 propertyNames.sort(); 189 propertyNames.sort();
190 for (var i = 0; i < propertyNames.length; ++i) { 190 for (var i = 0; i < propertyNames.length; ++i) {
191 var prop = propertyNames[i]; 191 var prop = propertyNames[i];
192 if (typeof object.hasOwnProperty === "function" && !object.hasOwnPropert y(prop)) 192 if (!object.hasOwnProperty(prop))
193 continue; 193 continue;
194 var prefixWithName = " " + prefix + prop + " : "; 194 var prefixWithName = " " + prefix + prop + " : ";
195 var propValue = object[prop]; 195 var propValue = object[prop];
196 if (customFormatters && customFormatters[prop]) { 196 if (customFormatters && customFormatters[prop]) {
197 var formatterName = customFormatters[prop]; 197 var formatterName = customFormatters[prop];
198 if (formatterName !== "skip") { 198 if (formatterName !== "skip") {
199 var formatter = InspectorTest.formatters[formatterName]; 199 var formatter = InspectorTest.formatters[formatterName];
200 InspectorTest.addResult(prefixWithName + formatter(propValue)); 200 InspectorTest.addResult(prefixWithName + formatter(propValue));
201 } 201 }
202 } else 202 } else
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 evaluateInWebInspector: function(callId, script) 845 evaluateInWebInspector: function(callId, script)
846 { 846 {
847 window.opener.postMessage(["evaluateInWebInspector", callId, script], "* "); 847 window.opener.postMessage(["evaluateInWebInspector", callId, script], "* ");
848 }, 848 },
849 849
850 display: function() { } 850 display: function() { }
851 } 851 }
852 852
853 if (!window.testRunner && window.opener) 853 if (!window.testRunner && window.opener)
854 window.testRunner = new StandaloneTestRunnerStub(); 854 window.testRunner = new StandaloneTestRunnerStub();
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698