[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
caseq at chromium.org
caseq at chromium.org
Wed Dec 22 14:01:23 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 8d9736fc3cfe8e0be62149e82cca19e5950e7732
Author: caseq at chromium.org <caseq at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 1 13:43:02 2010 +0000
2010-10-01 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Extensions API] expose page load events timings
Added webInspector.resources.getPageTimings()
https://bugs.webkit.org/show_bug.cgi?id=45954
* inspector/front-end/ExtensionAPI.js:
(WebInspector.injectedExtensionAPI.Resources.prototype):
(WebInspector.injectedExtensionAPI.Resources.prototype.getPageTimings):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer):
(WebInspector.ExtensionServer.prototype._onGetPageTimings):
* inspector/front-end/HAREntry.js: Return page event timings as -1 if start or event time unknown.
(WebInspector.HARLog.prototype._buildPages):
(WebInspector.HARLog.prototype.buildMainResourceTimings):
(WebInspector.HARLog.prototype._convertResource):
(WebInspector.HARLog.prototype._pageEventTime):
2010-10-01 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Extensions API] expose page load events timings
Added webInspector.resources.getPageTimings()
https://bugs.webkit.org/show_bug.cgi?id=45954
* inspector/extensions-api-expected.txt:
* inspector/extensions-resources-expected.txt:
* inspector/extensions-resources.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5cc426b..9668b36 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-01 Andrey Kosyakov <caseq at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Extensions API] expose page load events timings
+ Added webInspector.resources.getPageTimings()
+ https://bugs.webkit.org/show_bug.cgi?id=45954
+
+ * inspector/extensions-api-expected.txt:
+ * inspector/extensions-resources-expected.txt:
+ * inspector/extensions-resources.html:
+
2010-10-01 Adam Roben <aroben at apple.com>
Remove the fixed test from the Skipped file, too
diff --git a/LayoutTests/inspector/extensions-api-expected.txt b/LayoutTests/inspector/extensions-api-expected.txt
index 95d3a26..fda0842 100644
--- a/LayoutTests/inspector/extensions-api-expected.txt
+++ b/LayoutTests/inspector/extensions-api-expected.txt
@@ -59,6 +59,7 @@ RUNNING TEST: extension_testAPI
}
getAll : <function>
get : <function>
+ getPageTimings : <function>
}
onReset : {
addListener : <function>
diff --git a/LayoutTests/inspector/extensions-resources-expected.txt b/LayoutTests/inspector/extensions-resources-expected.txt
index 029cbb8..179d3cc 100644
--- a/LayoutTests/inspector/extensions-resources-expected.txt
+++ b/LayoutTests/inspector/extensions-resources-expected.txt
@@ -15,6 +15,12 @@ resource: .../inspector/resources/audits-style1.css, type: stylesheet
resource: .../inspector/resources/missing-image.png, type: other
RUNNING TEST: extension_testGetInvalidResource
Attempted to retrieve invalid resource: {"code":"E_NOTFOUND","description":"Object not found: %s","details":[2128506],"isError":true}
+RUNNING TEST: extension_testGetPageTimings
+Got callback from getPageTimings, pageTimings dump follows
+{
+ onContentLoad : <number>
+ onLoad : <number>
+}
RUNNING TEST: extension_testResourceNotification
Resource finished: .../LayoutTests/inspector/extensions-resources.html
All tests done.
diff --git a/LayoutTests/inspector/extensions-resources.html b/LayoutTests/inspector/extensions-resources.html
index a6a15b4..da9878f 100755
--- a/LayoutTests/inspector/extensions-resources.html
+++ b/LayoutTests/inspector/extensions-resources.html
@@ -42,6 +42,16 @@ function extension_testGetInvalidResource(nextTest)
webInspector.resources.get(2128506, callbackAndNextTest(onResource, nextTest));
}
+function extension_testGetPageTimings(nextTest)
+{
+ function onTimings(result)
+ {
+ output("Got callback from getPageTimings, pageTimings dump follows");
+ dumpObject(result, { onContentLoad: 1, onLoad: 1 });
+ }
+ webInspector.resources.getPageTimings(callbackAndNextTest(onTimings, nextTest));
+}
+
function doXHR()
{
var xhr = new XMLHttpRequest();
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8d2b65c..4682cc8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-10-01 Andrey Kosyakov <caseq at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Extensions API] expose page load events timings
+ Added webInspector.resources.getPageTimings()
+
+ https://bugs.webkit.org/show_bug.cgi?id=45954
+
+ * inspector/front-end/ExtensionAPI.js:
+ (WebInspector.injectedExtensionAPI.Resources.prototype):
+ (WebInspector.injectedExtensionAPI.Resources.prototype.getPageTimings):
+ * inspector/front-end/ExtensionServer.js:
+ (WebInspector.ExtensionServer):
+ (WebInspector.ExtensionServer.prototype._onGetPageTimings):
+ * inspector/front-end/HAREntry.js: Return page event timings as -1 if start or event time unknown.
+ (WebInspector.HARLog.prototype._buildPages):
+ (WebInspector.HARLog.prototype.buildMainResourceTimings):
+ (WebInspector.HARLog.prototype._convertResource):
+ (WebInspector.HARLog.prototype._pageEventTime):
+
2010-10-01 Patrick Gansterer <paroga at webkit.org>
Reviewed by Adam Roben.
diff --git a/WebCore/inspector/front-end/ExtensionAPI.js b/WebCore/inspector/front-end/ExtensionAPI.js
index 64f5482..9062126 100644
--- a/WebCore/inspector/front-end/ExtensionAPI.js
+++ b/WebCore/inspector/front-end/ExtensionAPI.js
@@ -123,6 +123,11 @@ Resources.prototype = {
get: function(id, callback)
{
return extensionServer.sendRequest({ command: "getResources", id: id }, callback);
+ },
+
+ getPageTimings: function(callback)
+ {
+ return extensionServer.sendRequest({ command: "getPageTimings" }, callback);
}
}
diff --git a/WebCore/inspector/front-end/ExtensionServer.js b/WebCore/inspector/front-end/ExtensionServer.js
index bdf3a25..c8a95a0 100644
--- a/WebCore/inspector/front-end/ExtensionServer.js
+++ b/WebCore/inspector/front-end/ExtensionServer.js
@@ -38,6 +38,7 @@ WebInspector.ExtensionServer = function()
this._registerHandler("subscribe", this._onSubscribe.bind(this));
this._registerHandler("unsubscribe", this._onUnsubscribe.bind(this));
this._registerHandler("getResources", this._onGetResources.bind(this));
+ this._registerHandler("getPageTimings", this._onGetPageTimings.bind(this));
this._registerHandler("createPanel", this._onCreatePanel.bind(this));
this._registerHandler("createSidebarPane", this._onCreateSidebar.bind(this));
this._registerHandler("log", this._onLog.bind(this));
@@ -265,6 +266,11 @@ WebInspector.ExtensionServer.prototype = {
return response;
},
+ _onGetPageTimings: function()
+ {
+ return (new WebInspector.HARLog()).buildMainResourceTimings();
+ },
+
_onAddAuditCategory: function(request)
{
var category = new WebInspector.ExtensionAuditCategory(request.id, request.displayName, request.ruleCount);
diff --git a/WebCore/inspector/front-end/HAREntry.js b/WebCore/inspector/front-end/HAREntry.js
index 85e4f59..2cf0740 100644
--- a/WebCore/inspector/front-end/HAREntry.js
+++ b/WebCore/inspector/front-end/HAREntry.js
@@ -192,23 +192,31 @@ WebInspector.HARLog.prototype = {
startedDateTime: new Date(WebInspector.mainResource.startTime * 1000),
id: WebInspector.mainResource.documentURL,
title: "",
- pageTimings: this._buildMainResourceTimings()
+ pageTimings: this.buildMainResourceTimings()
}
];
},
- _buildMainResourceTimings: function()
+ buildMainResourceTimings: function()
{
var resourcesPanel = WebInspector.panels.resources;
var startTime = WebInspector.mainResource.startTime;
return {
- onContentLoad: WebInspector.HAREntry._toMilliseconds(resourcesPanel.mainResourceDOMContentTime - startTime),
- onLoad: WebInspector.HAREntry._toMilliseconds(resourcesPanel.mainResourceLoadTime - startTime),
+ onContentLoad: this._pageEventTime(resourcesPanel.mainResourceDOMContentTime),
+ onLoad: this._pageEventTime(resourcesPanel.mainResourceLoadTime),
}
},
_convertResource: function(id)
{
return (new WebInspector.HAREntry(WebInspector.resources[id])).build();
+ },
+
+ _pageEventTime: function(time)
+ {
+ var startTime = WebInspector.mainResource.startTime;
+ if (time === -1 || startTime === -1)
+ return -1;
+ return WebInspector.HAREntry._toMilliseconds(time - startTime);
}
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list