Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Speed up CSS tests by using smaller Japanese font file #11630

Closed
wants to merge 2 commits into from

Conversation

@talklittle
Copy link
Contributor

talklittle commented Jun 5, 2016

Replace the Japanese font with a much smaller font file to speed up relevant CSS tests.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #11452 (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because modifying test to swap font

This change is Reviewable

@nox
Copy link
Member

nox commented Jun 7, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2016

Trying commit ccb917f with merge 077312d...

bors-servo added a commit that referenced this pull request Jun 7, 2016
tests: Speed up CSS tests by using smaller Japanese font file

<!-- Please describe your changes on the following line: -->
Replace the Japanese font with a much smaller font file to speed up relevant CSS tests.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11452 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because modifying test to swap font

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11630)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented Jun 7, 2016

  ▶ FAIL [expected PASS] /_mozilla/css/ol_japanese_iroha_a.html
  └   → /_mozilla/css/ol_japanese_iroha_a.html f8e4ac4e89e24ed5fd2435dd15cf088e3d69abd8
/_mozilla/css/ol_japanese_iroha_ref.html a5c4b0133501b9c4a31769054a7f5c317685c2aa
Testing f8e4ac4e89e24ed5fd2435dd15cf088e3d69abd8 == a5c4b0133501b9c4a31769054a7f5c317685c2aa
@talklittle talklittle force-pushed the talklittle:perf_test_iroha_11452 branch from ccb917f to 66cb220 Jun 8, 2016
@highfive highfive removed the S-tests-failed label Jun 8, 2016
@highfive
Copy link

highfive commented Jun 8, 2016

New code was committed to pull request.

@nox
Copy link
Member

nox commented Jun 8, 2016

@highfive highfive assigned SimonSapin and unassigned nox Jun 8, 2016
@@ -20,10 +18,10 @@
</head>
<body>
<ol>
<li>&#x3044;. Gryffindor</li>

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Jun 8, 2016

Member

Why this change? I think that’s what’s making ol_japanese_iroha_a.html fail.

This comment has been minimized.

Copy link
@talklittle

talklittle Jun 8, 2016

Author Contributor

I changed it because the new font was causing the reftest to fail. After this change it no longer fails. I'm guessing the presence of the . is font- and browser-specific. In Firefox it shows a "Japanese comma" instead of a period.

Servo with new font:
screenshot from 2016-06-08 10-06-08

Servo with old font:
screenshot from 2016-06-08 10-10-20

Firefox with new font:
screenshot from 2016-06-08 09-36-22

Firefox with old font:
firefox-old-font

@talklittle
Copy link
Contributor Author

talklittle commented Jun 8, 2016

I guess the new font is triggering RenderingMode::Plain instead of RenderingMode::Suffix for some reason. https://github.com/servo/servo/blob/master/components/layout/generated_content.rs

@bors-servo
Copy link
Contributor

bors-servo commented Aug 9, 2016

The latest upstream changes (presumably #12576) made this pull request unmergeable. Please resolve the merge conflicts.

@jdm
Copy link
Member

jdm commented Aug 9, 2016

@SimonSapin This has been waiting in your queue for a long time now.

@talklittle talklittle force-pushed the talklittle:perf_test_iroha_11452 branch from 66cb220 to 2c147de Aug 12, 2016
@SimonSapin
Copy link
Member

SimonSapin commented Aug 16, 2016

Sorry, I got this PR confused with #8374 which was blocked because of test failures.

I guess the new font is triggering RenderingMode::Plain instead of RenderingMode::Suffix for some reason. https://github.com/servo/servo/blob/master/components/layout/generated_content.rs

There is no reason for that to happen. And I’ve verified in a debugger that the code with RenderingMode::Suffix(".\u{00a0}") is indeed executed. It looks like using this font exposes a layout/rendering bug.

I’m somewhat opposed to blindly changing a reference file to match a rendering bug in a test case.

This is what the test with this PR looks for me, with font-size: 4em added:

screenshot from 2016-08-16 17-14-28

I don’t know why the latin letters are light grey instead of black. There is no declaration for the color CSS property.

During the page load, for a about one second, the rendering looks like this (if I’m quick enough with the screenshot button):

screenshot from 2016-08-16 17-13-50

Maybe it while the font isn’t loaded yet? The dot is present during that time.

@pcwalton any idea what’s going on?

@pcwalton
Copy link
Contributor

pcwalton commented Aug 17, 2016

@SimonSapin Probably the font hasn't loaded yet. This would be an excellent use case for the thread profiling tool I'm working on :)

@SimonSapin
Copy link
Member

SimonSapin commented Aug 17, 2016

Yes, my second screenshot is when the font hasn’t loaded yet. (This is taken manually, it’s not what the test harness gets.) The thing is why, when the font does eventually load (my first screenshot), do the dot on space disappear?

@pcwalton
Copy link
Contributor

pcwalton commented Aug 18, 2016

Oh, that's weird. Does it reproduce with incremental layout off?

@SimonSapin
Copy link
Member

SimonSapin commented Aug 18, 2016

With -i, yes.

@jdm
Copy link
Member

jdm commented Jan 27, 2017

Tracking the bug this exposed in #15273. Closing because this doesn't appear to be going anywhere.

@jdm jdm closed this Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.