667
edits
Changes
→1. Get a Partner
While you're not required to do this lab with a partner, I encourage everyone who wants to do so to go ahead and find one. Open source is best when done in community, and learning how to work with others on debugging and code fixes is a good skill.
After today's lab, you can continue to work on Slack.
==2. Build Brave==
* The code for fixing URL bar input in Brave is written in JavaScript, see https://github.com/brave/browser-laptop/blob/master/js/lib/urlutil.js
* The equivalent code in Firefox is written in C++, see https://searchfox.org/mozilla-central/source/docshell/base/nsDefaultURIFixup.cpp
* The equivalent code in Chrome is also written in C++, see https://cs.chromium.org/chromium/src/components/url_formatter/url_fixer_unittesturl_fixer.cc and https://cs.chromium.org/chromium/src/components/url_formatter/url_fixer.h
Read through both files and try to orient yourself. Don't get hung-up on understanding every single line, especially in the Firefox code, which uses lots of internal APIs and [https://en.wikipedia.org/wiki/XPCOM XPCOM base code]. Instead, try to find clues as to how each one is doing what it does with input strings before converting them to URLs.
* Did you notice any other interesting differences between browsers and how they handle strings in the URL bar?
* How did you write tests for these cases?
* What did you notice in the Firefox /Chrome code that was both similar and different to the Brave URL handling code?
* What did you have to do in order to get Brave to work the same as other browsers?
* What did you need to learn in order to complete the work?