Changeset 136040 in webkit
- Timestamp:
- Nov 28, 2012, 12:12:38 PM (13 years ago)
- Location:
- branches/chromium/1312
- Files:
-
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/chromium/1312/LayoutTests/inspector/console/command-line-api-expected.txt
r131178 r136040 1 CONSOLE MESSAGE: line 102 0: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s")1 CONSOLE MESSAGE: line 1029: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s") 2 2 Tests that command line api works. 3 3 -
branches/chromium/1312/LayoutTests/inspector/console/command-line-api-inspect-expected.txt
r127266 r136040 15 15 WebInspector.inspect called with: Database 16 16 WebInspector.inspect's hints are: ["databaseId"] 17 inspect(db) = Database 17 inspect(db) = Database {version: "1.0", transaction: function, readTransaction: function, changeVersion: function} 18 18 19 19 Running: testRevealDatabase2 … … 22 22 WebInspector.inspect called with: Database 23 23 WebInspector.inspect's hints are: ["databaseId"] 24 inspect(db2) = Database 24 inspect(db2) = Database {version: "1.0", transaction: function, readTransaction: function, changeVersion: function} 25 25 26 26 Running: testRevealLocalStorage … … 29 29 WebInspector.inspect called with: Storage 30 30 WebInspector.inspect's hints are: ["domStorageId"] 31 inspect(localStorage) = Storage 31 inspect(localStorage) = Storage {} 32 32 33 33 Running: testRevealSessionStorage … … 36 36 WebInspector.inspect called with: Storage 37 37 WebInspector.inspect's hints are: ["domStorageId"] 38 inspect(sessionStorage) = Storage 38 inspect(sessionStorage) = Storage {} 39 39 -
branches/chromium/1312/LayoutTests/inspector/console/console-format-collections-expected.txt
r125975 r136040 28 28 NonArrayWithLength console-format-collections.html:44 29 29 Arguments[2] console-format-collections.html:51 30 [<select> ] console-format-collections.html:1531 console-format-collections.html:1932 [<option>, <option>, selectedIndex: 0 ] console-format-collections.html:2333 console-format-collections.html:2734 console-format-collections.html:3135 [<input>, <input> ] console-format-collections.html:3530 [<select>, item: function] console-format-collections.html:15 31 [<script>, <script>, <script>, item: function, namedItem: function] console-format-collections.html:19 32 [<option>, <option>, selectedIndex: 0, remove: function, add: function, item: function, namedItem: function] console-format-collections.html:23 33 [<html>, <head>, <script>, <script>, <script>, <body>, <p>, <div>, <form>, <select>, <option>, <option>, <input>, <input>, namedItem: function, tags: function, item: function] console-format-collections.html:27 34 [<select>, <input>, <input>, item: function, namedItem: function] console-format-collections.html:31 35 [<input>, <input>, item: function] console-format-collections.html:35 36 36 [1, Array[2]] console-format-collections.html:41 37 37 NonArrayWithLength {keys: Array[0]} console-format-collections.html:44 -
branches/chromium/1312/LayoutTests/inspector/console/console-format-expected.txt
r125284 r136040 49 49 CONSOLE MESSAGE: line 54: test,test2,,,test4,,,,, 50 50 CONSOLE MESSAGE: line 55: test,test2,,,test4,,,,, 51 CONSOLE MESSAGE: line 54: [object Object] 52 CONSOLE MESSAGE: line 55: [object Object] 53 CONSOLE MESSAGE: line 54: function () {} 54 CONSOLE MESSAGE: line 55: function () {} 55 CONSOLE MESSAGE: line 54: [object Object] 56 CONSOLE MESSAGE: line 55: [object Object] 51 57 Tests that console logging dumps proper messages. 52 58 … … 73 79 globals[3] 74 80 "test named "test"" 75 Error console-format.html:5481 Error {} console-format.html:54 76 82 [Error] console-format.html:55 77 83 globals[4] 78 Error 84 Error {} 79 85 <p id="p">Tests that console logging dumps proper messages.</p> console-format.html:54 80 86 [<p>] console-format.html:55 … … 82 88 <p id="p">Tests that console logging dumps proper messages.</p> 83 89 function () { return 1; } console-format.html:54 84 [function () { return 1; }] console-format.html:5590 [function] console-format.html:55 85 91 globals[6] 86 92 function () { return 1; } … … 88 94 return 2; 89 95 } console-format.html:54 90 [function () { 91 return 2; 92 }] console-format.html:55 96 [function] console-format.html:55 93 97 globals[7] 94 98 function () { … … 123 127 globals[14] 124 128 id="x""x" 125 Object console-format.html:54129 Object {} console-format.html:54 126 130 [Object] console-format.html:55 127 131 globals[15] 128 Object 132 Object {} 129 133 NaN console-format.html:54 130 134 [NaN] console-format.html:55 … … 143 147 globals[19] 144 148 ["test", "test2", undefined × 2, "test4", undefined × 5] 149 Object {} console-format.html:54 150 [Object] console-format.html:55 151 globals[20] 152 Object {} 153 [function] console-format.html:54 154 [Array[1]] console-format.html:55 155 globals[21] 156 [function () {}] 157 Object {bar: "bar", foo: "foo"} console-format.html:54 158 [Object] console-format.html:55 159 globals[22] 160 Object {bar: "bar", foo: "foo"} 145 161 -
branches/chromium/1312/LayoutTests/inspector/console/console-format.html
r125284 r136040 13 13 console.log('Message %s for %s', 'format', 'string'); 14 14 console.log('Object %o', {'foo' : 'bar' }); 15 var foo = { foo: "foo"}; 16 var bar = { bar: "bar" }; 17 bar.__proto__ = foo; 15 18 16 19 var array = ["test", "test2"]; array.length = 10; … … 44 47 regex1, regex2, str, str2, error, node, func, multilinefunc, num, linkify, 45 48 null, undefined, valuelessAttribute, valuedAttribute, existingAttribute, throwingLengthGetter, 46 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array 49 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array, {}, [function() {}], bar 47 50 ]; 48 51 -
branches/chromium/1312/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt
r125284 r136040 28 28 NonArrayWithLength console-format-collections.html:44 29 29 Arguments[2] console-format-collections.html:51 30 [<select> ] console-format-collections.html:1531 [<script>, <script>, <script> ] console-format-collections.html:1932 [<option>, <option>, selectedIndex: 0 ] console-format-collections.html:2333 [<html>, <head>, <script>, <script>, <script>, <body>, <p>, <div>, <form>, <select>, <option>, <option>, <input>, <input> ] console-format-collections.html:2734 [<select>, <input>, <input> ] console-format-collections.html:3135 [<input>, <input> ] console-format-collections.html:3530 [<select>, item: function] console-format-collections.html:15 31 [<script>, <script>, <script>, item: function, namedItem: function] console-format-collections.html:19 32 [<option>, <option>, selectedIndex: 0, add: function, remove: function, item: function, namedItem: function] console-format-collections.html:23 33 [<html>, <head>, <script>, <script>, <script>, <body>, <p>, <div>, <form>, <select>, <option>, <option>, <input>, <input>, item: function, namedItem: function, tags: function] console-format-collections.html:27 34 [<select>, <input>, <input>, item: function, namedItem: function] console-format-collections.html:31 35 [<input>, <input>, item: function] console-format-collections.html:35 36 36 [1, Array[2]] console-format-collections.html:41 37 37 NonArrayWithLength {keys: Array[0]} console-format-collections.html:44 -
branches/chromium/1312/Source/WebCore/inspector/InjectedScriptSource.js
r131178 r136040 804 804 _generatePreview: function(object) 805 805 { 806 var preview = {}; 806 this.preview = {}; 807 this.preview.lossless = true; 808 this.preview.overflow = false; 809 this.preview.properties = []; 810 807 811 var isArray = this.subtype === "array"; 808 812 var elementsToDump = isArray ? 100 : 5; 809 810 var propertyNames = Object.getOwnPropertyNames(/** @type {!Object} */(object)); 811 preview.lossless = true; 812 preview.overflow = false; 813 var properties = preview.properties = []; 814 813 814 for (var o = object; injectedScript._isDefined(o); o = o.__proto__) 815 this._generateProtoPreview(o, elementsToDump); 816 }, 817 818 /** 819 * @param {Object} object 820 * @param {number} elementsToDump 821 */ 822 _generateProtoPreview: function(object, elementsToDump) 823 { 824 var propertyNames = Object.keys(/** @type {!Object} */(object)); 815 825 try { 816 826 for (var i = 0; i < propertyNames.length; ++i) { 817 if ( properties.length >= elementsToDump) {818 preview.overflow = true;819 preview.lossless = false;827 if (this.preview.properties.length >= elementsToDump) { 828 this.preview.overflow = true; 829 this.preview.lossless = false; 820 830 break; 821 831 } 822 832 var name = propertyNames[i]; 823 if ( isArray&& name === "length")833 if (this.subtype === "array" && name === "length") 824 834 continue; 825 835 826 836 var descriptor = Object.getOwnPropertyDescriptor(/** @type {!Object} */(object), name); 827 837 if (!("value" in descriptor) || !descriptor.enumerable) { 828 preview.lossless = false;838 this.preview.lossless = false; 829 839 continue; 830 840 } … … 832 842 var value = descriptor.value; 833 843 if (value === null) { 834 properties.push({ name: name, type: "object", value: "null" });844 this.preview.properties.push({ name: name, type: "object", value: "null" }); 835 845 continue; 836 846 } … … 843 853 if (value.length > maxLength) { 844 854 value = this._abbreviateString(value, maxLength, true); 845 preview.lossless = false;855 this.preview.lossless = false; 846 856 } 847 857 value = "\"" + value.replace(/\n/g, "\u21B5") + "\""; 848 858 } 849 properties.push({ name: name, type: type, value: value + "" });859 this.preview.properties.push({ name: name, type: type, value: value + "" }); 850 860 continue; 851 861 } 852 862 853 preview.lossless = false; 854 855 if (type === "function") 856 continue; 863 this.preview.lossless = false; 857 864 858 865 var subtype = injectedScript._subtype(value); 859 var property = { name: name, type: type, value: this._abbreviateString(/** @type {string} */ (injectedScript._describe(value)), maxLength, subtype === "regexp") }; 866 var description = ""; 867 if (type !== "function") 868 description = this._abbreviateString(/** @type {string} */ (injectedScript._describe(value)), maxLength, subtype === "regexp"); 869 870 var property = { name: name, type: type, value: description }; 860 871 if (subtype) 861 872 property.subtype = subtype; 862 properties.push(property);873 this.preview.properties.push(property); 863 874 } 864 if (properties.length)865 this.preview = preview;866 875 } catch (e) { 867 876 } -
branches/chromium/1312/Source/WebCore/inspector/front-end/ConsoleMessage.js
r131448 r136040 325 325 else if (property.subtype === "regexp") 326 326 span.addStyleClass("console-formatted-string"); 327 } 328 span.textContent = property.value; 327 span.textContent = property.value; 328 } else if (property.type === "function") 329 span.textContent = "function"; 330 else 331 span.textContent = property.value; 329 332 } 330 333 if (preview.overflow)
Note:
See TracChangeset
for help on using the changeset viewer.