Source/WebCore: Web Inspector: extracting NetworkRequest from Resource (step 2)
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2012 13:12:48 +0000 (13:12 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2012 13:12:48 +0000 (13:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83773

Reviewed by Yury Semikhatsky.

This step moves request-related views from being resource-based to request-based.
See https://bugs.webkit.org/show_bug.cgi?id=61363 for the meta bug.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/ContentProviders.js:
(WebInspector.ResourceContentProvider):
(WebInspector.ResourceContentProvider.prototype.requestContent):
(WebInspector.ResourceContentProvider.prototype.searchInContent):
* inspector/front-end/NetworkItemView.js:
(WebInspector.NetworkItemView):
(WebInspector.RequestContentView):
(WebInspector.RequestContentView.prototype._ensureInnerViewShown):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._showPopover):
* inspector/front-end/NetworkRequest.js:
(WebInspector.NetworkRequest.prototype.resource):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode.prototype._createContentProvider):
* inspector/front-end/RequestCookiesView.js: Renamed from Source/WebCore/inspector/front-end/ResourceCookiesView.js.
(WebInspector.RequestCookiesView):
* inspector/front-end/RequestHTMLView.js: Renamed from Source/WebCore/inspector/front-end/ResourceHTMLView.js.
(WebInspector.RequestHTMLView):
(WebInspector.RequestHTMLView.prototype._createIFrame):
* inspector/front-end/RequestHeadersView.js: Renamed from Source/WebCore/inspector/front-end/ResourceHeadersView.js.
(WebInspector.RequestHeadersView):
* inspector/front-end/RequestJSONView.js: Renamed from Source/WebCore/inspector/front-end/ResourceJSONView.js.
(WebInspector.RequestJSONView):
(WebInspector.RequestJSONView.parseJSON.WebInspector.RequestJSONView.parseJSONP):
* inspector/front-end/RequestPreviewView.js: Renamed from Source/WebCore/inspector/front-end/ResourcePreviewView.js.
(WebInspector.RequestPreviewView):
(WebInspector.RequestPreviewView.prototype.contentLoaded):
(WebInspector.RequestPreviewView.prototype._createPreviewView):
* inspector/front-end/RequestResponseView.js: Renamed from Source/WebCore/inspector/front-end/ResourceResponseView.js.
(WebInspector.RequestResponseView):
(WebInspector.RequestResponseView.prototype.get sourceView):
(WebInspector.RequestResponseView.prototype.contentLoaded):
* inspector/front-end/RequestTimingView.js: Renamed from Source/WebCore/inspector/front-end/ResourceTimingView.js.
(WebInspector.RequestTimingView):
(WebInspector.RequestTimingView.prototype._refresh):
* inspector/front-end/RequestView.js: Copied from Source/WebCore/inspector/front-end/NetworkRequest.js.
(WebInspector.RequestView):
(WebInspector.RequestView.prototype.hasContent):
(WebInspector.RequestView.hasTextContent):
(WebInspector.RequestView.nonSourceViewForRequest):
* inspector/front-end/ResourceView.js:
(WebInspector.ResourceSourceFrame._canonicalMIMEType):
(WebInspector.ResourceSourceFrame._mimeTypeForResource):
(WebInspector.ResourceSourceFrame.prototype.requestContent):
(WebInspector.ResourceSourceFrame.prototype._contentChanged):
(WebInspector.ResourceRevisionSourceFrame.prototype.requestContent):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

Tools: Web Inspector: Disabling Inspector causes build failure on Windows
https://bugs.webkit.org/show_bug.cgi?id=83557

Patch by Vivek Galatage <vivekgalatage@gmail.com> on 2012-04-11
Reviewed by Pavel Feldman.

The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
This change brings all such API calls under the guard.

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(LayoutTestController):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):

LayoutTests: Web Inspector: extracting NetworkRequest from Resource (step 2)
https://bugs.webkit.org/show_bug.cgi?id=83773

Reviewed by Yury Semikhatsky.

* http/tests/inspector/network/network-request-revision-content.html:
* http/tests/inspector/network/request-parameters-decoding.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/network-preview-json-expected.txt
LayoutTests/http/tests/inspector/network/network-preview-json.html
LayoutTests/http/tests/inspector/network/network-request-revision-content.html
LayoutTests/http/tests/inspector/network/request-parameters-decoding.html
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/inspector/compile-front-end.py
Source/WebCore/inspector/front-end/ContentProviders.js
Source/WebCore/inspector/front-end/NetworkItemView.js
Source/WebCore/inspector/front-end/NetworkPanel.js
Source/WebCore/inspector/front-end/RawSourceCode.js
Source/WebCore/inspector/front-end/RequestCookiesView.js [moved from Source/WebCore/inspector/front-end/ResourceCookiesView.js with 94% similarity]
Source/WebCore/inspector/front-end/RequestHTMLView.js [moved from Source/WebCore/inspector/front-end/ResourceHTMLView.js with 85% similarity]
Source/WebCore/inspector/front-end/RequestHeadersView.js [moved from Source/WebCore/inspector/front-end/ResourceHeadersView.js with 98% similarity]
Source/WebCore/inspector/front-end/RequestJSONView.js [moved from Source/WebCore/inspector/front-end/ResourceJSONView.js with 88% similarity]
Source/WebCore/inspector/front-end/RequestPreviewView.js [moved from Source/WebCore/inspector/front-end/ResourcePreviewView.js with 67% similarity]
Source/WebCore/inspector/front-end/RequestResponseView.js [moved from Source/WebCore/inspector/front-end/ResourceResponseView.js with 81% similarity]
Source/WebCore/inspector/front-end/RequestTimingView.js [moved from Source/WebCore/inspector/front-end/ResourceTimingView.js with 94% similarity]
Source/WebCore/inspector/front-end/RequestView.js [new file with mode: 0644]
Source/WebCore/inspector/front-end/Resource.js
Source/WebCore/inspector/front-end/ResourceView.js
Source/WebCore/inspector/front-end/WebKit.qrc
Source/WebCore/inspector/front-end/inspector.html
Tools/ChangeLog

