667
edits
Changes
no edit summary
* 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_fixerurl_fixer_unittest.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?