WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 87838
Expose setApplicationCacheOriginQuota via window.internals
https://bugs.webkit.org/show_bug.cgi?id=87838
Summary
Expose setApplicationCacheOriginQuota via window.internals
Ravi Phaneendra Kasibhatla
Reported
2012-05-30 02:53:31 PDT
Created
attachment 144773
[details]
Initial patch. Move setApplicationCacheOriginQuota API to WebCore::Internals instead of LayoutTestController interface. This is from the set of functions that were identified in the contributor meeting's hackaton.
http://trac.webkit.org/wiki/Internals_Hackathon
.
Attachments
Initial patch.
(16.77 KB, patch)
2012-05-30 02:53 PDT
,
Ravi Phaneendra Kasibhatla
no flags
Details
Formatted Diff
Diff
Moving of setApplicationCacheOriginQuota from LayoutTestController to Internals
(20.10 KB, patch)
2012-06-02 16:08 PDT
,
Ravi Phaneendra Kasibhatla
no flags
Details
Formatted Diff
Diff
WIP patch for EWS testing
(18.75 KB, patch)
2013-10-17 14:26 PDT
,
Afonso Costa
buildbot
: commit-queue-
Details
Formatted Diff
Diff
WIP patch (v2)
(20.04 KB, patch)
2013-10-17 15:27 PDT
,
Afonso Costa
no flags
Details
Formatted Diff
Diff
Proposed patch
(20.87 KB, patch)
2013-10-17 17:28 PDT
,
Afonso Costa
no flags
Details
Formatted Diff
Diff
Proposed patch (v2)
(20.87 KB, patch)
2013-10-29 14:03 PDT
,
Afonso Costa
no flags
Details
Formatted Diff
Diff
Proposed patch (v3)
(21.54 KB, patch)
2013-10-31 14:51 PDT
,
Afonso Costa
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Patch
(21.69 KB, patch)
2013-10-31 15:47 PDT
,
Afonso Costa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Ravi Phaneendra Kasibhatla
Comment 1
2012-05-30 02:56:21 PDT
I have attached just the basic patch (even with change log) since I am facing some issues with building chromium port. I will be soon uploading final patch after checking & resolving build issues in other ports (if any) complete with Change log also. Hence I haven't marked any review flags.
jochen
Comment 2
2012-05-30 03:56:26 PDT
Chromium doesn't use the files in loader/appcache (with a few exceptions). Maybe Michael (added) can advise how to mimic this for chromium?
Alexey Proskuryakov
Comment 3
2012-05-30 10:02:23 PDT
Hackathon notes about this function appear wrong - this function is certainly implemented at least on Mac, so it's not just Qt. Perhaps we should institute a policy that any time WebKit test coverage through LayoutTestContoller is removes, similar coverage should be added in TestWebKitAPI?
Michael Nordman
Comment 4
2012-05-30 10:41:18 PDT
Comment on
attachment 144773
[details]
Initial patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=144773&action=review
> Source/WebCore/testing/Internals.cpp:980 > + cacheStorage().storeUpdatedQuotaForOrigin(document->securityOrigin(), quota);
This won't build in the chromium port because it doesn't use the ApplicationCacheStorage class, that file isn't compiled or linked into the project. Please just conditionally compile this method body out #if PLATFORM(CHROMIUM).
Ravi Phaneendra Kasibhatla
Comment 5
2012-06-02 16:08:25 PDT
Created
attachment 145463
[details]
Moving of setApplicationCacheOriginQuota from LayoutTestController to Internals
Ravi Phaneendra Kasibhatla
Comment 6
2012-06-02 16:17:36 PDT
(In reply to
comment #4
)
> (From update of
attachment 144773
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=144773&action=review
> > > Source/WebCore/testing/Internals.cpp:980 > > + cacheStorage().storeUpdatedQuotaForOrigin(document->securityOrigin(), quota); > > This won't build in the chromium port because it doesn't use the ApplicationCacheStorage class, that file isn't compiled or linked into the project. Please just conditionally compile this method body out #if PLATFORM(CHROMIUM).
Done.
Ravi Phaneendra Kasibhatla
Comment 7
2012-06-02 16:20:27 PDT
(In reply to
comment #3
)
> Hackathon notes about this function appear wrong - this function is certainly implemented at least on Mac, so it's not just Qt.
Yes I cross verified that it is only implemented for Qt and Mac, but the movement to internals still looks correct and it doesn't effect test behavior.
> > Perhaps we should institute a policy that any time WebKit test coverage through LayoutTestContoller is removes, similar coverage should be added in TestWebKitAPI?
Are you suggesting that I should add new test for TestWebKitAPI for this? I will check on this and try to update.
Alexey Proskuryakov
Comment 8
2012-06-02 23:01:34 PDT
Please also note the new blocking bug. Perhaps it was just a bad idea to move any functions that change settings to window.internals.
Ojan Vafai
Comment 9
2012-06-04 10:16:33 PDT
(In reply to
comment #8
)
> Please also note the new blocking bug. Perhaps it was just a bad idea to move any functions that change settings to window.internals.
That would be a shame. It avoids so much code duplication to have them on internals. We should try to see if we can resolve the issues with settings on internals if possible.
Afonso Costa
Comment 10
2013-10-17 14:19:46 PDT
Hi, I'd like to work on this issue. Could it be assigned to me?
Afonso Costa
Comment 11
2013-10-17 14:26:18 PDT
Created
attachment 214511
[details]
WIP patch for EWS testing
Build Bot
Comment 12
2013-10-17 15:10:05 PDT
Comment on
attachment 214511
[details]
WIP patch for EWS testing
Attachment 214511
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/4108516
Afonso Costa
Comment 13
2013-10-17 15:27:07 PDT
Created
attachment 214522
[details]
WIP patch (v2)
Afonso Costa
Comment 14
2013-10-17 17:28:08 PDT
Created
attachment 214534
[details]
Proposed patch
Joseph Pecoraro
Comment 15
2013-10-29 13:14:35 PDT
Comment on
attachment 214534
[details]
Proposed patch Looks good! r=me
Alexey Proskuryakov
Comment 16
2013-10-29 13:48:19 PDT
Comment on
attachment 214534
[details]
Proposed patch What is going to undo the change after the current test finishes?
Afonso Costa
Comment 17
2013-10-29 14:03:02 PDT
Created
attachment 215424
[details]
Proposed patch (v2) Patch was rebased with branch master.
Afonso Costa
Comment 18
2013-10-29 15:18:13 PDT
(In reply to
comment #16
)
> (From update of
attachment 214534
[details]
) > What is going to undo the change after the current test finishes?
Hi Alexey, the function clearAllApplicationCaches() is called before to set the new cache quota in all startTest().
Alexey Proskuryakov
Comment 19
2013-10-29 16:27:38 PDT
clearAllApplicationCaches() is a TestRunner feature, so it has to be a responsibility of the test to do this? Ideally, any settings that are changed duting a test should be reset automatically.
Afonso Costa
Comment 20
2013-10-30 07:07:06 PDT
(In reply to
comment #19
)
> clearAllApplicationCaches() is a TestRunner feature, so it has to be a responsibility of the test to do this? > > Ideally, any settings that are changed duting a test should be reset automatically.
Maybe the test should: reset -> set -> test -> reset (at the end), just to keep the initial state of any configuration that is being tested. @Joseph, what do you think?
Joseph Pecoraro
Comment 21
2013-10-30 11:46:54 PDT
(In reply to
comment #20
)
> (In reply to
comment #19
) > > clearAllApplicationCaches() is a TestRunner feature, so it has to be a responsibility of the test to do this? > > > > Ideally, any settings that are changed duting a test should be reset automatically. > > Maybe the test should: reset -> set -> test -> reset (at the end), just to keep the initial state of any configuration that is being tested. > > @Joseph, what do you think?
What Alexey means, is that the test driver should reset to a consistent state before every test. We cannot rely on the test reseting state at the end, because the test might crash or produce an error half way through, and then affect later tests. E.g. putting something in DumpRenderTree.mm resetWebViewToConsistentStateBeforeTesting(), and likewise for other ports. Your change doesn't change the existing behavior, so I'm still okay with it. But it would be nice to improve this even further and have DumpRenderTree reset the state between tests.
Alexey Proskuryakov
Comment 22
2013-10-30 11:51:03 PDT
Logically, the code to reset should be in Internals, because that's what changes the setting. There is a "Backup" in InternalSettings, but I'm not sure if Internals methods have an established pattern for doing the right thing.
Tony Chang
Comment 23
2013-10-30 12:13:15 PDT
(In reply to
comment #22
)
> Logically, the code to reset should be in Internals, because that's what changes the setting. > > There is a "Backup" in InternalSettings, but I'm not sure if Internals methods have an established pattern for doing the right thing.
This is what Internals::resetToConsistentState is for.
Afonso Costa
Comment 24
2013-10-30 15:04:52 PDT
So, do I need to update my patch or is it ok to be integrated?
Afonso Costa
Comment 25
2013-10-31 14:51:01 PDT
Created
attachment 215679
[details]
Proposed patch (v3) Patch was updated: - reset the origin quota to default value (in Internals::resetToConsistentState) - rebased with branch master
Joseph Pecoraro
Comment 26
2013-10-31 15:29:10 PDT
(In reply to
comment #25
)
> Created an attachment (id=215679) [details] > Proposed patch (v3) > > Patch was updated: > - reset the origin quota to default value (in Internals::resetToConsistentState) > - rebased with branch master
Should this patch be r? ?
Build Bot
Comment 27
2013-10-31 15:37:58 PDT
Comment on
attachment 215679
[details]
Proposed patch (v3)
Attachment 215679
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/19358002
Afonso Costa
Comment 28
2013-10-31 15:47:34 PDT
Created
attachment 215685
[details]
Patch Updated patch with missing symbols (according to Win build)
Afonso Costa
Comment 29
2013-10-31 15:57:13 PDT
(In reply to
comment #26
)
> (In reply to
comment #25
) > > Created an attachment (id=215679) [details] [details] > > Proposed patch (v3) > > > > Patch was updated: > > - reset the origin quota to default value (in Internals::resetToConsistentState) > > - rebased with branch master > > Should this patch be r? ?
Hi Joseph, I'll set this flag after the patch is ok on EWS. Sorry, but I don't have a win environment to test it.
WebKit Commit Bot
Comment 30
2013-11-01 13:13:41 PDT
Comment on
attachment 215685
[details]
Patch Clearing flags on attachment: 215685 Committed
r158450
: <
http://trac.webkit.org/changeset/158450
>
Csaba Osztrogonác
Comment 31
2014-02-13 04:03:02 PST
Comment on
attachment 214534
[details]
Proposed patch Cleared Joseph Pecoraro's review+ from obsolete
attachment 214534
[details]
so that this bug does not appear in
http://webkit.org/pending-commit
.
Alexey Proskuryakov
Comment 32
2014-02-13 09:30:33 PST
Looks like this was landed, but commit-queue couldn't resolve the bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug