Skip to content

Commit

Permalink
Add support for Ladybird
Browse files Browse the repository at this point in the history
  • Loading branch information
tcl3 committed Jul 17, 2024
1 parent 6bfef54 commit 7bcc926
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shared/browsers.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var defaultBrowsers = []string{

// An extra list of known browsers.
var extraBrowsers = []string{
"android_webview", "chrome_android", "chrome_ios", "chromium", "deno", "epiphany", "firefox_android", "flow", "node.js", "servo", "uc", "wktr", "webkitgtk",
"android_webview", "chrome_android", "chrome_ios", "chromium", "deno", "epiphany", "firefox_android", "flow", "ladybird", "node.js", "servo", "uc", "wktr", "webkitgtk",
}

var allBrowsers mapset.Set
Expand Down
2 changes: 2 additions & 0 deletions shared/browsers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func TestGetDefaultBrowserNames(t *testing.T) {
assert.NotEqual(t, "epiphany", n)
assert.NotEqual(t, "firefox_android", n)
assert.NotEqual(t, "flow", n)
assert.NotEqual(t, "ladybird", n)
assert.NotEqual(t, "node.js", n)
assert.NotEqual(t, "servo", n)
assert.NotEqual(t, "wktr", n)
Expand All @@ -43,6 +44,7 @@ func TestIsBrowserName(t *testing.T) {
assert.True(t, IsBrowserName("firefox"))
assert.True(t, IsBrowserName("firefox_android"))
assert.True(t, IsBrowserName("flow"))
assert.True(t, IsBrowserName("ladybird"))
assert.True(t, IsBrowserName("node.js"))
assert.True(t, IsBrowserName("safari"))
assert.True(t, IsBrowserName("chrome_android"))
Expand Down
2 changes: 2 additions & 0 deletions shared/product_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ func (p ProductSpec) DisplayName() string {
return "Firefox Android"
case "flow":
return "Flow"
case "ladybird":
return "Ladybird"
case "node.js":
return "Node.js"
case "safari":
Expand Down
5 changes: 3 additions & 2 deletions webapp/components/product-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const DisplayNames = (() => {
m.set('deno', 'Deno');
m.set('firefox_android', 'Firefox Android');
m.set('flow', 'Flow');
m.set('ladybird', 'Ladybird');
m.set('node.js', 'Node.js');
m.set('servo', 'Servo');
m.set('uc', 'UC Browser');
Expand Down Expand Up @@ -48,7 +49,7 @@ const versionPatterns = Object.freeze({

// The set of all browsers known to the wpt.fyi UI.
const AllBrowserNames = Object.freeze(['android_webview', 'chrome_android', 'chrome_ios', 'chrome',
'chromium', 'deno', 'edge', 'firefox_android', 'firefox', 'flow', 'node.js', 'safari', 'servo', 'webkitgtk', 'wktr']);
'chromium', 'deno', 'edge', 'firefox_android', 'firefox', 'flow', 'ladybird', 'node.js', 'safari', 'servo', 'webkitgtk', 'wktr']);

// The list of default browsers used in cases where the user has not otherwise
// chosen a set of browsers (e.g. which browsers to show runs for). Stored as
Expand Down Expand Up @@ -181,7 +182,7 @@ const ProductInfo = (superClass) => class extends superClass {
// although it would be better to have some variant of the Firefox logo.
return '/static/geckoview_64x64.png';

} else if (name !== 'chromium' && name !== 'deno' && name !== 'flow' && name !== 'node.js' && name !== 'servo' && name !== 'wktr') { // Products without per-channel logos.
} else if (name !== 'chromium' && name !== 'deno' && name !== 'flow' && name !== 'ladybird' && name !== 'node.js' && name !== 'servo' && name !== 'wktr') { // Products without per-channel logos.
let channel;
const candidates = ['beta', 'dev', 'canary', 'nightly', 'preview'];
for (const label of candidates) {
Expand Down
1 change: 1 addition & 0 deletions webapp/components/test/wpt-amend-metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
expect(appFixture.getSearchURL('/a/b.html', 'wktr')).to.equal('https://bugs.webkit.org/buglist.cgi?quicksearch="/a/b"');
expect(appFixture.getSearchURL('/a/b.html', 'webkitgtk')).to.equal('https://bugs.webkit.org/buglist.cgi?quicksearch="/a/b"');
expect(appFixture.getSearchURL('/a/b.html', 'servo')).to.equal('https://github.com/servo/servo/issues?q="/a/b"');
expect(appFixture.getSearchURL('/a/b.html', 'ladybird')).to.equal('https://github.com/LadybirdBrowser/ladybird/issues?q="/a/b"');
});
test('hasFileIssueURL', () => {
expect(appFixture.hasFileIssueURL('')).to.be.true;
Expand Down
5 changes: 5 additions & 0 deletions webapp/components/wpt-amend-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ class AmendMetadata extends LoadingState(PathInfo(ProductInfo(PolymerElement)))
'deno',
'edge',
'firefox',
'ladybird',
'node.js',
'safari',
'servo',
Expand Down Expand Up @@ -326,6 +327,10 @@ class AmendMetadata extends LoadingState(PathInfo(ProductInfo(PolymerElement)))
return `https://bugzilla.mozilla.org/buglist.cgi?quicksearch="${testName}"`;
}

if (product === 'ladybird') {
return `https://github.com/LadybirdBrowser/ladybird/issues?q=${testName}"`;
}

if (product === 'node.js') {
return `https://github.com/nodejs/node/issues?q="${testName}"`;
}
Expand Down
Binary file added webapp/static/ladybird_64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7bcc926

Please sign in to comment.