Skip to content

Commit

Permalink
Add support for WPE WebKit product.
Browse files Browse the repository at this point in the history
* WPE WebKit is an upstream port of WebKit that shares much with
WebKitGTK, but there are significant differences between the two
ports. See: https://webkit.org/wpe

* Automatic daily runs of WPE WebKit on the WPT CI have been proposed
with Taskcluster at web-platform-tests/wpt#50487

* This commit also deletes the webkitgtk repeated logos since there
is no per-channel logo for webkitgtk (neither for wpewebkit)
  • Loading branch information
clopez committed Feb 5, 2025
1 parent e93f29d commit 4eedc01
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 5 deletions.
1 change: 1 addition & 0 deletions api/taskcluster/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ func TestTaskNameRegex(t *testing.T) {
assert.Equal(t, []string{"firefox-nightly", "testharness"}, tc.TaskNameRegex.FindStringSubmatch("wpt-firefox-nightly-testharness-5")[1:])
assert.Equal(t, []string{"firefox-stable", "wdspec"}, tc.TaskNameRegex.FindStringSubmatch("wpt-firefox-stable-wdspec-1")[1:])
assert.Equal(t, []string{"webkitgtk_minibrowser-nightly", "testharness"}, tc.TaskNameRegex.FindStringSubmatch("wpt-webkitgtk_minibrowser-nightly-testharness-2")[1:])
assert.Equal(t, []string{"wpewebkit_minibrowser-nightly", "testharness"}, tc.TaskNameRegex.FindStringSubmatch("wpt-wpewebkit_minibrowser-nightly-testharness-2")[1:])
assert.Nil(t, tc.TaskNameRegex.FindStringSubmatch("wpt-foo-bar--1"))
assert.Nil(t, tc.TaskNameRegex.FindStringSubmatch("wpt-foo-bar-"))
}
Expand Down
3 changes: 3 additions & 0 deletions results-processor/wptreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,9 @@ def normalize_product(report: WPTReport) -> Set[str]:
elif product == 'webkitgtk_minibrowser':
report.run_info['product'] = 'webkitgtk'
return {'webkitgtk', 'minibrowser'}
elif product == 'wpewebkit_minibrowser':
report.run_info['product'] = 'wpewebkit'
return {'wpewebkit', 'minibrowser'}
else:
return set()

Expand Down
24 changes: 24 additions & 0 deletions results-processor/wptreport_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,14 @@ def test_prepare_labels_from_browser_channel(self):
'webkitgtk_minibrowser'}
)

# WPE WebKit Nightly
r._report['run_info']['product'] = 'wpewebkit_minibrowser'
self.assertSetEqual(
prepare_labels(r, '', 'blade-runner'),
{'blade-runner', 'nightly', 'experimental',
'wpewebkit_minibrowser'}
)

# Firefox Nightly
r._report['run_info']['product'] = 'firefox'
self.assertSetEqual(
Expand Down Expand Up @@ -685,6 +693,22 @@ def test_normalize_product_webkitgtk_minibrowser(self):
'webkitgtk'
)

def test_normalize_product_wpewebkit_minibrowser(self):
r = WPTReport()
r._report = {
'run_info': {
'product': 'wpewebkit_minibrowser',
}
}
self.assertSetEqual(
normalize_product(r),
{'wpewebkit', 'minibrowser'}
)
self.assertEqual(
r.run_info['product'],
'wpewebkit'
)

