Commit d4c0590f authored by caseq@chromium.org's avatar caseq@chromium.org
Browse files

2011-01-18 Andrey Kosyakov <caseq@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: fail resource.requestContent() immediately for WebSocket resources
        Remove webInspector.resources.Types from test expectations.
        https://bugs.webkit.org/show_bug.cgi?id=52628

        * inspector/extensions-api-expected.txt:
2011-01-18  Andrey Kosyakov  <caseq@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: fail resource.requestContent() immediately for WebSocket resources
        https://bugs.webkit.org/show_bug.cgi?id=52628

        * English.lproj/localizedStrings.js: Rename WebSocket -> WebSockets in resource catetegories (rest are in plural, too)
        * inspector/front-end/ExtensionServer.js: Do not expose webInspector.resources.Types in extensions API (obsolete)
        (WebInspector.ExtensionServer.prototype._buildExtensionAPIInjectedScript):
        * inspector/front-end/Resource.js:
        (WebInspector.Resource.Type.toUIString): Remove ResourceType.Media as it's not used.
        (WebInspector.Resource.Type.toString): ditto.
        (WebInspector.Resource.prototype.requestContent): Fail immediately for WebSocket resources.
        * inspector/front-end/inspector.js: Rename WebSocket -> WebSockets in resource catetegories (rest are in plural, too)

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f5812287
2011-01-18 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: fail resource.requestContent() immediately for WebSocket resources
Remove webInspector.resources.Types from test expectations.
https://bugs.webkit.org/show_bug.cgi?id=52628
* inspector/extensions-api-expected.txt:
2011-01-18 Helder Correia <helder@sencha.com>
 
Reviewed by Dirk Schulze.
......
......@@ -39,17 +39,6 @@ RUNNING TEST: extension_testAPI
addListener : <function>
removeListener : <function>
}
Types : {
Document : "document"
Stylesheet : "stylesheet"
Image : "image"
Font : "font"
Script : "script"
XHR : "xhr"
Media : "media"
WebSocket : "websocket"
Other : "other"
}
getHAR : <function>
addRequestHeaders : <function>
}
......
2011-01-18 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: fail resource.requestContent() immediately for WebSocket resources
https://bugs.webkit.org/show_bug.cgi?id=52628
* English.lproj/localizedStrings.js: Rename WebSocket -> WebSockets in resource catetegories (rest are in plural, too)
* inspector/front-end/ExtensionServer.js: Do not expose webInspector.resources.Types in extensions API (obsolete)
(WebInspector.ExtensionServer.prototype._buildExtensionAPIInjectedScript):
* inspector/front-end/Resource.js:
(WebInspector.Resource.Type.toUIString): Remove ResourceType.Media as it's not used.
(WebInspector.Resource.Type.toString): ditto.
(WebInspector.Resource.prototype.requestContent): Fail immediately for WebSocket resources.
* inspector/front-end/inspector.js: Rename WebSocket -> WebSockets in resource catetegories (rest are in plural, too)
2011-01-18 Helder Correia <helder@sencha.com>
 
Reviewed by Dirk Schulze.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -396,7 +396,6 @@ WebInspector.ExtensionServer.prototype = {
"var apiPrivate = {};" +
"(" + WebInspector.commonExtensionSymbols.toString() + ")(apiPrivate);" +
"(" + WebInspector.injectedExtensionAPI.toString() + ").apply(this, arguments);" +
"webInspector.resources.Types = " + JSON.stringify(resourceTypes) + ";" +
platformAPI +
"})";
},
......
......@@ -44,7 +44,6 @@ WebInspector.Resource.Type = {
Font: 3,
Script: 4,
XHR: 5,
Media: 6,
WebSocket: 7,
Other: 8,
......@@ -68,8 +67,6 @@ WebInspector.Resource.Type = {
return WebInspector.UIString("Script");
case this.XHR:
return WebInspector.UIString("XHR");
case this.Media:
return WebInspector.UIString("Media");
case this.WebSocket:
return WebInspector.UIString("WebSocket");
case this.Other:
......@@ -95,8 +92,6 @@ WebInspector.Resource.Type = {
return "script";
case this.XHR:
return "xhr";
case this.Media:
return "media";
case this.WebSocket:
return "websocket";
case this.Other:
......@@ -669,6 +664,13 @@ WebInspector.Resource.prototype = {
requestContent: function(callback)
{
// We do not support content retrieval for WebSockets at the moment.
// Since WebSockets are potentially long-living, fail requests immediately
// to prevent caller blocking until resource is marked as finished.
if (this.type === WebInspector.Resource.Type.WebSocket) {
callback(null, null);
return;
}
if (this._content) {
callback(this._content, this._contentEncoded);
return;
......
......@@ -534,7 +534,7 @@ WebInspector.doLoadedDone = function()
scripts: new WebInspector.ResourceCategory("scripts", WebInspector.UIString("Scripts"), "rgb(255,121,0)"),
xhr: new WebInspector.ResourceCategory("xhr", WebInspector.UIString("XHR"), "rgb(231,231,10)"),
fonts: new WebInspector.ResourceCategory("fonts", WebInspector.UIString("Fonts"), "rgb(255,82,62)"),
websockets: new WebInspector.ResourceCategory("websockets", WebInspector.UIString("WebSocket"), "rgb(186,186,186)"), // FIXME: Decide the color.
websockets: new WebInspector.ResourceCategory("websockets", WebInspector.UIString("WebSockets"), "rgb(186,186,186)"), // FIXME: Decide the color.
other: new WebInspector.ResourceCategory("other", WebInspector.UIString("Other"), "rgb(186,186,186)")
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment