Bug 40026 - Web Inspector: add test for resource parameters.
Summary: Web Inspector: add test for resource parameters.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 14:16 PDT by Pavel Feldman
Modified: 2010-07-12 04:30 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed test. (4.49 KB, patch)
2010-06-01 14:23 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[PATCH] Same with missing data file. (4.94 KB, patch)
2010-06-01 14:26 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[PATCH] Rebased to HAR basis, brushed up rendering of objects. (39.98 KB, patch)
2010-06-02 06:12 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2010-06-01 14:16:59 PDT
Patch to follow.
Comment 1 Pavel Feldman 2010-06-01 14:23:14 PDT
Created attachment 57597 [details]
[PATCH] Proposed test.
Comment 2 Pavel Feldman 2010-06-01 14:26:22 PDT
Created attachment 57598 [details]
[PATCH] Same with missing data file.
Comment 3 Pavel Feldman 2010-06-02 06:12:00 PDT
Created attachment 57647 [details]
[PATCH] Rebased to HAR basis, brushed up rendering of objects.
Comment 4 Yury Semikhatsky 2010-06-02 06:29:55 PDT
Comment on attachment 57647 [details]
[PATCH] Rebased to HAR basis, brushed up rendering of objects.

LayoutTests/http/tests/inspector/inspector-test.js:63
 +          for (var i = 0; i < result.length; ++i)
Would be nice to have it formatted like objects above with opening and closing []

LayoutTests/http/tests/inspector/resource-parameters.html:11
 +          if (result === "enabling")
If resource tracking was off the callback is invoked only with "enabling" result and will never learn that resource tracking has been enabled.
Comment 5 Pavel Feldman 2010-06-02 06:43:33 PDT
(In reply to comment #4)
> (From update of attachment 57647 [details])
> LayoutTests/http/tests/inspector/inspector-test.js:63
>  +          for (var i = 0; i < result.length; ++i)
> Would be nice to have it formatted like objects above with opening and closing []
> 

It is for simply arrays of lines... We can change it later!

> LayoutTests/http/tests/inspector/resource-parameters.html:11
>  +          if (result === "enabling")
> If resource tracking was off the callback is invoked only with "enabling" result and will never learn that resource tracking has been enabled.

It'll reload and do just fine.
Comment 6 Yury Semikhatsky 2010-06-02 06:47:20 PDT
Comment on attachment 57647 [details]
[PATCH] Rebased to HAR basis, brushed up rendering of objects.

LayoutTests/http/tests/inspector/resource-parameters.html:30
 +      evaluateInWebInspector("frontend_dumpFormData", callback);
This will never be executed if resource tracking response comes after the iframe is loaded.
Comment 7 Pavel Feldman 2010-06-02 06:56:27 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	D	LayoutTests/platform/chromium-win/inspector/console-log-before-inspector-open-expected.txt
	M	LayoutTests/ChangeLog
	M	LayoutTests/http/tests/inspector/inspector-test.js
	M	LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt
	M	LayoutTests/http/tests/inspector/resource-har-conversion.html
	A	LayoutTests/http/tests/inspector/resource-parameters-expected.txt
	A	LayoutTests/http/tests/inspector/resource-parameters.html
	A	LayoutTests/http/tests/inspector/resource-tests.js
	A	LayoutTests/http/tests/inspector/resources/resource-form-data-receiver-iframe.html
	M	LayoutTests/inspector/console-format-collections-expected.txt
	M	LayoutTests/inspector/console-format-expected.txt
	M	LayoutTests/inspector/console-log-before-inspector-open-expected.txt
	M	LayoutTests/inspector/console-tests-expected.txt
	M	LayoutTests/inspector/elements-panel-structure-expected.txt
	M	LayoutTests/inspector/elements-panel-styles-expected.txt
	M	LayoutTests/inspector/elements-panel-xhtml-structure-expected.txt
	M	LayoutTests/inspector/evaluate-in-frontend-expected.txt
	M	LayoutTests/inspector/styles-source-offsets-expected.txt
	M	LayoutTests/inspector/syntax-highlight-javascript-expected.txt
	M	LayoutTests/inspector/timeline-event-dispatch-expected.txt
	M	LayoutTests/inspector/timeline-layout-expected.txt
	M	LayoutTests/inspector/timeline-mark-timeline-expected.txt
	M	LayoutTests/inspector/timeline-network-resource-expected.txt
	M	LayoutTests/inspector/timeline-paint-expected.txt
	M	LayoutTests/inspector/timeline-parse-html-expected.txt
	M	LayoutTests/inspector/timeline-recalculate-styles-expected.txt
	M	LayoutTests/inspector/timeline-script-tag-1-expected.txt
	M	LayoutTests/inspector/timeline-script-tag-2-expected.txt
	M	LayoutTests/inspector/timeline-test.js
	M	LayoutTests/platform/chromium-win/inspector/timeline-event-dispatch-expected.txt
	M	LayoutTests/platform/chromium-win/inspector/timeline-mark-timeline-expected.txt
	M	LayoutTests/platform/chromium-win/inspector/timeline-network-resource-expected.txt
	M	LayoutTests/platform/chromium-win/inspector/timeline-paint-expected.txt
	M	LayoutTests/platform/chromium-win/inspector/timeline-parse-html-expected.txt
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/front-end/HAREntry.js
	M	WebCore/inspector/front-end/Resource.js
	M	WebCore/inspector/front-end/ResourceView.js
Committed r60562
Comment 8 WebKit Review Bot 2010-06-02 07:18:58 PDT
http://trac.webkit.org/changeset/60562 might have broken GTK Linux 32-bit Release
Comment 9 Pavel Feldman 2010-06-02 07:20:01 PDT
(In reply to comment #8)
> http://trac.webkit.org/changeset/60562 might have broken GTK Linux 32-bit Release

Fixed in http://trac.webkit.org/changeset/60564 (Adding GTK to Skipped).
Comment 10 Eric Seidel (no email) 2010-06-02 11:21:47 PDT
Appears to still be causing failures on mac bots.
Comment 11 Pavel Feldman 2010-06-02 12:25:23 PDT
Looking into it.
Comment 12 Pavel Feldman 2010-06-02 14:04:44 PDT
Added Tiger to Skippet - it returns bogus resources size to the clients.

Leopard fails for these two tests in a sequence:
WebKitTools/Scripts/run-webkit-tests --debug LayoutTests/http/tests/inspector/resource-parameters.html LayoutTests/http/tests/misc/will-send-request-returns-null-on-redirect.html

resource-parameters.html has been added in this change, the other one is quite old. The problem here is that I enable resource tracking in my new test and assume it turns off once the test is over. This does not happen though. So it makes secondary resource (iframe's src) be reported to InspectorController that is not ready for the bogus willSendRequest this test is actually testing. I'll look into (1) making sure resource tracking goes away after my test and (2) InspectorController is ready for the bogus willSendRequest should it happen while it is enabled.

#0	0x04204f31 in WebCore::StringImpl::hash at StringImpl.h:240
#1	0x04208009 in WebCore::StringHash::hash at StringHash.h:90
#2	0x040c0c21 in WTF::IdentityHashTranslator<WebCore::String, WebCore::String, WebCore::StringHash>::hash at HashTable.h:279
#3	0x040c2109 in WTF::HashTable<WebCore::String, WebCore::String, WTF::IdentityExtractor<WebCore::String>, WebCore::StringHash, WTF::HashTraits<WebCore::String>, WTF::HashTraits<WebCore::String> >::add<WebCore::String, WebCore::String, WTF::IdentityHashTranslator<WebCore::String, WebCore::String, WebCore::StringHash> > at HashTable.h:643
#4	0x040c23ee in WTF::HashTable<WebCore::String, WebCore::String, WTF::IdentityExtractor<WebCore::String>, WebCore::StringHash, WTF::HashTraits<WebCore::String>, WTF::HashTraits<WebCore::String> >::add at HashTable.h:317
#5	0x042213da in WTF::HashSet<WebCore::String, WebCore::StringHash, WTF::HashTraits<WebCore::String> >::add at HashSet.h:210
#6	0x04515155 in WebCore::InspectorController::addResource at InspectorController.cpp:733
#7	0x0451547a in WebCore::InspectorController::willSendRequest at InspectorController.cpp:895
#8	0x04a3c42b in WebCore::ResourceLoadNotifier::dispatchWillSendRequest at ResourceLoadNotifier.cpp:129
#9	0x04a3c79e in WebCore::ResourceLoadNotifier::willSendRequest at ResourceLoadNotifier.cpp:64
#10	0x04a3b065 in WebCore::ResourceLoader::willSendRequest at ResourceLoader.cpp:221
#11	0x04854d92 in WebCore::MainResourceLoader::willSendRequest at MainResourceLoader.cpp:173
#12	0x04a3a684 in WebCore::ResourceLoader::willSendRequest at ResourceLoader.cpp:391
#13	0x04a37824 in WebCore::ResourceHandle::willSendRequest at ResourceHandleMac.mm:508
#14	0x04a37d85 in -[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:] at ResourceHandleMac.mm:703
#15	0x97318c11 in -[NSURLConnection(NSURLConnectionReallyInternal) sendWillSendRequest:redirectResponse:]
#16	0x97318b16 in _NSURLConnectionWillSendRequest
#17	0x9117c14f in URLConnectionClient::getRequestForTransmission
#18	0x9117c547 in URLConnectionClient::_clientWillSendRequest
#19	0x9117c862 in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload
#20	0x9117b370 in URLConnectionClient::processEvents