<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Web Browsers on mariospr.org</title><link>https://mariospr.org/category/web-browsers/</link><description>Recent content in Web Browsers on mariospr.org</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 22 Jul 2021 14:16:49 +0000</lastBuildDate><atom:link href="https://mariospr.org/category/web-browsers/index.xml" rel="self" type="application/rss+xml"/><item><title>Igalia and the Chromium project</title><link>https://mariospr.org/2021/07/22/igalia-and-the-chromium-project/</link><pubDate>Thu, 22 Jul 2021 14:16:49 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=3159</guid><description>&lt;p&gt;A couple of months ago I had the pleasure of speaking at the &lt;em&gt;&lt;a href="https://conf.researchr.org/home/icse-2021"&gt;43rd International Conference on Software Engineering&lt;/a&gt;&lt;/em&gt; (aka &lt;em&gt;ICSE 2021&lt;/em&gt;), in the context of its &lt;a href="https://conf.researchr.org/track/icse-2021/icse-2021-spanish-industry-case-studies"&gt;&amp;ldquo;Spanish Industry Case Studies&amp;rdquo; track&lt;/a&gt;. We were invited to give a high level overview of the &lt;a href="https://www.chromium.org"&gt;Chromium&lt;/a&gt; project and how &lt;a href="https://www.igalia.com"&gt;Igalia&lt;/a&gt; contributes to it upstream.&lt;/p&gt;
&lt;p&gt;This was an unusual chance to speak at a forum other than the usual conferences I attend to, so I welcomed this as a double opportunity to explain the project to people less familiar with &lt;a href="https://www.chromium.org"&gt;Chromium&lt;/a&gt; than those attending events such as &lt;a href="https://www.chromium.org/events/blinkon-14"&gt;BlinkOn&lt;/a&gt; or the &lt;a href="https://webengineshackfest.org/2021/"&gt;Web Engines Hackfest&lt;/a&gt;, as well as to spread some awareness on our work in there.&lt;/p&gt;</description><content:encoded><![CDATA[<p>A couple of months ago I had the pleasure of speaking at the <em><a href="https://conf.researchr.org/home/icse-2021">43rd International Conference on Software Engineering</a></em> (aka <em>ICSE 2021</em>), in the context of its <a href="https://conf.researchr.org/track/icse-2021/icse-2021-spanish-industry-case-studies">&ldquo;Spanish Industry Case Studies&rdquo; track</a>. We were invited to give a high level overview of the <a href="https://www.chromium.org">Chromium</a> project and how <a href="https://www.igalia.com">Igalia</a> contributes to it upstream.</p>
<p>This was an unusual chance to speak at a forum other than the usual conferences I attend to, so I welcomed this as a double opportunity to explain the project to people less familiar with <a href="https://www.chromium.org">Chromium</a> than those attending events such as <a href="https://www.chromium.org/events/blinkon-14">BlinkOn</a> or the <a href="https://webengineshackfest.org/2021/">Web Engines Hackfest</a>, as well as to spread some awareness on our work in there.</p>
<p>Contributing to <a href="https://www.chromium.org">Chromium</a> is something we&rsquo;ve been doing for quite a few years already, but I think it&rsquo;s fair to say that in the past 2-3 years we have intensified our contributions to the project even more and diversified the areas that we contribute to, something I&rsquo;ve tried to reflect in this talk in no more than 25 minutes (quite a challenge!). Actually, it&rsquo;s precisely because of this amount of contributions that we&rsquo;re currently<span style="font-size: 1rem;"> the 2nd biggest non-Google contributor to the project in number of commits, and among the Top 5 contributors by team size (see a </span><a style="font-size: 1rem;" href="https://docs.google.com/presentation/d/1WxwbecNNXp_5v0yUDR3EolXR5m86siHj4_QWgPnJ7lU/edit#slide=id.gd3ed2042b9_4_142">highlight on this from BlinkOn 14&rsquo;s keynote</a><span style="font-size: 1rem;">). For a small consultancy company such as <a href="https://www.igalia.com">ours</a>, it&rsquo;s certainly something to feel proud of.</span></p>
<p>With all this in mind, I organized the talk into 2 main parts: First a general introduction to the <a href="https://www.chromium.org">Chromium</a> project and then a summary of the main <em>upstream</em> work that we at <a href="https://www.igalia.com">Igalia</a> have contributed recently to it. I focused on the past year and a half, since that seemed like a good balance that allowed me to highlight the most important bits without adding too much  information. And from what I can tell based on the feedback received so far, it seems the end result has been helpful and useful for some people without prior knowledge to understand things such as the differences between Chromium and Chrome, what ChromiumOS is and how our work on several different fronts (e.g. <em>CSS</em>, <em>Accessibility</em>, <em>Ozone/X11/Wayland</em>, <em>MathML</em>, <em>Interoperability</em>&hellip;) fits into the picture.</p>
<p>Obviously, the more technically inclined you are, and the more you know about the project, the more you&rsquo;ll understand the different bits of information condensed into this talk, but my main point here is that you shouldn&rsquo;t need any of that to be able to follow it, or at least that was my intention (but please let me know in the comments if you have any feedback). Here you have it:</p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/Q5IU9QeGNa8?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>You can <a href="https://www.youtube.com/watch?v=Q5IU9QeGNa8">watch the talk online</a> (24:05 min) on <a href="https://www.youtube.com/channel/UCIpArN21nIT2lvZX-nkjP7A">our YouTube channel</a>, as well as grab the <a href="https://speakerdeck.com/mariospr/contributions-to-an-open-source-project-igalia-and-the-chromium-project">original slide deck as a PDF</a> in case you also want it for references, or to check the many links I included with pointers for further information and also for reference to the different sources used.</p>
<p>Last, I don&rsquo;t want to finish this post without thanking once again to the organizers for the invitation and for runing the event, and in particular to <a href="https://twitter.com/davilagrau">Andrés-Leonardo Martínez-Ortiz</a> and <a href="https://twitter.com/javierprovecho">Javier Provecho</a> for taking care of the specific details involved with the <a href="https://conf.researchr.org/track/icse-2021/icse-2021-spanish-industry-case-studies">&ldquo;Spanish Industry Case Studies&rdquo; track</a>.</p>
<p>Thank you all</p>
]]></content:encoded></item><item><title>﻿​Chromium now migrated to the new C++ Mojo types</title><link>https://mariospr.org/2020/07/08/chromium-now-migrated-to-the-new-c-mojo-types/</link><pubDate>Wed, 08 Jul 2020 08:55:03 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=3111</guid><description>&lt;p&gt;At the end of the last year I wrote &lt;a href="https://mariospr.org/2019/12/23/end-of-the-year-update-2019-edition/" target="_blank" rel="nofollow noreferrer noopener"&gt;a long blog post&lt;/a&gt; summarizing the main work I was involved with as part of &lt;a href="https://www.igalia.com/project/chromium" target="_blank" rel="nofollow noreferrer noopener"&gt;Igalia&amp;rsquo;s Chromium team&lt;/a&gt;. In it I mentioned that a big chunk of my time was spent working on the migration to the new C++ &lt;strong&gt;Mojo&lt;/strong&gt; types across the entire codebase of &lt;a href="https://www.chromium.org" target="_blank" rel="nofollow noreferrer noopener"&gt;Chromium&lt;/a&gt;, in the context of the &lt;a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE" target="_blank" rel="nofollow noreferrer noopener"&gt;Onion Soup 2.0 project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For those of you who don&amp;rsquo;t know what Mojo is about, there is extensive information about it in &lt;a href="https://chromium.googlesource.com/chromium/src.git/+/master/mojo/README.md" target="_blank" rel="nofollow noreferrer noopener"&gt;Chromium&amp;rsquo;s documentation&lt;/a&gt;, but for the sake of this post, let&amp;rsquo;s simplify things and say that Mojo is a modern replacement to &lt;a href="https://www.chromium.org/developers/design-documents/inter-process-communication" target="_blank" rel="nofollow noreferrer noopener"&gt;Chromium&amp;rsquo;s legacy IPC APIs&lt;/a&gt; which enables a better, simpler and more direct way of communication among all of Chromium&amp;rsquo;s different processes.&lt;/p&gt;</description><content:encoded><![CDATA[<p>At the end of the last year I wrote <a href="/2019/12/23/end-of-the-year-update-2019-edition/" target="_blank" rel="nofollow noreferrer noopener">a long blog post</a> summarizing the main work I was involved with as part of <a href="https://www.igalia.com/project/chromium" target="_blank" rel="nofollow noreferrer noopener">Igalia&rsquo;s Chromium team</a>. In it I mentioned that a big chunk of my time was spent working on the migration to the new C++ <strong>Mojo</strong> types across the entire codebase of <a href="https://www.chromium.org" target="_blank" rel="nofollow noreferrer noopener">Chromium</a>, in the context of the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE" target="_blank" rel="nofollow noreferrer noopener">Onion Soup 2.0 project</a>.</p>
<p>For those of you who don&rsquo;t know what Mojo is about, there is extensive information about it in <a href="https://chromium.googlesource.com/chromium/src.git/+/master/mojo/README.md" target="_blank" rel="nofollow noreferrer noopener">Chromium&rsquo;s documentation</a>, but for the sake of this post, let&rsquo;s simplify things and say that Mojo is a modern replacement to <a href="https://www.chromium.org/developers/design-documents/inter-process-communication" target="_blank" rel="nofollow noreferrer noopener">Chromium&rsquo;s legacy IPC APIs</a> which enables a better, simpler and more direct way of communication among all of Chromium&rsquo;s different processes.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/blogpost-mojoipc.png"><img src="/wp-content/uploads/2019/12/blogpost-mojoipc_small.png" /></a></p>
One interesting thing about this conversion is that, even though Mojo was already "the new thing" compared to <a href="https://www.chromium.org/developers/design-documents/inter-process-communication" target="_blank" rel="nofollow noreferrer noopener">Chromium's legacy IPC APIs</a>, the original Mojo API presented a few problems that could only be fixed with a newer API. This is the main reason that motivated this migration, since the new Mojo API fixed those issues by providing less confusing and less error-prone types, as well as additional checks that would force your code to be safer than before, and all this done in a binary compatible way. Please check out the <a href="https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E" target="_blank" rel="nofollow noreferrer noopener">Mojo Bindings Conversion Cheatsheet</a> for more details on what exactly those conversions would be about.
<p>Another interesting aspect of this conversion is that, unfortunately, it wouldn&rsquo;t be as easy as running a &ldquo;search &amp; replace&rdquo; operation since in most cases deeper changes would need to be done to make sure that the migration wouldn&rsquo;t break neither existing tests nor production code. This is the reason why we often had to write bigger refactorings than what one would have anticipated for some of those migrations, or why sometimes some patches took a bit longer to get landed as they would span way too much across multiple directories, making the merging process extra challenging.</p>
<p>Now combine all this with the fact that we were confronted with <strong>about 5000 instances of the old types in the Chromium codebase when we started</strong>, spanning across nearly every single subdirectory of the project, and you&rsquo;ll probably understand why this was a massive feat that would took quite some time to tackle.</p>
<p>Turns out, though, that after just 6 months since we started working on this and more than 1100 patches landed upstream, our team managed to have nearly all the existing uses of the old APIs migrated to the new ones, reaching to a point where, by the end of December 2019, we had completed 99.21% of the entire migration! That is, we basically had almost everything migrated back then and the only part we were missing was the migration of <code>//components/arc</code>, as I already <a href="/2019/12/23/end-of-the-year-update-2019-edition/" target="_blank" rel="nofollow noreferrer noopener">announced in this blog back in December</a> and in the <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-mojo/kSVBn0Y6vQA" target="_blank" rel="nofollow noreferrer noopener">chromium-mojo mailing list</a>.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/MojoMigrationsStats2019.png"><img src="/wp-content/uploads/2019/12/MojoMigrationsStats2019_small.png" /></a>
<small><em>Progress of migrations to the new Mojo syntax by December 2019</em></small></p>
This was good news indeed. But the fact that we didn't manage to reach 100% was still a bit of a pain point because, as <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-mojo/jcGzeTt1m2U/Eg6vIwFJBAAJ" target="_blank" rel="nofollow noreferrer noopener">Kentaro Hara mentioned in the chromium-mojo mailing list</a> yesterday, <em>"finishing 100% is very important because refactoring projects that started but didn't finish leave a lot of tech debt in the code base"</em>. And surely we didn't want to leave the project unfinished, so we kept collaborating with the Chromium community in order to finish the job.
<p>The main problem with <code>//components/arc</code> was that, as explained in the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1035484" target="_blank" rel="nofollow noreferrer noopener">bug where we tracked that particular subtask</a>, we couldn&rsquo;t migrate it yet because the external <em>libchrome</em> repository was still relying on the old types! Thus, even though almost nothing else in Chromium was using them at that point, migrating those <code>.mojom</code> files under <code>//components/arc</code> to the new types would basically break <em>libchrome</em>, which wouldn&rsquo;t have a recent enough version of Mojo to understand them (and no, according to the people collaborating with us on this effort at that particular moment, getting Mojo updated to a new version in <em>libchrome</em> was not really a possibility).</p>
<p>So, in order to fix this situation, we collaborated closely with the people maintaining the <em>libchrome</em> repository (external to Chromium&rsquo;s repository and still relies in the old mojo types) <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1035484" target="_blank" rel="nofollow noreferrer noopener">to get the remaining migration, inside <code>//components/arc</code>, unblocked</a>. And after a few months doing some small changes here and there to provide the <em>libchrome</em> folks with the tools they&rsquo;d need to allow them to proceed with the migration, they could finally integrate the necessary changes that would ultimately allow us to complete the task.</p>
<p>Once this important piece of the puzzle was in place, all that was left was for my colleague <a href="https://blogs.igalia.com/akandalkar" target="_blank" rel="nofollow noreferrer noopener">Abhijeet</a> to land <a href="https://chromium-review.googlesource.com/c/chromium/src/+/1868870" target="_blank" rel="nofollow noreferrer noopener">the CL that would migrate most of <code>//components/arc</code> to the new types</a> (a CL which had been put on hold for about 6 months!), and then to land a few CLs more on top to make sure we did get rid of any trace of old types that might still be in codebase (special kudos to my colleague <a href="https://blogs.igalia.com/gyuyoung/" target="_blank" rel="nofollow noreferrer noopener">Gyuyoung</a>, who wrote most of those final CLs).</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2020/07/MojoMigrationsStatsJuly2020.png"><img src="/wp-content/uploads/2020/07/MojoMigrationsStatsJuly2020-800x354.png" /></a>
<small><em>Progress of migrations to the new Mojo syntax by July 2020</em></small></p>
After all this effort, which would sit on top of all the amazing work that my team had already done in the second half of 2019, we finally reached the point where we are today, when we can proudly and loudly announce that the <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-mojo/jcGzeTt1m2U/34zlwghIBAAJ" target="_blank" rel="nofollow noreferrer noopener"><strong>migration of the old C++ Mojo types to the new ones is finally complete</strong></a>! Please feel free to check out the details on the <a href="https://docs.google.com/spreadsheets/d/1khYVrfnN74RSDqqXgCFlG9fI89IKWA9J32Ln_2ZcTaU">spreadsheet tracking this effort</a>.
<p>So please join me in celebrating this important milestone for the <a href="https://www.chromium.org" target="_blank" rel="nofollow noreferrer noopener">Chromium</a> project and enjoy the new codebase free of the old Mojo types. It&rsquo;s been difficult but it definitely pays off to see it completed, something which wouldn&rsquo;t have been possible without all the people who contributed along the way with comments, patches, reviews and any other type of feedback. Thank you all! 👌 🍻</p>
<p><a href="https://www.igalia.com"><img src="https://i2.wp.com/mariospr.org/wp-content/uploads/2020/05/IgaliaLogoSmall.png" alt="Igalia" align="right" /></a>Last, while the main topic of this post is to celebrate the unblocking of these last migrations we had left since December 2019, I&rsquo;d like to finish acknowledging the work of all my colleagues from <a href="https://www.igalia.com" target="_blank" rel="nofollow noreferrer noopener">Igalia</a> who worked along with me on this task since we started, one year ago. That is, <a href="https://blogs.igalia.com/akandalkar" target="_blank" rel="nofollow noreferrer noopener">Abhijeet</a>, <a href="https://blogs.igalia.com/tonikitoo/" target="_blank" rel="nofollow noreferrer noopener">Antonio</a>, <a href="https://blogs.igalia.com/gyuyoung/" target="_blank" rel="nofollow noreferrer noopener">Gyuyoung</a>, <a href="https://blogs.igalia.com/hferreiro/" target="_blank" rel="nofollow noreferrer noopener">Henrique</a>, <a href="https://blogs.igalia.com/jkim/" target="_blank" rel="nofollow noreferrer noopener">Julie</a> and <a href="https://blogs.igalia.com/mshin/" target="_blank" rel="nofollow noreferrer noopener">Shin</a>.</p>
<p>Now if you&rsquo;ll excuse me, we need to get back to working on the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE" target="_blank" rel="nofollow noreferrer noopener">Onion Soup 2.0 project</a> because we&rsquo;re not done yet: at the moment we&rsquo;re mostly focused on converting remote calls using Chromium&rsquo;s legacy IPC to Mojo (see the <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-mojo/aY5_Nx9_dDQ" target="_blank" rel="nofollow noreferrer noopener">status report by Dave Tapuska</a>) and helping finish <em>Onion Soup&rsquo;ing</em> the remaining directores under //content/renderer (see the <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-mojo/Mc1VP1-2nWY" target="_blank" rel="nofollow noreferrer noopener">status report by Kentaro Hara</a>), so there&rsquo;s no time to waste. But those migrations will be material for another post, of course.</p>
]]></content:encoded></item><item><title>The Web Platform Tests project</title><link>https://mariospr.org/2020/05/14/the-web-platform-tests-project/</link><pubDate>Thu, 14 May 2020 09:07:19 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=2961</guid><description>&lt;h2&gt;Web Browsers and Test Driven Development&lt;/h2&gt;
Working on Web browsers development is not an easy feat but if there's something I'm personally very grateful for when it comes to collaborating with this kind of software projects, it is their testing infrastructure and the peace of mind that it provides me with when making changes on a daily basis.
&lt;p&gt;To help you understand the size of these projects, they involve millions of lines of code (&lt;a href="https://www.openhub.net/p/chrome" target="_blank" rel="nofollow noreferrer noopener"&gt;Chromium is ~25 million lines of code&lt;/a&gt;, followed closely by &lt;a href="https://www.openhub.net/p/firefox" target="_blank" rel="nofollow noreferrer noopener"&gt;Firefox&lt;/a&gt; and &lt;a href="https://www.openhub.net/p/webkit" target="_blank" rel="nofollow noreferrer noopener"&gt;WebKit&lt;/a&gt;) and around 200-300 new patches landing everyday. Try to imagine, for one second, how we could make changes if we didn&amp;rsquo;t have such testing infrastructure. It would basically be utter and complete chao​s and, more especially, it would mean extremely buggy Web browsers, broken implementations of the &lt;a href="https://webplatform.github.io" target="_blank" rel="nofollow noreferrer noopener"&gt;Web Platform&lt;/a&gt; and tens (hundreds?) of new bugs and crashes piling up every day&amp;hellip; not a good thing at all for Web browsers, which are these days some of the most widely used applications (and not just &amp;rsquo;the thing you use to browse the Web&amp;rsquo;).&lt;/p&gt;</description><content:encoded><![CDATA[<h2>Web Browsers and Test Driven Development</h2>
Working on Web browsers development is not an easy feat but if there's something I'm personally very grateful for when it comes to collaborating with this kind of software projects, it is their testing infrastructure and the peace of mind that it provides me with when making changes on a daily basis.
<p>To help you understand the size of these projects, they involve millions of lines of code (<a href="https://www.openhub.net/p/chrome" target="_blank" rel="nofollow noreferrer noopener">Chromium is ~25 million lines of code</a>, followed closely by <a href="https://www.openhub.net/p/firefox" target="_blank" rel="nofollow noreferrer noopener">Firefox</a> and <a href="https://www.openhub.net/p/webkit" target="_blank" rel="nofollow noreferrer noopener">WebKit</a>) and around 200-300 new patches landing everyday. Try to imagine, for one second, how we could make changes if we didn&rsquo;t have such testing infrastructure. It would basically be utter and complete chao​s and, more especially, it would mean extremely buggy Web browsers, broken implementations of the <a href="https://webplatform.github.io" target="_blank" rel="nofollow noreferrer noopener">Web Platform</a> and tens (hundreds?) of new bugs and crashes piling up every day&hellip; not a good thing at all for Web browsers, which are these days some of the most widely used applications (and not just &rsquo;the thing you use to browse the Web&rsquo;).</p>
<p style="text-align: center;"><a href="https://i1.wp.com/mariospr.org/wp-content/uploads/2020/05/ChromiumTrybots.png"><img src="https://i1.wp.com/mariospr.org/wp-content/uploads/2020/05/ChromiumTrybots.png" alt="The Chromium Trybots in action" /></a>
<small><em>The Chromium Trybots in action</em></small></p>
Now, there are all different types of tests that Web engines run automatically on a regular basis: Unit tests for checking that APIs work as expected, platform-specific tests to make sure that your software runs correctly in different environments, performance tests to help browsers keep being fast and without increasing too much their memory footprint... and then, of course, there are the tests to make sure that the Web engines at the core of these projects implement the Web Platform correctly according to the numerous standards and specifications available.
<p>And it&rsquo;s here where I would like to bring your attention with this post because, when it comes to these last kind of tests (what we call &ldquo;Web tests&rdquo; or &ldquo;layout tests&rdquo;), each Web engine used to rely entirely on their own set of Web tests to make sure that they implemented the many different specifications correctly.</p>
<p>Clearly, there was some room for improvement here. It would be wonderful if we could have an engine-independent set of tests to test that a given implementation of the Web Platform works as expected, wouldn&rsquo;t it? We could use that across different engines to make sure not only that they work as expected, but also that they also behave <strong>exactly</strong> in the same way, and therefore give Web developers confidence on that they can rely on the different specifications without having to implement engine-specific quirks.</p>
<h2><a id="user-content-enter-the-web-platform-tests-project" class="anchor" href="#enter-the-web-platform-tests-project" aria-hidden="true"></a>Enter the Web Platform Tests project</h2>
Good news is that just such an ideal thing exists. It's called the <a href="https://web-platform-tests.org/index.html" target="_blank" rel="nofollow noreferrer noopener">Web Platform Tests project</a>. As it is concisely described in <a href="https://web-platform-tests.org/index.html" target="_blank" rel="nofollow noreferrer noopener">it's official site</a>:
<p><em>&ldquo;The web-platform-tests project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software which is compatible with other implementations, and that later implementations will be compatible with their implementations.&quot;</em></p>
<p>I&rsquo;d recommend visiting <a href="https://web-platform-tests.org/index.html">its website</a> if you&rsquo;re interested in the topic, watching the <a href="https://www.youtube.com/watch?v=zuK1uyXPZS0"><em>&ldquo;Introduction to the web-platform-tests&rdquo;</em> video</a> or even glance at <a href="https://github.com/web-platform-tests/wpt" target="_blank" rel="nofollow noreferrer noopener">the git repository containing all the tests here</a>. Here, you can also find specific information such as <a href="https://web-platform-tests.org/running-tests/index.html" target="_blank" rel="nofollow noreferrer noopener">how to run WPTs</a> or <a href="https://web-platform-tests.org/writing-tests/index.html" target="_blank" rel="nofollow noreferrer noopener">how to write them</a>. Also, you can have a look as well at the <a href="https://wpt.fyi" target="_blank" rel="nofollow noreferrer noopener">wpt.fyi dashboard</a> to get a sense of what tests exists and how some of the main browsers are doing.</p>
<p style="text-align: center;"><iframe src="https://www.youtube.com/embed/zuK1uyXPZS0" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
In short: I think it would be safe to say that <strong>this project is critical to the health of the whole Web Platform</strong>, and ultimately to Web developers. What's very, very surprising is how long it took to get to where it is, since it came into being only about <a href="https://www.w3.org/blog/2013/02/testing-the-open-web-platform/" target="_blank" rel="nofollow noreferrer noopener">halfway into the history of the Web</a> (there were <a href="https://lists.w3.org/Archives/Public/public-css-testsuite/2004Mar/0001.html">earlier testing efforts at the W3C</a>, but none that focused on automated &amp; shared testing). But regardless of that, this is an interesting challenge: Filling in all of the missing unified tests, while new things are being added all the time!
<p>Luckily, this was a challenge that did indeed took off and all the major Web engines can now proudly say that they are <strong>regularly running about 36500 of these Web engine-independent tests</strong> (providing <strong>~1.7 million sub-tests</strong> in total), and all the engines are showing off a <strong>pass rate between 91% and 98%</strong>. See the numbers below, as extracted from <a href="https://wpt.fyi/">today&rsquo;s WPT data</a>:</p>
<table border="0" cellspacing="0">
<tbody>
<tr>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle" height="17"><b>Chrome 84</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Edge 84</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Firefox 78</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Safari 105 preview</b></td>
</tr>
<tr>
<td style="text-align: center; padding: 2px;" height="17"><b>Pass</b></td>
<td style="text-align: center; padding: 2px;"><b>Total</b></td>
<td style="text-align: center; padding: 2px;"><b>Pass</b></td>
<td style="text-align: center; padding: 2px;"><b>Total</b></td>
<td style="text-align: center; padding: 2px;"><b>Pass</b></td>
<td style="text-align: center; padding: 2px;"><b>Total</b></td>
<td style="text-align: center; padding: 2px;"><b>Pass</b></td>
<td style="text-align: center; padding: 2px;"><b>Total</b></td>
</tr>
<tr>
<td style="text-align: center; padding: 2px;" valign="middle" height="17">1680105</td>
<td style="text-align: center; padding: 2px;">1714711</td>
<td style="text-align: center; padding: 2px;" valign="middle">1669977</td>
<td style="text-align: center; padding: 2px;">1714195</td>
<td style="text-align: center; padding: 2px;" valign="middle">1640985</td>
<td style="text-align: center; padding: 2px;">1698418</td>
<td style="text-align: center; padding: 2px;" valign="middle">1543625</td>
<td style="text-align: center; padding: 2px;">1695743</td>
</tr>
<tr>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle" height="17"><b>Pass rate: 97.98%</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Pass rate: 97.42%</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Pass rate: 96.62%</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Pass rate: 91.03%</b></td>
</tr>
</tbody>
</table>
And here at <a href="http://www.igalia.com">Igalia</a>, we've recently had the opportunity to work on this for a little while and so I'd like to write a bit about that...
<h2><a id="user-content-the-web-platform-project-and-the-coronavirus-outbreak" class="anchor" href="#the-web-platform-project-and-the-coronavirus-outbreak" aria-hidden="true"></a>Upstreaming Chromium's tests during the Coronavirus Outbreak</h2>
As you all know, we're in the middle of an unprecedented world-wide crisis that is affecting everyone in one way or another. One particular consequence of it in the context of the Chromium project is that <a href="https://blog.chromium.org/2020/03/upcoming-chrome-releases.html" target="_blank" rel="nofollow noreferrer noopener">Chromium releases were paused for a while</a>. On top of this, some <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-dev/Vn7uzglqLz0/6oGsNFUZEAAJ" target="_blank" rel="nofollow noreferrer noopener">constraints on what could be landed upstream were put in place</a> to guarantee quality and stability of the Chromium platform during this strange period we're going through these days.
<p>These particular constraints impacted my team in that we couldn&rsquo;t really keep working on the tasks we were working on up to that point, in the context of <a href="http://www.chromium.org">the Chromium project</a>. Our involvement with the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE/edit#heading=h.uokewwiwnmn" target="_blank" rel="nofollow noreferrer noopener">Blink Onion Soup 2.0 project</a> usually requires the landing of relatively large refactors, and these kind of changes were forbidden for the time being.</p>
<p>Fortunately, we found an opportunity to collaborate in the meantime with the Web Platform Tests project by <strong>analyzing and trying to upstream many of the existing Chromium-specific tests</strong> that haven&rsquo;t yet been unified. This is important because tests exist for widely used specifications, but if they aren&rsquo;t in Web Platform Tests, their utility and benefits are limited to Chromium. If done well, this would mean that all of the tests that we managed to upstream would be immediately available for everyone else too. Firefox and WebKit-based browsers would not only be able to identify missing features and bugs, but also be provided with an extra set of tests to check that they were implementing these features correctly, and interoperably.</p>
<p style="text-align: center;"><a href="https://i0.wp.com/mariospr.org/wp-content/uploads/2020/05/WPTDashboard.png"><img src="https://i0.wp.com/mariospr.org/wp-content/uploads/2020/05/WPTDashboard.png" alt="The WPT Dashboard" /></a>
<small><em>The WPT Dashboard</em></small></p>
It was an interesting challenge considering that we had to switch very quickly from writing <em>C++</em> code around the <a href="https://www.chromium.org/developers/design-documents/inter-process-communication">IPC layers of Chromium</a> to analyzing, migrating and upstreaming Web tests from the huge pool of Chromium tests. We focused mainly on <a href="https://drafts.csswg.org/css-grid-2/">CSS Grid Layout</a>, <a href="https://drafts.csswg.org/css-flexbox-1/">Flexbox</a>, <a href="https://drafts.fxtf.org/css-masking-1/">Masking</a> and <a href="https://drafts.fxtf.org/filter-effects">Filters</a> related tests... but I think the results were quite good in the end:
<p>As of today, I&rsquo;m happy to report that, during the ~<strong>4 weeks we worked on this</strong> my team <strong><a href="https://docs.google.com/spreadsheets/u/2/d/1Fw1YRl9S8WNUkwwaFXZ0MCE0Qi3RcOJPPJm2tWhz6xw">migrated 240 Chromium-specific Web tests</a> to the Web Platform Tests&rsquo; upstream repository</strong>, helping increase test coverage in other Web Engines and thus helping towards improving interoperability among browsers:</p>
<ul>
 	<li><strong>CSS Flexbox</strong>: 89 tests migrated</li>
 	<li><strong>CSS Filters</strong>: 44 tests migrated</li>
 	<li><strong>CSS Masking</strong>: 13 tests migrated</li>
 	<li><strong>CSS Grid Layout</strong>: 94 tests migrated</li>
</ul>
But there is more to this than just numbers. Ultimately, as I said before, these migrations should help <strong>identifying missing features and bugs</strong> in other Web engines, and that was precisely the case here. You can easily see this by checking the <strong><a href="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;chfieldto=2020-04-25&amp;chfield=%5BBug%20creation%5D&amp;resolution=---&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=INACTIVE&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;resolution=INCOMPLETE&amp;resolution=SUPPORT&amp;resolution=EXPIRED&amp;resolution=MOVED&amp;chfieldfrom=2020-03-22&amp;order=Last%20Updated&amp;query_format=advanced&amp;short_desc=wpt%20new%20failures%20css&amp;short_desc_type=allwordssubstr&amp;classification=Components&amp;product=Core">list of automatically created bugs in Firefox's bugzilla</a></strong>, as well as <a href="https://bugs.webkit.org/show_bug.cgi?id=210091">some</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=210586">of</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=210587">the</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=209983">bugs</a> filed in <strong><a href="https://bugs.webkit.org/">WebKit's bugzilla</a></strong> during the time we worked on this.
<p>&hellip;and note that this doesn&rsquo;t even include the additional <strong>96 Chromium-specific tests that we analyzed but determined were not yet eligible</strong> for migrating to WPT (normally because they relied on some internal Chromium API or non-standard behaviour), which would require further work to get them upstreamed. But that was a bit out of scope for those few weeks we could work on this, so we decided to focus on upstreaming the rest of tests instead.</p>
<p>Personally, I think this was a big win for the Web Platform and I&rsquo;m very proud and happy to have had an opportunity to have contributed to it during these dark times we&rsquo;re living, as part of my job at <a href="http://www.igalia.com">Igalia</a>. Now I&rsquo;m back to working on the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE/edit#heading=h.uokewwiwnmn" target="_blank" rel="nofollow noreferrer noopener">Blink Onion Soup 2.0 project</a>, where I think I should write about too, but that&rsquo;s a topic for a different blog post.</p>
<h2><a id="user-content-credit-where-credit-is-due" class="anchor" href="#credit-where-credit-is-due" aria-hidden="true"></a>Credit where credit is due</h2>
<a href="https://www.igalia.com"><img src="https://i2.wp.com/mariospr.org/wp-content/uploads/2020/05/IgaliaLogoSmall.png" alt="Igalia" align="right" /></a>I wouldn't want to finish off this blog post without acknowledging all the different contributors who tirelessly worked on this effort to help improve the Web Platform by providing the WPT project with these many tests more, so here it is:
<p>From the <a href="http://www.igalia.com">Igalia</a> side, my whole team was the one which took on this challenge, that is: Abhijeet, Antonio, Gyuyoung, Henrique, Julie, Shin and myself. Kudos everyone!</p>
<p>And from the reviewing side, many people chimed in but I&rsquo;d like to thank in particular the following persons, who were deeply involved with the whole effort from beginning to end regardless of their affiliation: Christian Biesinger, David Grogan, Robert Ma, Stephen Chenney, Fredrik Söderquist, Manuel Rego Casasnovas and Javier Fernandez. Many thanks to all of you!</p>
<p>Take care and stay safe!</p>
]]></content:encoded></item></channel></rss>