mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
461c76981f
At first I was going for a more minimal replacement of mw.Uri with URL, until I discovered that this code depends on a mw.Uri bug that would be difficult to replicate: // Expected: Relative URLs are accepted new mw.Uri( '/foo' ).toString() // => 'https://localhost/foo' // Expected: Protocol is optional new mw.Uri( 'example.com/foo' ).toString() // => 'https://example.com/foo' // Unexpected: Treated as empty domain with no protocol rather than relative URL new mw.Uri( './foo' ).toString() // => 'https://./foo' So I went for a bigger rewrite to preserve the intent rather than the exact logic. I had to change some test cases to use more realistic fake data. They previously relied on bugs in our URL handling to pass despite the base URLs being incorrect, particularly for non-short URLs (see T270219). In my testing non-short URLs behave the same as before in practice. Depends-On: I07a8c097dba0f5572c0aedf4febdf1434063ea6f Bug: T325249 Change-Id: I232361266c1dda795b88018c3aaa3d9ecbe42b93 |
||
---|---|---|
.. | ||
ce | ||
dm | ||
init/targets | ||
preinit | ||
ui | ||
.eslintrc.json | ||
ve.test.utils.js |