Closed Bug 1318526 Opened 9 years ago Closed 8 years ago

make reftests that use HTTP(..), etc., because of file: origin policy stop doing so

Categories

(Testing :: Reftest, defect)

defect
Not set
normal

Tracking

(firefox53 affected, firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox53 --- affected
firefox58 --- fixed

People

(Reporter: dbaron, Assigned: jfkthame)

Details

(Keywords: perf)

Attachments

(2 files, 1 obsolete file)

Bug 846890 disabled the strict file origin policy for reftests, to make them faster. This means we can stop using HTTP(..) (or HTTP(../..), etc.) on reftests where we were using it only because we needed to be same-origin with something in a different directory (most commonly, downloadable fonts). Given that Xidorn says this would make things faster (bug 1258916 comment 79), we should probably do this.
Component: Layout → Reftest
Product: Core → Testing
It seems there are 466 usage of "HTTP(.." in tree. Majority of them seem to be just for loading fonts from reftest/fonts directory. Removing those should make reftest run much faster.
Try push is green. I have concerns about how to detect any instances of both the test and ref being broken (and therefore ending up with identical screenshots). Any thoughts on that, dbaron?
Flags: needinfo?(dbaron)
Also, are there situations where removing plain HTTP annotations might also be appropriate?
Assignee: nobody → ryanvm
Status: NEW → ASSIGNED
(In reply to Ryan VanderMeulen [:RyanVM] from comment #4) > Try push is green. I have concerns about how to detect any instances of both > the test and ref being broken (and therefore ending up with identical > screenshots). Any thoughts on that, dbaron? The straightforward way is this: * generate a patch that touches every line you're changing, but also swaps != and == on those lines * generate a second patch that does the same but combines it with your patch (removal of HTTP(..)) * push both patches to try * download the resulting logs, grep them for "REFTEST" and trim the timestamp-related gunk from the start of the lines * diff the logs, and see if you see any differences in the images (Might need to do the run on more than one platform if there are platform-specific tests.) This is probably substantially less human time than hacking the reftest harness to compare HTTP and non-HTTP. (In reply to Ryan VanderMeulen [:RyanVM] from comment #5) > Also, are there situations where removing plain HTTP annotations might also > be appropriate? I suppose there could be some erroneous or no-longer-needed annotations for other reasons. But it seems unlikely to yield anywhere near as large a number as the ones that were HTTP(..) for the same-origin policy for downloadable fonts.
Flags: needinfo?(dbaron)
Ryan, are you hoping to get back to this any time soon? I was recently motivated to try and get rid of those HTTP(..)s, and started on a patch before realizing you'd already begun to look into it.... here's my try push, fwiw: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1a4726cfc2840be473a591c5af449d36dd587492 It'd be great if we could get this finished...
Flags: needinfo?(ryanvm)
All yours. I haven't had time to do the verification dbaron suggested, so it's stalled out (and I'm sure is horribly bitrotted at this point).
Assignee: ryanvm → jfkthame
Flags: needinfo?(ryanvm)
Here's a patch to remove almost all these annotations, leaving just a handful where the use of HTTP(..) is actually relevant -- e.g. to test a font load via a URL with HTTP redirect, or where we're using an .sjs server to serve the file in a specific way (e.g. very slowly). I did a check as outlined in comment 6, and the failure images (resulting from swapping == and != in the manifest) looked exactly the same before and after the HTTP(..) removals.
Attachment #8920781 - Flags: review?(dbaron)
FTR, here are try runs I used: (1) To collect failure images when swapping ==/!= on the affected lines: https://treeherder.mozilla.org/#/jobs?repo=try&revision=84640aadf4f7b8d54156b096f4d2d5778dbb3949 (2) Base run with ==/!= swapped but HTTP(..) left in place: https://treeherder.mozilla.org/#/jobs?repo=try&revision=32d9d5a13e3954801f52127c3fc7624a963a0405 (3) To confirm reftests run green after this patch is applied: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1a4726cfc2840be473a591c5af449d36dd587492
Attachment #8812207 - Attachment is obsolete: true
Comment on attachment 8920781 [details] [diff] [review] Remove HTTP(..) from reftest manifests where this was only needed to work around file-URI origin restrictions Please put the comment that was in the reftest.list, saying that 621918-2.svg is using filters.svg in order to mask antialiasing issues where glyphs touch, into the test itself. r=dbaron with that Are there also some HTTP(../..) to clean up in a followup patch?
Attachment #8920781 - Flags: review?(dbaron) → review+
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/1f1b4cb86b58 Remove HTTP(..) from reftest manifests where this was only needed to work around file-URI origin restrictions. r=dbaron
(In reply to David Baron :dbaron: ⌚️UTC-7 from comment #12) > Comment on attachment 8920781 [details] [diff] [review] > Remove HTTP(..) from reftest manifests where this was only needed to work > around file-URI origin restrictions > > Please put the comment that was in the reftest.list, saying that > 621918-2.svg is using filters.svg in order to mask antialiasing issues where > glyphs touch, into the test itself. > > r=dbaron with that > > Are there also some HTTP(../..) to clean up in a followup patch? Yes, I believe so; I'll try to post a patch for that shortly, but wanted to get the bulk of this landed as quickly as possible while the tree is fairly quiet, as it seemed likely to bit-rot pretty fast.
Here's a followup to remove the HTTP(../..) occurrences. I've started a try run, to check that it runs without surprises... https://treeherder.mozilla.org/#/jobs?repo=try&revision=5e9a821637b1a6d31a9773c3b88744d9987057f6.
Attachment #8920854 - Flags: review?(dbaron)
Did you run the same checks that the images didn't change?
Flags: needinfo?(jfkthame)
I haven't actually done that; I just looked at the tests and was comfortable that the HTTP(../..) usage was just about loading fonts, and not relevant to anything else. Would you strongly prefer that we do the additional image-comparison as well before landing this?
Flags: needinfo?(jfkthame)
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
(In reply to David Baron :dbaron: ⌚️UTC-7 from comment #16) > Did you run the same checks that the images didn't change? OK, I ran additional try jobs with the comparisons on these lines flipped (== <-> !=), with and without the HTTP(../..) removed: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e0e15ce10d8af886d622a5657fcc543fdd68ce95 https://treeherder.mozilla.org/#/jobs?repo=try&revision=2c8a3988829ae0ab751cdc53bf42d5248fd2ce81 As expected, the failure images look the same in each case.
Comment on attachment 8920854 [details] [diff] [review] pt 2 - Also remove unnecessary HTTP(../..) from reftest manifests now that tests run with relaxed file-URI origin restrictions r=dbaron; thanks for cleaning this up and for doing the extra test run
Attachment #8920854 - Flags: review?(dbaron) → review+
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/98c5873f6cf0 pt 2 - Also remove unnecessary HTTP(../..) from reftest manifests now that tests run with relaxed file-URI origin restrictions. r=dbaron
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: