Skip to content

Add support for Blitz #4372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", "wpewebkit",
"android_webview", "blitz", "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 @@ -20,6 +20,7 @@ func TestGetDefaultBrowserNames(t *testing.T) {
// Non default browser names:
for _, n := range names {
assert.NotEqual(t, "android_webview", n)
assert.NotEqual(t, "blitz", n)
assert.NotEqual(t, "chrome_android", n)
assert.NotEqual(t, "chrome_ios", n)
assert.NotEqual(t, "chromium", n)
Expand All @@ -38,6 +39,7 @@ func TestGetDefaultBrowserNames(t *testing.T) {
}

func TestIsBrowserName(t *testing.T) {
assert.True(t, IsBrowserName("blitz"))
assert.True(t, IsBrowserName("chrome"))
assert.True(t, IsBrowserName("chromium"))
assert.True(t, IsBrowserName("deno"))
Expand Down
2 changes: 2 additions & 0 deletions shared/product_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func (p ProductSpec) IsExperimental() bool {
// DisplayName returns a capitalized version of the product's name.
func (p ProductSpec) DisplayName() string {
switch p.BrowserName {
case "blitz":
return "Blitz"
case "chrome":
return "Chrome"
case "chromium":
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 @@ -10,6 +10,7 @@ const DisplayNames = (() => {
['firefox', 'firefox-experimental'].forEach(n => m.set(n, 'Firefox'));
['safari', 'safari-experimental'].forEach(n => m.set(n, 'Safari'));
m.set('android_webview', 'WebView');
m.set('blitz', 'Blitz');
m.set('chrome_android', 'ChromeAndroid');
m.set('chrome_ios', 'ChromeIOS');
m.set('chromium', 'Chromium');
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',
const AllBrowserNames = Object.freeze(['android_webview', 'blitz', 'chrome_android', 'chrome_ios', 'chrome',
'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
Expand Down Expand Up @@ -184,7 +185,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' && name !== 'webkitgtk' && name !== 'wpewebkit') { // Products without per-channel logos.
} else if (name !== 'blitz' && 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 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 @@ -167,6 +167,7 @@
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"');
expect(appFixture.getSearchURL('/a/b.html', 'blitz')).to.equal('https://github.com/DioxusLabs/blitz/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 @@ -309,6 +309,7 @@ class AmendMetadata extends LoadingState(PathInfo(ProductInfo(PolymerElement)))

hasSearchURL(product) {
return [
'blitz',
'chrome',
'chromium',
'deno',
Expand All @@ -332,6 +333,10 @@ class AmendMetadata extends LoadingState(PathInfo(ProductInfo(PolymerElement)))
testName = testName.replace(/((\/\*)?$)/, '');
}

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

if (product === 'chrome' || product === 'chromium' || product === 'edge') {
return `https://issues.chromium.org/issues?q="${testName}"`;
}
Expand Down
Binary file added webapp/static/blitz_64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.