Changeset 141547 in webkit
- Timestamp:
- Feb 1, 2013 12:19:35 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r141545 r141547 1 2013-02-01 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Use String.prototype.startsWith instead of String.prototype.indexOf when possible 4 https://bugs.webkit.org/show_bug.cgi?id=108575 5 6 Reviewed by Yury Semikhatsky. 7 8 * http/tests/inspector/console-cd-completions.html: 9 * http/tests/inspector/console-cd.html: 10 * http/tests/inspector/indexeddb/indexeddb-test.js: 11 (initialize_IndexedDBTest.InspectorTest._installIndexedDBSniffer.consoleMessageOverride): 12 (initialize_IndexedDBTest.InspectorTest._installIndexedDBSniffer): 13 * inspector/network-status-non-http.html: 14 1 15 2013-01-31 Aurimas Liutikas <aurimas@chromium.org> 2 16 -
trunk/LayoutTests/http/tests/inspector/console-cd-completions.html
r130119 r141547 11 11 var option = selector.firstChild; 12 12 while (option) { 13 if (option.textContent && option.textContent. indexOf("myIFrame") === 0)13 if (option.textContent && option.textContent.startsWith("myIFrame")) 14 14 break; 15 15 option = option.nextSibling; -
trunk/LayoutTests/http/tests/inspector/console-cd.html
r127412 r141547 12 12 var option = selector.firstChild; 13 13 while (option) { 14 if (option.textContent && option.textContent. indexOf("myIFrame") === 0)14 if (option.textContent && option.textContent.startsWith("myIFrame")) 15 15 break; 16 16 option = option.nextSibling; -
trunk/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js
r135365 r141547 54 54 { 55 55 var text = msg._messageText; 56 if ( text.indexOf(callbackIdPrefix) !== 0) {56 if (!text.startsWith(callbackIdPrefix)) { 57 57 InspectorTest.addConsoleSniffer(consoleMessageOverride, false); 58 58 return; -
trunk/LayoutTests/inspector/network-status-non-http.html
r115720 r141547 22 22 var outputStatus = status.stringValue; 23 23 // Truncate the status string on failure, since the description following "(failed)" is platform-dependent. 24 if (outputStatus. indexOf("(failed)") == 0)24 if (outputStatus.startsWith("(failed)")) 25 25 outputStatus = "(failed)"; 26 26 outputStrings.push(urlFragment + ": " + outputStatus); -
trunk/Source/WebCore/ChangeLog
r141545 r141547 1 2013-02-01 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Use String.prototype.startsWith instead of String.prototype.indexOf when possible 4 https://bugs.webkit.org/show_bug.cgi?id=108575 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/front-end/FileMapping.js: 9 (WebInspector.FileMapping.prototype._entryMatchesURL): 10 (WebInspector.FileMapping.prototype.urlForURI): 11 * inspector/front-end/FileSystemMapping.js: 12 (get WebInspector.FileSystemMappingImpl.prototype.fileForURI): 13 (get WebInspector.FileSystemMappingImpl.prototype.uriForPath): 14 1 15 2013-01-31 Aurimas Liutikas <aurimas@chromium.org> 2 16 -
trunk/Source/WebCore/inspector/front-end/FileMapping.js
r140124 r141547 50 50 _entryMatchesURL: function(entry, url) 51 51 { 52 return url. indexOf(entry.urlPrefix) === 0;52 return url.startsWith(entry.urlPrefix); 53 53 }, 54 54 … … 105 105 var entry = this._entries[i]; 106 106 var uriPrefix = this._entryURIPrefix(entry); 107 if (uriPrefix && uri. indexOf(uriPrefix) === 0)107 if (uriPrefix && uri.startsWith(uriPrefix)) 108 108 return entry.urlPrefix + uri.substring(uriPrefix.length); 109 109 } -
trunk/Source/WebCore/inspector/front-end/FileSystemMapping.js
r139978 r141547 165 165 for (var fileSystemPath in this._mappedNames) { 166 166 var uriPrefix = this._uriPrefixForMappedName(this._mappedNames[fileSystemPath]); 167 if (uri. indexOf(uriPrefix) === 0)167 if (uri.startsWith(uriPrefix)) 168 168 return new WebInspector.FileSystemMapping.FileDescriptor(fileSystemPath, "/" + uri.substring(uriPrefix.length)); 169 169 } … … 188 188 { 189 189 for (var fileSystemPath in this._mappedNames) { 190 if (path. indexOf(fileSystemPath) === 0) {190 if (path.startsWith(fileSystemPath)) { 191 191 var uriPrefix = this._uriPrefixForMappedName(this._mappedNames[fileSystemPath]); 192 192 var subPath = path.substring(fileSystemPath.length);
Note: See TracChangeset
for help on using the changeset viewer.