index fb1c068..49878b2 100644 (file)
@@ -1,3 +1,13 @@
+2012-04-12  Pavel Feldman  <pfeldman@chromium.org>
+
+        Web Inspector: extracting NetworkRequest from Resource (step 2)
+        https://bugs.webkit.org/show_bug.cgi?id=83773
+
+        Reviewed by Yury Semikhatsky.
+
+        * http/tests/inspector/network/network-request-revision-content.html:
+        * http/tests/inspector/network/request-parameters-decoding.html:
+
 2012-04-12  Zalan Bujtas  <zbujtas@gmail.com>
 
         [Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset.
index ee7c5bd..bab56cc 100644 (file)
@@ -1,3 +1,3 @@
-Tests ResourceJSONView ability to parse JSON passed in XHR, JSONP
+Tests RequestJSONView ability to parse JSON passed in XHR, JSONP
 
 Bug 65559
index 912da0b..44f4c09 100644 (file)
@@ -8,37 +8,37 @@ function test()
     var testData;
 
     testData = "while(1);";
-    InspectorTest.assertTrue(!WebInspector.ResourceJSONView.parseJSON(testData), "Should not be able to parse \"" + testData + "\".");
+    InspectorTest.assertTrue(!WebInspector.RequestJSONView.parseJSON(testData), "Should not be able to parse \"" + testData + "\".");
 
     testData = "{\"name\": \"value\"";
-    InspectorTest.assertTrue(!WebInspector.ResourceJSONView.parseJSON(testData), "Should not be able to parse \"" + testData + "\".");
+    InspectorTest.assertTrue(!WebInspector.RequestJSONView.parseJSON(testData), "Should not be able to parse \"" + testData + "\".");
 
     testData = "{\"name\": \"value\"}";
-    var parsedJSON = WebInspector.ResourceJSONView.parseJSON(testData);
+    var parsedJSON = WebInspector.RequestJSONView.parseJSON(testData);
     InspectorTest.assertEquals(parsedJSON.prefix, "");
     InspectorTest.assertEquals(parsedJSON.data.name, "value");
     InspectorTest.assertEquals(parsedJSON.suffix, "");
 
     testData = "while(1); {\"name\": \"value\"}";
-    parsedJSON = WebInspector.ResourceJSONView.parseJSON(testData);
+    parsedJSON = WebInspector.RequestJSONView.parseJSON(testData);
     InspectorTest.assertEquals(parsedJSON.prefix, "while(1); ");
     InspectorTest.assertEquals(parsedJSON.data.name, "value");
     InspectorTest.assertEquals(parsedJSON.suffix, "");
 
     testData = "func({)";
-    InspectorTest.assertTrue(!WebInspector.ResourceJSONView.parseJSONP(testData), "Should not be able to parse \"" + testData + "\".");
+    InspectorTest.assertTrue(!WebInspector.RequestJSONView.parseJSONP(testData), "Should not be able to parse \"" + testData + "\".");
 
     testData = "func){(";
-    InspectorTest.assertTrue(!WebInspector.ResourceJSONView.parseJSONP(testData), "Should not be able to parse \"" + testData + "\".");
+    InspectorTest.assertTrue(!WebInspector.RequestJSONView.parseJSONP(testData), "Should not be able to parse \"" + testData + "\".");
 
     testData = "func({\"name\": \"value\"}";
-    InspectorTest.assertTrue(!WebInspector.ResourceJSONView.parseJSONP(testData), "Should not be able to parse \"" + testData + "\".");
+    InspectorTest.assertTrue(!WebInspector.RequestJSONView.parseJSONP(testData), "Should not be able to parse \"" + testData + "\".");
 
     testData = "func{\"name\": \"value\"})";
-    InspectorTest.assertTrue(!WebInspector.ResourceJSONView.parseJSONP(testData), "Should not be able to parse \"" + testData + "\".");
+    InspectorTest.assertTrue(!WebInspector.RequestJSONView.parseJSONP(testData), "Should not be able to parse \"" + testData + "\".");
 
     testData = "func({\"name\": \"value\"})";
-    var parsedJSONP = WebInspector.ResourceJSONView.parseJSONP(testData);
+    var parsedJSONP = WebInspector.RequestJSONView.parseJSONP(testData);
     InspectorTest.assertEquals(parsedJSONP.prefix, "func(");
     InspectorTest.assertEquals(parsedJSONP.data.name, "value");
     InspectorTest.assertEquals(parsedJSONP.suffix, ")");
@@ -48,7 +48,7 @@ function test()
 </script>
 </head>
 <body onload="runTest()">
-<p>Tests ResourceJSONView ability to parse JSON passed in XHR, JSONP</p>
+<p>Tests RequestJSONView ability to parse JSON passed in XHR, JSONP</p>
 <a href="https://bugs.webkit.org/show_bug.cgi?id=65559">Bug 65559</a>
 </body>
 </html>
index 3cc0863..4bbfd00 100644 (file)
@@ -17,15 +17,17 @@ function test()
     function step2(msg)
     {
         var request = WebInspector.panels.network.requests[WebInspector.panels.network.requests.length - 1];
-        request.addRevision("");
-        request.history[0].requestContent(step3);
+        var resource = request.resource();
+        resource.addRevision("");
+        resource.history[0].requestContent(step3);
     }
 
     function step3()
     {
         var request = WebInspector.panels.network.requests[WebInspector.panels.network.requests.length - 1];
-        InspectorTest.addResult(request.url);
-        InspectorTest.addResult(request.content);
+        var resource = request.resource();
+        InspectorTest.addResult(resource.url);
+        InspectorTest.addResult(resource.content);
         InspectorTest.completeTest();
     }
 }
index d9b4ff1..35dfdd7 100644 (file)
@@ -6,7 +6,7 @@
 function test()
 {
     var value = "Test+%21%40%23%24%25%5E%26*%28%29_%2B+parameters.";
-    var parameterElement = WebInspector.ResourceHeadersView.prototype._formatParameter(value, "", true);
+    var parameterElement = WebInspector.RequestHeadersView.prototype._formatParameter(value, "", true);
     InspectorTest.addResult("Original value: " + value);
     InspectorTest.addResult("Decoded value: " + parameterElement.textContent);
     InspectorTest.completeTest();
index 0e30b24..a22ef1b 100644 (file)
@@ -1,3 +1,65 @@
+2012-04-12  Pavel Feldman  <pfeldman@chromium.org>
+
+        Web Inspector: extracting NetworkRequest from Resource (step 2)
+        https://bugs.webkit.org/show_bug.cgi?id=83773
+
+        Reviewed by Yury Semikhatsky.
+
+        This step moves request-related views from being resource-based to request-based.
+        See https://bugs.webkit.org/show_bug.cgi?id=61363 for the meta bug.
+
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * inspector/compile-front-end.py:
+        * inspector/front-end/ContentProviders.js:
+        (WebInspector.ResourceContentProvider):
+        (WebInspector.ResourceContentProvider.prototype.requestContent):
+        (WebInspector.ResourceContentProvider.prototype.searchInContent):
+        * inspector/front-end/NetworkItemView.js:
+        (WebInspector.NetworkItemView):
+        (WebInspector.RequestContentView):
+        (WebInspector.RequestContentView.prototype._ensureInnerViewShown):
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkLogView.prototype._showPopover):
+        * inspector/front-end/NetworkRequest.js:
+        (WebInspector.NetworkRequest.prototype.resource):
+        * inspector/front-end/RawSourceCode.js:
+        (WebInspector.RawSourceCode.prototype._createContentProvider):
+        * inspector/front-end/RequestCookiesView.js: Renamed from Source/WebCore/inspector/front-end/ResourceCookiesView.js.
+        (WebInspector.RequestCookiesView):
+        * inspector/front-end/RequestHTMLView.js: Renamed from Source/WebCore/inspector/front-end/ResourceHTMLView.js.
+        (WebInspector.RequestHTMLView):
+        (WebInspector.RequestHTMLView.prototype._createIFrame):
+        * inspector/front-end/RequestHeadersView.js: Renamed from Source/WebCore/inspector/front-end/ResourceHeadersView.js.
+        (WebInspector.RequestHeadersView):
+        * inspector/front-end/RequestJSONView.js: Renamed from Source/WebCore/inspector/front-end/ResourceJSONView.js.
+        (WebInspector.RequestJSONView):
+        (WebInspector.RequestJSONView.parseJSON.WebInspector.RequestJSONView.parseJSONP):
+        * inspector/front-end/RequestPreviewView.js: Renamed from Source/WebCore/inspector/front-end/ResourcePreviewView.js.
+        (WebInspector.RequestPreviewView):
+        (WebInspector.RequestPreviewView.prototype.contentLoaded):
+        (WebInspector.RequestPreviewView.prototype._createPreviewView):
+        * inspector/front-end/RequestResponseView.js: Renamed from Source/WebCore/inspector/front-end/ResourceResponseView.js.
+        (WebInspector.RequestResponseView):
+        (WebInspector.RequestResponseView.prototype.get sourceView):
+        (WebInspector.RequestResponseView.prototype.contentLoaded):
+        * inspector/front-end/RequestTimingView.js: Renamed from Source/WebCore/inspector/front-end/ResourceTimingView.js.
+        (WebInspector.RequestTimingView):
+        (WebInspector.RequestTimingView.prototype._refresh):
+        * inspector/front-end/RequestView.js: Copied from Source/WebCore/inspector/front-end/NetworkRequest.js.
+        (WebInspector.RequestView):
+        (WebInspector.RequestView.prototype.hasContent):
+        (WebInspector.RequestView.hasTextContent):
+        (WebInspector.RequestView.nonSourceViewForRequest):
+        * inspector/front-end/ResourceView.js:
+        (WebInspector.ResourceSourceFrame._canonicalMIMEType):
+        (WebInspector.ResourceSourceFrame._mimeTypeForResource):
+        (WebInspector.ResourceSourceFrame.prototype.requestContent):
+        (WebInspector.ResourceSourceFrame.prototype._contentChanged):
+        (WebInspector.ResourceRevisionSourceFrame.prototype.requestContent):
+        * inspector/front-end/WebKit.qrc:
+        * inspector/front-end/inspector.html:
+
 2012-04-12  Yury Semikhatsky  <yurys@chromium.org>
 
         Unreviewed. Fix a couple of compiler annotations after r113963.
index a9311ec..674cb4d 100644 (file)
             'inspector/front-end/PropertiesSidebarPane.js',
             'inspector/front-end/RawSourceCode.js',
             'inspector/front-end/RemoteObject.js',
+            'inspector/front-end/RequestCookiesView.js',
+            'inspector/front-end/RequestHeadersView.js',
+            'inspector/front-end/RequestJSONView.js',
+            'inspector/front-end/RequestHTMLView.js',
+            'inspector/front-end/RequestPreviewView.js',
+            'inspector/front-end/RequestResponseView.js',
+            'inspector/front-end/RequestTimingView.js',
+            'inspector/front-end/RequestView.js',
             'inspector/front-end/Resource.js',
