mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-23 23:10:44 -04:00
Improve duplicate URL warning (#9635)
Co-authored-by: varjolintu <sami.vanttinen@protonmail.com>
This commit is contained in:
parent
aecd154399
commit
eee4ca9a26
7 changed files with 58 additions and 3 deletions
|
@ -668,3 +668,19 @@ void TestBrowser::testBestMatchingWithAdditionalURLs()
|
|||
QCOMPARE(sorted.length(), 1);
|
||||
QCOMPARE(sorted[0]->url(), urls[0]);
|
||||
}
|
||||
|
||||
void TestBrowser::testIsUrlIdentical()
|
||||
{
|
||||
QVERIFY(browserService()->isUrlIdentical("https://example.com", "https://example.com"));
|
||||
QVERIFY(browserService()->isUrlIdentical("https://example.com", " https://example.com "));
|
||||
QVERIFY(!browserService()->isUrlIdentical("https://example.com", "https://example2.com"));
|
||||
QVERIFY(!browserService()->isUrlIdentical("https://example.com/", "https://example.com/#login"));
|
||||
QVERIFY(browserService()->isUrlIdentical("https://example.com", "https://example.com/"));
|
||||
QVERIFY(browserService()->isUrlIdentical("https://example.com/", "https://example.com"));
|
||||
QVERIFY(browserService()->isUrlIdentical("https://example.com/ ", " https://example.com"));
|
||||
QVERIFY(!browserService()->isUrlIdentical("https://example.com/", " example.com"));
|
||||
QVERIFY(browserService()->isUrlIdentical("https://example.com/path/to/nowhere",
|
||||
"https://example.com/path/to/nowhere/"));
|
||||
QVERIFY(!browserService()->isUrlIdentical("https://example.com/", "://example.com/"));
|
||||
QVERIFY(browserService()->isUrlIdentical("ftp://127.0.0.1/", "ftp://127.0.0.1"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue