RESOLVED FIXED 45313
[chromium] Port test shell geolocation fixes to DRT
https://bugs.webkit.org/show_bug.cgi?id=45313
Summary [chromium] Port test shell geolocation fixes to DRT
Jonathan Dixon
Reported 2010-09-07 11:27:22 PDT
[chromium] Port test shell geolocation fixes to DRT
Attachments
Patch (7.54 KB, patch)
2010-09-07 11:29 PDT, Jonathan Dixon
no flags
Patch (8.65 KB, patch)
2010-09-07 11:34 PDT, Jonathan Dixon
no flags
Patch (11.60 KB, patch)
2010-09-08 03:41 PDT, Jonathan Dixon
no flags
Unified patch, merged in unrollout of http://trac.webkit.org/changeset/66886 and fixes the expectations files (23.31 KB, patch)
2010-09-10 05:32 PDT, Jonathan Dixon
no flags
jorlows and steve's comments; fixup ChangeLogs (23.25 KB, patch)
2010-09-10 07:30 PDT, Jonathan Dixon
no flags
Rebase patch after drt_expectations reorg (22.41 KB, patch)
2010-09-13 06:15 PDT, Jonathan Dixon
no flags
Jonathan Dixon
Comment 1 2010-09-07 11:29:14 PDT
Jonathan Dixon
Comment 2 2010-09-07 11:30:22 PDT
Jonathan Dixon
Comment 3 2010-09-07 11:34:35 PDT
Jonathan Dixon
Comment 4 2010-09-07 11:35:25 PDT
NOTE patch set 1 does the callback async like test shell does, however this does not seem to be needed to I uploaded the simpler patchset 2 without this. Let me know which seems better....
Marcus Bulach
Comment 5 2010-09-07 12:00:49 PDT
thanks joth! looks good overall, just a couple of nits and one suggestion below. please, ask jorlow for a sanity check as well.. View in context: https://bugs.webkit.org/attachment.cgi?id=66744&action=prettypatch > LayoutTests/platform/chromium/drt_expectations.txt:174 > +//BUG_DRT LINUX : fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html = TEXT TIMEOUT remove these lines rather than comment? > WebKit/chromium/src/WebGeolocationServiceMock.cpp:145 > + // In addition to an instnace pointer, we need to keep the setPermission state typo, instance > WebKit/chromium/src/WebGeolocationServiceMock.cpp:149 > + static bool s_mockGeolocationPermissionIsSet; would it make sense to have a single enum {UNSET, ALLOWED, DENIED} instead of two bools? (In reply to comment #4) > NOTE patch set 1 does the callback async like test shell does, however this does not seem to be needed to I uploaded the simpler patchset 2 without this. Let me know which seems better....
Steve Block
Comment 6 2010-09-08 02:08:09 PDT
LGTM > NOTE patch set 1 does the callback async like test shell does, however this does not seem to be needed > to I uploaded the simpler patchset 2 without this. Let me know which seems better.... There's certainly no need for the response to requestPermissionForFrame() to be asynchronous - WebCore::Geolocation is designed to handle this case. I think it's also safe for calls to layoutTestController.setMockGeolocationPermission() to cause synchronous calls straight through to WebCore::Geolocation, as that object will never make synchronous callbacks to script in response anyway. Other platforms have decided to make both cases asynchronous, however, to closer match the behaviour in 'real' use, where the browser responds to requestPermissionForFrame() asynchronously.
Jonathan Dixon
Comment 7 2010-09-08 03:41:39 PDT
Jonathan Dixon
Comment 8 2010-09-08 03:59:54 PDT
Thanks for the comments Marcus, Steve. I decided to keep DRT using the synchronous callbacks, as it works fine whereas I found async callbacks with >0 delay actually introduces new failures... This is now ready to go from my side. Jeremy, want to take a final pass and add it to the commit queue if OK? Cheers
Jeremy Orlow
Comment 9 2010-09-08 09:47:13 PDT
Comment on attachment 66867 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=66867&action=prettypatch > WebKit/chromium/src/WebGeolocationServiceMock.cpp:231 > + m_pendingPermissionRequests.remove(i); Is this horribly slow? Maybe better to swap this with the last item? Or maybe it really doesn't matter since this is only for testing code? > WebKit/chromium/src/WebGeolocationServiceMock.cpp:243 > + it != pendingPermissionRequests.end(); ++it) { dont' wrap
Jonathan Dixon
Comment 10 2010-09-08 11:36:00 PDT
View in context: https://bugs.webkit.org/attachment.cgi?id=66867&action=prettypatch > WebKit/chromium/src/WebGeolocationServiceMock.cpp:231 > + m_pendingPermissionRequests.remove(i); Horrible yes, slow probably not in practice as the normal case will be that the vector has zero or at most one item in it. So yes, I think correctness trumps speed as it's a test-code only corner case. Ah. Actually, given the if() on line 246, I could ditch this whole loop, and just let any stale entries work their way out naturally. Inconsistent with test shell, but perhaps simpler. > WebKit/chromium/src/WebGeolocationServiceMock.cpp:243 > + it != pendingPermissionRequests.end(); ++it) { oh yes. And line 196.
Jonathan Dixon
Comment 11 2010-09-10 05:32:36 PDT
Created attachment 67169 [details] Unified patch, merged in unrollout of http://trac.webkit.org/changeset/66886 and fixes the expectations files
Jonathan Dixon
Comment 12 2010-09-10 05:38:23 PDT
Patch 4 now fixes up the DRT and relands http://trac.webkit.org/changeset/66886 which was rolled out in http://trac.webkit.org/changeset/66892 due to said DRT failures. In addition, I'm now cleaning up the expectations files in this patch too, to make DRT (and test shell) run clean. This obsoletes the patch in https://bugs.webkit.org/show_bug.cgi?id=43480
Jonathan Dixon
Comment 13 2010-09-10 05:41:33 PDT
*** Bug 43480 has been marked as a duplicate of this bug. ***
Steve Block
Comment 14 2010-09-10 05:43:38 PDT
Comment on attachment 67169 [details] Unified patch, merged in unrollout of http://trac.webkit.org/changeset/66886 and fixes the expectations files This is rather hard to follow, as it seems to be an amalgamation of three bugs/patches. Do you need them all to go in one patch? If not, I think it would be much simpler to submit them separately. If they must go in as one, I think you should update the bugs by marking some as duplicates so that they all point to one bug. Then we can add a clear explanation to that bug of what's going on and make sure all the ChangeLog entries in this patch point to that same bug.
Jonathan Dixon
Comment 15 2010-09-10 07:16:18 PDT
(In reply to comment #14) > (From update of attachment 67169 [details]) > This is rather hard to follow, as it seems to be an amalgamation of three bugs/patches. Do you need them all to go in one patch? If not, I think it would be much simpler to submit them separately. If they must go in as one, I think you should update the bugs by marking some as duplicates so that they all point to one bug. Then we can add a clear explanation to that bug of what's going on and make sure all the ChangeLog entries in this patch point to that same bug. Agree it's a bit confusing, but it is just a merge of 3 already reviewed patches. But yes, they need to go in at once, as the rollout happened because it broke DRT; landing them together ensures this won't happen again. Likewise, the expectations files need to be updated when the fixes land. The original bug https://bugs.webkit.org/show_bug.cgi?id=45112 was already closed when it landed the first time. (I'll add note to it about the rollout and link here for the re-land) I already marked https://bugs.webkit.org/show_bug.cgi?id=43480 as a duplicate of this one.
Jeremy Orlow
Comment 16 2010-09-10 07:20:42 PDT
Comment on attachment 67169 [details] Unified patch, merged in unrollout of http://trac.webkit.org/changeset/66886 and fixes the expectations files View in context: https://bugs.webkit.org/attachment.cgi?id=67169&action=prettypatch > WebKit/chromium/src/WebGeolocationServiceMock.cpp:211 > + notifyPendingPermissions(); 4 spaces r=me
Steve Block
Comment 17 2010-09-10 07:24:04 PDT
> But yes, they need to go in at once, as the rollout happened because it broke > DRT; landing them together ensures this won't happen again. Likewise, the > expectations files need to be updated when the fixes land. OK, fair enough. I think though that all the ChangeLogs should point to this single bug - I don't know of any other cases of a patch pointing to multiple bugs. Jeremy?
Jeremy Orlow
Comment 18 2010-09-10 07:27:43 PDT
(In reply to comment #17) > > But yes, they need to go in at once, as the rollout happened because it broke > > DRT; landing them together ensures this won't happen again. Likewise, the > > expectations files need to be updated when the fixes land. > OK, fair enough. I think though that all the ChangeLogs should point to this single bug - I don't know of any other cases of a patch pointing to multiple bugs. Jeremy? This was all already reviewed. Technically it didn't need to even be given a bug or be reviewed, but Joth isn't a committer, so this way it can go through the commit queue.
Jeremy Orlow
Comment 19 2010-09-10 07:28:04 PDT
(In reply to comment #18) > (In reply to comment #17) > > > But yes, they need to go in at once, as the rollout happened because it broke > > > DRT; landing them together ensures this won't happen again. Likewise, the > > > expectations files need to be updated when the fixes land. > > OK, fair enough. I think though that all the ChangeLogs should point to this single bug - I don't know of any other cases of a patch pointing to multiple bugs. Jeremy? > > This was all already reviewed. Technically it didn't need to even be given a bug or be reviewed, but Joth isn't a committer, so this way it can go through the commit queue. And there is a lot of precedent for landing multiple things at once.
Jonathan Dixon
Comment 20 2010-09-10 07:30:39 PDT
Created attachment 67179 [details] jorlows and steve's comments; fixup ChangeLogs
Jonathan Dixon
Comment 21 2010-09-10 07:33:15 PDT
(In reply to comment #20) > Created an attachment (id=67179) [details] > jorlows and steve's comments; fixup ChangeLogs I've left in the reference to the original bug where needed, but made this one the "main" bug for each ChangeLog entry and removed all reference to obsolete https://bugs.webkit.org/show_bug.cgi?id=43480 Hope that works... please commit-queue it. Cheers!
Jeremy Orlow
Comment 22 2010-09-10 07:34:43 PDT
Comment on attachment 67179 [details] jorlows and steve's comments; fixup ChangeLogs rubber stamp
WebKit Commit Bot
Comment 23 2010-09-10 20:05:25 PDT
Comment on attachment 67179 [details] jorlows and steve's comments; fixup ChangeLogs Rejecting patch 67179 from commit-queue. Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Jeremy Orlow', u'--force']" exit_code: 1 Last 500 characters of output: locationServiceChromium.cpp patching file WebCore/platform/chromium/GeolocationServiceChromium.h patching file WebKit/chromium/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file WebKit/chromium/public/WebGeolocationService.h patching file WebKit/chromium/public/WebGeolocationServiceBridge.h patching file WebKit/chromium/public/WebGeolocationServiceMock.h patching file WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp patching file WebKit/chromium/src/WebGeolocationServiceMock.cpp Full output: http://queues.webkit.org/results/3952350
Jonathan Dixon
Comment 24 2010-09-13 06:15:55 PDT
Created attachment 67402 [details] Rebase patch after drt_expectations reorg
Steve Block
Comment 25 2010-09-13 06:24:34 PDT
Comment on attachment 67402 [details] Rebase patch after drt_expectations reorg rebased
WebKit Commit Bot
Comment 26 2010-09-13 07:21:03 PDT
Comment on attachment 67402 [details] Rebase patch after drt_expectations reorg Clearing flags on attachment: 67402 Committed r67387: <http://trac.webkit.org/changeset/67387>
WebKit Commit Bot
Comment 27 2010-09-13 07:21:09 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.