-            'inspector/front-end/ResourceCookiesView.js',
-            'inspector/front-end/ResourceHeadersView.js',
-            'inspector/front-end/ResourceJSONView.js',
-            'inspector/front-end/ResourceHTMLView.js',
-            'inspector/front-end/ResourceResponseView.js',
             'inspector/front-end/ResourceScriptMapping.js',
-            'inspector/front-end/ResourceTimingView.js',
             'inspector/front-end/ResourceTreeModel.js',
             'inspector/front-end/ResourceType.js',
             'inspector/front-end/ResourceUtils.js',
             'inspector/front-end/ResourceView.js',
             'inspector/front-end/ResourcesPanel.js',
-            'inspector/front-end/ResourcePreviewView.js',
             'inspector/front-end/ScopeChainSidebarPane.js',
             'inspector/front-end/Script.js',
             'inspector/front-end/ScriptFormatter.js',
index 36861d2..b0abe7e 100755 (executable)
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\Resource.js"
+                                       RelativePath="..\inspector\front-end\RequestCookiesView.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourceCookiesView.js"
+                                       RelativePath="..\inspector\front-end\RequestHeadersView.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourceHeadersView.js"
+                                       RelativePath="..\inspector\front-end\RequestHTMLView.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourceHTMLView.js"
+                                       RelativePath="..\inspector\front-end\RequestJSONView.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourceJSONView.js"
+                                       RelativePath="..\inspector\front-end\RequestPreviewView.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourcePreviewView.js"
+                                       RelativePath="..\inspector\front-end\RequestResponseView.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourceResponseView.js"
+                                       RelativePath="..\inspector\front-end\RequestTimingView.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\resourcesPanel.css"
+                                       RelativePath="..\inspector\front-end\RequestView.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourcesPanel.js"
+                                       RelativePath="..\inspector\front-end\Resource.js"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourceScriptMapping.js"
+                                       RelativePath="..\inspector\front-end\resourcesPanel.css"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\inspector\front-end\ResourceTimingView.js"
+                                       RelativePath="..\inspector\front-end\ResourcesPanel.js"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\inspector\front-end\ResourceScriptMapping.js"
                                        >
                                </File>
                                <File
index 903aa82..dfa8987 100755 (executable)
@@ -175,13 +175,14 @@ modules = [
             "FontView.js",
             "ImageView.js",
             "NetworkItemView.js",
-            "ResourceCookiesView.js",
-            "ResourceHeadersView.js",
-            "ResourceHTMLView.js",
-            "ResourceJSONView.js",
-            "ResourcePreviewView.js",
-            "ResourceResponseView.js",
-            "ResourceTimingView.js",
+            "RequestCookiesView.js",
+            "RequestHeadersView.js",
+            "RequestHTMLView.js",
+            "RequestJSONView.js",
+            "RequestPreviewView.js",
+            "RequestResponseView.js",
+            "RequestTimingView.js",
+            "RequestView.js",
             "ResourceView.js",
             "NetworkPanel.js",
         ]
index c14a530..439f2c5 100644 (file)
@@ -205,12 +205,12 @@ WebInspector.ConcatenatedScriptsContentProvider.prototype.__proto__ = WebInspect
 /**
  * @constructor
  * @implements {WebInspector.ContentProvider}
- * @param {WebInspector.NetworkRequest} request
+ * @param {WebInspector.Resource} resource
  */
-WebInspector.ResourceContentProvider = function(request)
+WebInspector.ResourceContentProvider = function(resource)
 {
-    this._mimeType = request.type === WebInspector.resourceTypes.Script ? "text/javascript" : "text/html";
-    this._request = request;
+    this._mimeType = resource.type === WebInspector.resourceTypes.Script ? "text/javascript" : "text/html";
+    this._resource = resource;
 };
 
 WebInspector.ResourceContentProvider.prototype = {
@@ -223,7 +223,7 @@ WebInspector.ResourceContentProvider.prototype = {
         {
             callback(this._mimeType, content);
         }
-        this._request.requestContent(didRequestContent.bind(this));
+        this._resource.requestContent(didRequestContent.bind(this));
     },
 
     /**
@@ -234,7 +234,7 @@ WebInspector.ResourceContentProvider.prototype = {
      */
     searchInContent: function(query, caseSensitive, isRegex, callback)
     {
-        this._request.searchInContent(query, caseSensitive, isRegex, callback);
+        this._resource.searchInContent(query, caseSensitive, isRegex, callback);
     }
 }
 