def test_normalize_product_noop(self):
r = WPTReport()
r._report = {
Expand Down
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", "ladybird", "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", "wpewebkit",
}

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 @@ -32,6 +32,7 @@ func TestGetDefaultBrowserNames(t *testing.T) {
assert.NotEqual(t, "servo", n)
assert.NotEqual(t, "wktr", n)
assert.NotEqual(t, "webkitgtk", n)
assert.NotEqual(t, "wpewebkit", n)
assert.NotEqual(t, "uc", n)
}
}
Expand All @@ -54,6 +55,7 @@ func TestIsBrowserName(t *testing.T) {
assert.True(t, IsBrowserName("servo"))
assert.True(t, IsBrowserName("wktr"))
assert.True(t, IsBrowserName("webkitgtk"))
assert.True(t, IsBrowserName("wpewebkit"))
assert.True(t, IsBrowserName("uc"))
assert.False(t, IsBrowserName("not-a-browser"))
}
Expand Down
2 changes: 2 additions & 0 deletions shared/product_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ func (p ProductSpec) DisplayName() string {
return "macOS WebKit"
case "webkitgtk":
return "WebKitGTK"
case "wpewebkit":
return "WPE WebKit"
default:
return p.BrowserName
}
Expand Down
7 changes: 4 additions & 3 deletions webapp/components/product-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const DisplayNames = (() => {
m.set('uc', 'UC Browser');
m.set('wktr', 'macOS WebKit');
m.set('webkitgtk', 'WebKitGTK');
m.set('wpewebkit', 'WPE WebKit');
// Platforms
m.set('android', 'Android');
m.set('linux', 'Linux');
Expand Down Expand Up @@ -50,7 +51,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', 'ladybird', 'node.js', 'safari', 'servo', 'webkitgtk', 'wktr']);
'chromium', 'deno', 'edge', 'firefox_android', 'firefox', 'flow', 'ladybird', 'node.js', 'safari', 'servo', 'webkitgtk', 'wpewebkit', '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 @@ -183,7 +184,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 !== 'ladybird' && 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' && name !== 'webkitgtk' && name !== 'wpewebkit') { // Products without per-channel logos.
let channel;
const candidates = ['beta', 'dev', 'canary', 'nightly', 'preview'];
for (const label of candidates) {
Expand All @@ -207,7 +208,7 @@ const ProductInfo = (superClass) => class extends superClass {
}

minorIsSignificant(browserName) {
return browserName === 'deno' || browserName === 'flow' || browserName === 'safari' || browserName === 'webkitgtk';
return browserName === 'deno' || browserName === 'flow' || browserName === 'safari' || browserName === 'webkitgtk' || browserName === 'wpewebkit';
}

/**
Expand Down
12 changes: 12 additions & 0 deletions webapp/components/test/test-run.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,25 @@
assert.equal(trf.shortVersion('webkitgtk', '56.0a'), '56.0');
});

test('valid, major and minor', () => {
assert.equal(trf.shortVersion('wpewebkit', '1'), '1');
assert.equal(trf.shortVersion('wpewebkit', '2.3'), '2.3');
assert.equal(trf.shortVersion('wpewebkit', '3.4.5'), '3.4');
assert.equal(trf.shortVersion('wpewebkit', '4.5.6.7'), '4.5');
assert.equal(trf.shortVersion('wpewebkit', '765.687'), '765.687');
assert.equal(trf.shortVersion('wpewebkit', ' 11.0 '), '11.0');
assert.equal(trf.shortVersion('wpewebkit', '56.0a'), '56.0');
});

test('invalid', () => {
assert.equal(trf.shortVersion('chrome', 'five'), 'five');
assert.equal(trf.shortVersion('chrome', ''), '');
assert.equal(trf.shortVersion('safari', 'five'), 'five');
assert.equal(trf.shortVersion('safari', ''), '');
assert.equal(trf.shortVersion('webkitgtk', 'five'), 'five');
assert.equal(trf.shortVersion('webkitgtk', ''), '');
assert.equal(trf.shortVersion('wpewebkit', 'five'), 'five');
assert.equal(trf.shortVersion('wpewebkit', ''), '');
});
});

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 @@ -164,6 +164,7 @@
expect(appFixture.getSearchURL('/a/b.html', 'safari')).to.equal('https://bugs.webkit.org/buglist.cgi?quicksearch="/a/b"');
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', 'wpewebkit')).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"');
});
Expand Down
3 changes: 2 additions & 1 deletion webapp/components/wpt-amend-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ class AmendMetadata extends LoadingState(PathInfo(ProductInfo(PolymerElement)))
'servo',
'wktr',
'webkitgtk',
'wpewebkit',
].includes(product);
}

Expand Down Expand Up @@ -351,7 +352,7 @@ class AmendMetadata extends LoadingState(PathInfo(ProductInfo(PolymerElement)))
return `https://github.com/nodejs/node/issues?q="${testName}"`;
}

if (product === 'safari' || product === 'wktr' || product === 'webkitgtk') {
if (product === 'safari' || product === 'wktr' || product === 'webkitgtk' || product === 'wpewebkit') {
return `https://bugs.webkit.org/buglist.cgi?quicksearch="${testName}"`;
}

Expand Down
Binary file removed webapp/static/webkitgtk-beta_64x64.png
Binary file not shown.
Binary file removed webapp/static/webkitgtk-dev_64x64.png
Binary file not shown.
Binary file removed webapp/static/webkitgtk-nightly_64x64.png
Binary file not shown.
Binary file added webapp/static/wpewebkit_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 4eedc01

Please sign in to comment.