index 9c9cac3..68e490c 100644 (file)
  */
 
 /**
- * @extends {WebInspector.TabbedPane}
  * @constructor
+ * @extends {WebInspector.TabbedPane}
+ * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.NetworkItemView = function(resource)
+WebInspector.NetworkItemView = function(request)
 {
     WebInspector.TabbedPane.call(this);
-
     this.element.addStyleClass("network-item-view");
 
-    var headersView = new WebInspector.ResourceHeadersView(resource.request);
+    var headersView = new WebInspector.RequestHeadersView(request);
     this.appendTab("headers", WebInspector.UIString("Headers"), headersView);
 
-    var responseView = new WebInspector.ResourceResponseView(resource);
-    var previewView = new WebInspector.ResourcePreviewView(resource, responseView);
+    var responseView = new WebInspector.RequestResponseView(request);
+    var previewView = new WebInspector.RequestPreviewView(request, responseView);
 
     this.appendTab("preview", WebInspector.UIString("Preview"), previewView);
     this.appendTab("response", WebInspector.UIString("Response"), responseView);
 
-    if (resource.requestCookies || resource.responseCookies) {
-        this._cookiesView = new WebInspector.ResourceCookiesView(resource.request);
+    if (request.requestCookies || request.responseCookies) {
+        this._cookiesView = new WebInspector.RequestCookiesView(request);
         this.appendTab("cookies", WebInspector.UIString("Cookies"), this._cookiesView);
     }
 
-    if (resource.timing) {
-        var timingView = new WebInspector.ResourceTimingView(resource.request);
+    if (request.timing) {
+        var timingView = new WebInspector.RequestTimingView(request);
         this.appendTab("timing", WebInspector.UIString("Timing"), timingView);
     }
 
@@ -92,15 +92,16 @@ WebInspector.NetworkItemView.prototype = {
 WebInspector.NetworkItemView.prototype.__proto__ = WebInspector.TabbedPane.prototype;
 
 /**
- * @extends {WebInspector.ResourceView}
  * @constructor
+ * @extends {WebInspector.RequestView}
+ * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.ResourceContentView = function(resource)
+WebInspector.RequestContentView = function(request)
 {
-    WebInspector.ResourceView.call(this, resource);
+    WebInspector.RequestView.call(this, request);
 }
 
-WebInspector.ResourceContentView.prototype = {
+WebInspector.RequestContentView.prototype = {
     hasContent: function()
     {
         return true;
@@ -133,7 +134,7 @@ WebInspector.ResourceContentView.prototype = {
             this.contentLoaded();
         }
 
-        this.resource.requestContent(callback.bind(this));
+        this.request.requestContent(callback.bind(this));
     },
 
     contentLoaded: function()
@@ -153,4 +154,4 @@ WebInspector.ResourceContentView.prototype = {
     }
 }
 
-WebInspector.ResourceContentView.prototype.__proto__ = WebInspector.ResourceView.prototype;
+WebInspector.RequestContentView.prototype.__proto__ = WebInspector.RequestView.prototype;
index c2dd0aa..3cba1da 100644 (file)
@@ -926,7 +926,7 @@ WebInspector.NetworkLogView.prototype = {
     _showPopover: function(anchor, popover)
     {
         var request = anchor.parentElement.request;
-        var tableElement = WebInspector.ResourceTimingView.createTimingTable(request);
+        var tableElement = WebInspector.RequestTimingView.createTimingTable(request);
         popover.show(tableElement, anchor);
     },
 
index 7f4b719..97b9cd6 100644 (file)
@@ -161,9 +161,8 @@ WebInspector.RawSourceCode.prototype = {
 
     _createContentProvider: function()
     {
-        if (this._request && this._request.finished) {
-            return new WebInspector.ResourceContentProvider(this._request);
-        }
+        if (this._request && this._request.finished)
+            return new WebInspector.ResourceContentProvider(this._request.resource());
         if (this._scripts.length === 1 && !this._scripts[0].lineOffset && !this._scripts[0].columnOffset)
             return new WebInspector.ScriptContentProvider(this._scripts[0]);
         return new WebInspector.ConcatenatedScriptsContentProvider(this._scripts);
@@ -33,7 +33,7 @@
  * @extends {WebInspector.View}
  * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.ResourceCookiesView = function(request)
+WebInspector.RequestCookiesView = function(request)
 {
     WebInspector.View.call(this);
     this.element.addStyleClass("resource-cookies-view");
@@ -44,7 +44,7 @@ WebInspector.ResourceCookiesView = function(request)
     request.addEventListener(WebInspector.NetworkRequest.Events.ResponseHeadersChanged, this._refreshCookies, this);
 }
 
-WebInspector.ResourceCookiesView.prototype = {
+WebInspector.RequestCookiesView.prototype = {
     wasShown: function()
     {
         if (!this._gotCookies) {
@@ -84,4 +84,4 @@ WebInspector.ResourceCookiesView.prototype = {
     }
 }
 
-WebInspector.ResourceCookiesView.prototype.__proto__ = WebInspector.View.prototype;
+WebInspector.RequestCookiesView.prototype.__proto__ = WebInspector.View.prototype;
 
 /**
  * @constructor
- * @extends {WebInspector.ResourceView}
+ * @extends {WebInspector.RequestView}
+ * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.ResourceHTMLView = function(resource)
+WebInspector.RequestHTMLView = function(request)
 {
-    WebInspector.ResourceView.call(this, resource);
+    WebInspector.RequestView.call(this, request);
     this.element.addStyleClass("html");
 }
 
-WebInspector.ResourceHTMLView.prototype = {
+WebInspector.RequestHTMLView.prototype = {
     hasContent: function()
     {
         return true;
@@ -63,8 +64,8 @@ WebInspector.ResourceHTMLView.prototype = {
         this.element.appendChild(iframe);
         iframe.setAttribute("sandbox", ""); // Forbid to run JavaScript and set unique origin.
 
-        iframe.contentDocument.body.innerHTML = this.resource.content;
+        iframe.contentDocument.body.innerHTML = this.request.content;
     }
 }
 
-WebInspector.ResourceHTMLView.prototype.__proto__ = WebInspector.ResourceView.prototype;
+WebInspector.RequestHTMLView.prototype.__proto__ = WebInspector.RequestView.prototype;
@@ -33,7 +33,7 @@
  * @extends {WebInspector.View}
  * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.ResourceHeadersView = function(request)
+WebInspector.RequestHeadersView = function(request)
 {
     WebInspector.View.call(this);
     this.registerRequiredCSS("resourceView.css");
@@ -111,7 +111,7 @@ WebInspector.ResourceHeadersView = function(request)
     this._refreshHTTPInformation();
 }
 
-WebInspector.ResourceHeadersView.prototype = {
+WebInspector.RequestHeadersView.prototype = {
     /**
      * @param {string} name
      * @param {string} value
@@ -410,4 +410,4 @@ WebInspector.ResourceHeadersView.prototype = {
     }
 }
 
-WebInspector.ResourceHeadersView.prototype.__proto__ = WebInspector.View.prototype;
+WebInspector.RequestHeadersView.prototype.__proto__ = WebInspector.View.prototype;
  */
 
 /**
- * @extends {WebInspector.ResourceView}
  * @constructor
+ * @extends {WebInspector.RequestView}
+ * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.ResourceJSONView = function(resource, parsedJSON)
+WebInspector.RequestJSONView = function(request, parsedJSON)
 {
-    WebInspector.ResourceView.call(this, resource);
+    WebInspector.RequestView.call(this, request);
     this._parsedJSON = parsedJSON;
     this.element.addStyleClass("json");
 }
 
-WebInspector.ResourceJSONView.parseJSON = function(text)
+WebInspector.RequestJSONView.parseJSON = function(text)
 {
     var prefix = "";
 
@@ -57,7 +58,7 @@ WebInspector.ResourceJSONView.parseJSON = function(text)
     }
 }
 
-WebInspector.ResourceJSONView.parseJSONP = function(text)
+WebInspector.RequestJSONView.parseJSONP = function(text)
 {
     // Taking everything between first and last parentheses
     var start = text.indexOf("(");
@@ -76,7 +77,7 @@ WebInspector.ResourceJSONView.parseJSONP = function(text)
     }
 }
 
-WebInspector.ResourceJSONView.prototype = {
+WebInspector.RequestJSONView.prototype = {
     hasContent: function()
     {
         return true;
@@ -102,7 +103,7 @@ WebInspector.ResourceJSONView.prototype = {
     }
 }
 
-WebInspector.ResourceJSONView.prototype.__proto__ = WebInspector.ResourceView.prototype;
+WebInspector.RequestJSONView.prototype.__proto__ = WebInspector.RequestView.prototype;
 
 /**
  * @constructor
  */
 
 /**
- * @extends {WebInspector.ResourceContentView}
  * @constructor
+ * @extends {WebInspector.RequestContentView}
+ * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.ResourcePreviewView = function(resource, responseView)
+WebInspector.RequestPreviewView = function(request, responseView)
 {
-    WebInspector.ResourceContentView.call(this, resource);
+    WebInspector.RequestContentView.call(this, request);
     this._responseView = responseView;
 }
 
-WebInspector.ResourcePreviewView.prototype = {
+WebInspector.RequestPreviewView.prototype = {
     contentLoaded: function()
     {
-        if (!this.resource.content) {
+        if (!this.request.content) {
             if (!this._emptyView) {
                 this._emptyView = this._createEmptyView();
                 this._emptyView.show(this.element);
@@ -67,29 +68,29 @@ WebInspector.ResourcePreviewView.prototype = {
 
     _createPreviewView: function()
     {
-        if (this.resource.hasErrorStatusCode() && this.resource.content)
-            return new WebInspector.ResourceHTMLView(this.resource);
+        if (this.request.hasErrorStatusCode() && this.request.content)
+            return new WebInspector.RequestHTMLView(this.request);
 
-        if (this.resource.type === WebInspector.resourceTypes.XHR && this.resource.content) {
-            var parsedJSON = WebInspector.ResourceJSONView.parseJSON(this.resource.content);
+        if (this.request.type === WebInspector.resourceTypes.XHR && this.request.content) {
+            var parsedJSON = WebInspector.RequestJSONView.parseJSON(this.request.content);
             if (parsedJSON)
-                return new WebInspector.ResourceJSONView(this.resource, parsedJSON);
+                return new WebInspector.RequestJSONView(this.request, parsedJSON);
         }
 
-        if (this.resource.content && this.resource.type === WebInspector.resourceTypes.Script && this.resource.mimeType === "application/json") {
-            var parsedJSONP = WebInspector.ResourceJSONView.parseJSONP(this.resource.content);
+        if (this.request.content && this.request.type === WebInspector.resourceTypes.Script && this.request.mimeType === "application/json") {
+            var parsedJSONP = WebInspector.RequestJSONView.parseJSONP(this.request.content);
             if (parsedJSONP)
-                return new WebInspector.ResourceJSONView(this.resource, parsedJSONP);
+                return new WebInspector.RequestJSONView(this.request, parsedJSONP);
         }
 
         if (this._responseView.sourceView)
             return this._responseView.sourceView;
 
-        if (this.resource.type === WebInspector.resourceTypes.Other)
+        if (this.request.type === WebInspector.resourceTypes.Other)
             return this._createEmptyView();
 
-        return WebInspector.ResourceView.nonSourceViewForResource(this.resource);
+        return WebInspector.RequestView.nonSourceViewForRequest(this.request);
     }
 }
 
-WebInspector.ResourcePreviewView.prototype.__proto__ = WebInspector.ResourceContentView.prototype;
+WebInspector.RequestPreviewView.prototype.__proto__ = WebInspector.RequestContentView.prototype;
  */
 
 /**
- * @extends {WebInspector.ResourceContentView}
  * @constructor
+ * @extends {WebInspector.RequestContentView}
+ * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.ResourceResponseView = function(resource)
+WebInspector.RequestResponseView = function(request)
 {
-    WebInspector.ResourceContentView.call(this, resource);
+    WebInspector.RequestContentView.call(this, request);
 }
 
-WebInspector.ResourceResponseView.prototype = {
+WebInspector.RequestResponseView.prototype = {
     get sourceView()
     {
-        if (!this._sourceView && WebInspector.ResourceView.hasTextContent(this.resource))
-            this._sourceView = new WebInspector.ResourceSourceFrame(this.resource);
+        if (!this._sourceView && WebInspector.RequestView.hasTextContent(this.request))
+            this._sourceView = new WebInspector.ResourceSourceFrame(this.request);
         return this._sourceView;
     },
 
     contentLoaded: function()
     {
-        if (!this.resource.content || !this.sourceView) {
+        if (!this.request.content || !this.sourceView) {
             if (!this._emptyView) {
                 this._emptyView = new WebInspector.EmptyView(WebInspector.UIString("This request has no response data available."));
                 this._emptyView.show(this.element);
@@ -65,4 +66,4 @@ WebInspector.ResourceResponseView.prototype = {
     }
 }
 
-WebInspector.ResourceResponseView.prototype.__proto__ = WebInspector.ResourceContentView.prototype;
+WebInspector.RequestResponseView.prototype.__proto__ = WebInspector.RequestContentView.prototype;
@@ -33,7 +33,7 @@
  * @extends {WebInspector.View}
  * @param {WebInspector.NetworkRequest} request
  */
-WebInspector.ResourceTimingView = function(request)
+WebInspector.RequestTimingView = function(request)
 {
     WebInspector.View.call(this);
     this.element.addStyleClass("resource-timing-view");
@@ -43,7 +43,7 @@ WebInspector.ResourceTimingView = function(request)
     request.addEventListener(WebInspector.NetworkRequest.Events.TimingChanged, this._refresh, this);
 }
 
-WebInspector.ResourceTimingView.prototype = {
+WebInspector.RequestTimingView.prototype = {
     wasShown: function()
     {
         if (!this._request.timing) {
@@ -68,12 +68,12 @@ WebInspector.ResourceTimingView.prototype = {
         if (this._tableElement)
             this._tableElement.parentElement.removeChild(this._tableElement);
 
-        this._tableElement = WebInspector.ResourceTimingView.createTimingTable(this._request);
+        this._tableElement = WebInspector.RequestTimingView.createTimingTable(this._request);
         this.element.appendChild(this._tableElement);
     }
 }
 
-WebInspector.ResourceTimingView.createTimingTable = function(request)
+WebInspector.RequestTimingView.createTimingTable = function(request)
 {
     var tableElement = document.createElement("table");
     var rows = [];
@@ -158,4 +158,4 @@ WebInspector.ResourceTimingView.createTimingTable = function(request)
     return tableElement;
 }
 
-WebInspector.ResourceTimingView.prototype.__proto__ = WebInspector.View.prototype;
+WebInspector.RequestTimingView.prototype.__proto__ = WebInspector.View.prototype;
diff --git a/Source/WebCore/inspector/front-end/RequestView.js b/Source/WebCore/inspector/front-end/RequestView.js
new file mode 100644 (file)
index 0000000..c05690f
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @constructor
+ * @extends {WebInspector.View}
+ * @param {WebInspector.NetworkRequest} request
+ */
+WebInspector.RequestView = function(request)
+{
+    WebInspector.View.call(this);
+    this.registerRequiredCSS("resourceView.css");
+
+    this.element.addStyleClass("resource-view");
+    this.request = request;
+}
+
+WebInspector.RequestView.prototype = {
+    hasContent: function()
+    {
+        return false;
+    }
+}
+
+WebInspector.RequestView.prototype.__proto__ = WebInspector.View.prototype;
+
+/**
+ * @param {WebInspector.NetworkRequest} request
+ */
+WebInspector.RequestView.hasTextContent = function(request)
+{
+    if (request.type.isTextType())
+        return true; 
+    if (request.type === WebInspector.resourceTypes.Other)
+        return request.content && !request.contentEncoded;
+    return false;
+}
+
+/**
+ * @param {WebInspector.NetworkRequest} request
+ */
+WebInspector.RequestView.nonSourceViewForRequest = function(request)
+{
+    switch (request.type) {
+    case WebInspector.resourceTypes.Image:
+        return new WebInspector.ImageView(request);
+    case WebInspector.resourceTypes.Font:
+        return new WebInspector.FontView(request);
+    default:
+        return new WebInspector.RequestView(request);
+    }
+}
index 8e5f458..03f456e 100644 (file)
@@ -171,6 +171,14 @@ WebInspector.Resource.prototype = {
     },
 
     /**
+     * @return {WebInspector.Resource}
+     */
+    resource: function()
+    {
+        return this;
+    },
+
+    /**
      * @type {string}
      */
     get url()
index 05dd276..b108f3c 100644 (file)
@@ -49,6 +49,9 @@ WebInspector.ResourceView.prototype = {
 
 WebInspector.ResourceView.prototype.__proto__ = WebInspector.View.prototype;
 
+/**
+ * @param {WebInspector.Resource} resource
+ */
 WebInspector.ResourceView.hasTextContent = function(resource)
 {
     if (resource.type.isTextType())
@@ -58,6 +61,9 @@ WebInspector.ResourceView.hasTextContent = function(resource)
     return false;
 }
 
+/**
+ * @param {WebInspector.Resource} resource
+ */
 WebInspector.ResourceView.nonSourceViewForResource = function(resource)
 {
     switch (resource.type) {
@@ -81,16 +87,20 @@ WebInspector.ResourceSourceFrame = function(resource)
     this._resource.addEventListener(WebInspector.Resource.Events.RevisionAdded, this._contentChanged, this);
 }
 
-//This is a map from resource.type to mime types
-//found in WebInspector.SourceTokenizer.Registry.
-WebInspector.ResourceSourceFrame.DefaultMIMETypeForResourceType = {
-    0: "text/html",
-    1: "text/css",
-    4: "text/javascript"
+WebInspector.ResourceSourceFrame._canonicalMIMEType = function(resource)
+{
+    var type = resource.type;
+    if (type === WebInspector.resourceTypes.Document)
+        return "text/html";
+    if (type === WebInspector.resourceTypes.Stylesheet)
+        return "text/css";
+    if (type === WebInspector.resourceTypes.Script)
+        return "text/javascript";
 }
 
-WebInspector.ResourceSourceFrame.mimeTypeForResource = function(resource) {
-    return WebInspector.ResourceSourceFrame.DefaultMIMETypeForResourceType[resource.type] || resource.mimeType;
+WebInspector.ResourceSourceFrame._mimeTypeForResource = function(resource)
+{
+    return WebInspector.ResourceSourceFrame._canonicalMIMEType(resource) || resource.mimeType;
 }
 
 WebInspector.ResourceSourceFrame.prototype = {
@@ -103,7 +113,7 @@ WebInspector.ResourceSourceFrame.prototype = {
     {
         function contentLoaded(text)
         {
-            var mimeType = WebInspector.ResourceSourceFrame.mimeTypeForResource(this.resource);
+            var mimeType = WebInspector.ResourceSourceFrame._mimeTypeForResource(this._resource);
             callback(mimeType, text);
         }
 
@@ -112,7 +122,7 @@ WebInspector.ResourceSourceFrame.prototype = {
 
     _contentChanged: function(event)
     {
-        this.setContent(WebInspector.ResourceSourceFrame.mimeTypeForResource[this._resource], this._resource.content);
+        this.setContent(WebInspector.ResourceSourceFrame._mimeTypeForResource[this._resource], this._resource.content);
     }
 }
 
@@ -204,7 +214,7 @@ WebInspector.ResourceRevisionSourceFrame.prototype = {
     {
         function contentLoaded(text)
         {
-            var mimeType = WebInspector.ResourceSourceFrame.mimeTypeForResource(this.resource);
+            var mimeType = WebInspector.ResourceSourceFrame._mimeTypeForResource(this.resource);
             callback(mimeType, text);
         }
 
index 364b0b2..e4b50ed 100644 (file)
     <file>RawSourceCode.js</file>
     <file>RemoteObject.js</file>
     <file>Resource.js</file>
-    <file>ResourceCookiesView.js</file>
-    <file>ResourceJSONView.js</file>
-    <file>ResourceHTMLView.js</file>
-    <file>ResourceHeadersView.js</file>
-    <file>ResourcePreviewView.js</file>
-    <file>ResourceResponseView.js</file>
+    <file>RequestCookiesView.js</file>
+    <file>RequestJSONView.js</file>
+    <file>RequestHTMLView.js</file>
+    <file>RequestHeadersView.js</file>
+    <file>RequestPreviewView.js</file>
+    <file>RequestResponseView.js</file>
+    <file>RequestTimingView.js</file>
+    <file>RequestView.js</file>
     <file>ResourceScriptMapping.js</file>
-    <file>ResourceTimingView.js</file>
     <file>ResourceTreeModel.js</file>
     <file>ResourceType.js</file>
     <file>ResourceUtils.js</file>
index 2bf29eb..04c6405 100644 (file)
@@ -118,6 +118,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     <script type="text/javascript" src="TextViewer.js"></script>
     <script type="text/javascript" src="SourceFrame.js"></script>
     <script type="text/javascript" src="ResourceView.js"></script>
+    <script type="text/javascript" src="RequestView.js"></script>
     <script type="text/javascript" src="JavaScriptSourceFrame.js"></script>
     <script type="text/javascript" src="SplitView.js"></script>
     <script type="text/javascript" src="TabbedEditorContainer.js"></script>
@@ -138,13 +139,13 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     <script type="text/javascript" src="AuditFormatters.js"></script>
     <script type="text/javascript" src="NetworkItemView.js"></script>
     <script type="text/javascript" src="EmptyView.js"></script>
-    <script type="text/javascript" src="ResourceHeadersView.js"></script>
-    <script type="text/javascript" src="ResourceCookiesView.js"></script>
-    <script type="text/javascript" src="ResourceTimingView.js"></script>
-    <script type="text/javascript" src="ResourceJSONView.js"></script>
-    <script type="text/javascript" src="ResourceHTMLView.js"></script>
-    <script type="text/javascript" src="ResourceResponseView.js"></script>
-    <script type="text/javascript" src="ResourcePreviewView.js"></script>
+    <script type="text/javascript" src="RequestHeadersView.js"></script>
+    <script type="text/javascript" src="RequestCookiesView.js"></script>
+    <script type="text/javascript" src="RequestTimingView.js"></script>
+    <script type="text/javascript" src="RequestJSONView.js"></script>
+    <script type="text/javascript" src="RequestHTMLView.js"></script>
+    <script type="text/javascript" src="RequestResponseView.js"></script>
+    <script type="text/javascript" src="RequestPreviewView.js"></script>
     <script type="text/javascript" src="ScriptFormatter.js"></script>
     <script type="text/javascript" src="DOMSyntaxHighlighter.js"></script>
     <script type="text/javascript" src="TextEditorModel.js"></script>
index 465a494..99e237b 100644 (file)
@@ -1,3 +1,21 @@
+2012-04-11  Vivek Galatage  <vivekgalatage@gmail.com>
+
+        Web Inspector: Disabling Inspector causes build failure on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=83557
+
+        Reviewed by Pavel Feldman.
+
+        The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
+        This change brings all such API calls under the guard.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+        (LayoutTestController):
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::invoke):
+
 2012-04-11  Dirk Pranke  <dpranke@chromium.org>
 
         Fix regression introduced in r113927.