diff --git a/api/query/atoms.go b/api/query/atoms.go
index fe089ff0c0a..6595558b870 100644
--- a/api/query/atoms.go
+++ b/api/query/atoms.go
@@ -45,8 +45,6 @@ import (
"github.com/web-platform-tests/wpt.fyi/shared"
)
-var browsers = shared.GetDefaultBrowserNames()
-
// AbstractQuery is an intermetidate representation of a test results query that
// has not been bound to specific shared.TestRun specs for processing.
type AbstractQuery interface {
diff --git a/api/test_runs_medium_test.go b/api/test_runs_medium_test.go
index b7fd42f6d78..01c08adc0b3 100644
--- a/api/test_runs_medium_test.go
+++ b/api/test_runs_medium_test.go
@@ -210,7 +210,7 @@ func TestGetTestRuns_SHA(t *testing.T) {
body, _ = ioutil.ReadAll(resp.Result().Body)
assert.Equal(t, http.StatusOK, resp.Code)
json.Unmarshal(body, &results)
- assert.Equal(t, 4, len(results))
+ assert.Equal(t, 3, len(results))
assert.Equal(t, "1111111111", results[0].Revision)
}
diff --git a/shared/browsers.go b/shared/browsers.go
index caa1975642e..e0fa7dc0b75 100644
--- a/shared/browsers.go
+++ b/shared/browsers.go
@@ -9,12 +9,12 @@ import (
// A list of browsers that are shown on the homepage by default.
// (Must be sorted alphabetically!)
var defaultBrowsers = []string{
- "chrome", "edge", "firefox", "safari",
+ "chrome", "firefox", "safari",
}
// An extra list of known browsers.
var extraBrowsers = []string{
- "android_webview", "epiphany", "servo", "uc", "webkitgtk",
+ "android_webview", "edge", "epiphany", "servo", "uc", "webkitgtk",
}
var allBrowsers mapset.Set
diff --git a/webapp/components/product-info.js b/webapp/components/product-info.js
index fc62922fb1f..156137b0a28 100644
--- a/webapp/components/product-info.js
+++ b/webapp/components/product-info.js
@@ -42,7 +42,9 @@ const AllBrowserNames = Object.freeze(['chrome', 'edge', 'firefox', 'safari', 's
// 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
// an ordered list so that the first entry can be used as a consistent default.
-const DefaultBrowserNames = Object.freeze(['chrome', 'edge', 'firefox', 'safari']);
+//
+// This should be kept in sync with defaultBrowsers in shared/browsers.go
+const DefaultBrowserNames = Object.freeze(['chrome', 'firefox', 'safari']);
const DefaultProductSpecs = DefaultBrowserNames;
// The above sets, encoded as product objects. This avoids repeatedly calling
diff --git a/webapp/views/wpt-app.js b/webapp/views/wpt-app.js
index 55d3a13e3c7..19663b6a40d 100644
--- a/webapp/views/wpt-app.js
+++ b/webapp/views/wpt-app.js
@@ -1,4 +1,5 @@
import { PathInfo } from '../components/path.js';
+import { DefaultBrowserNames } from '../components/product-info.js';
import '../components/test-runs-query-builder.js';
import { TestRunsUIBase } from '../components/test-runs.js';
import '../components/test-search.js';
@@ -130,6 +131,9 @@ class WPTApp extends PathInfo(WPTFlags(TestRunsUIBase)) {
(switch to the default product set instead)
+
+ (add Microsoft Edge back)
+
a")
+ if err != nil {
+ assert.FailNow(t, fmt.Sprintf("Error when locating info-banner anchors: %s", err.Error()))
+ }
+ var edgeAnchor selenium.WebElement
+ foundEdgeAnchor := false
+ for _, anchor := range anchors {
+ text, err := anchor.Text()
+ if err != nil {
+ assert.FailNow(t, fmt.Sprintf("Error when loading Text() for element: %s", err.Error()))
+ }
+
+ if strings.Contains(text, "add Microsoft Edge back") {
+ edgeAnchor = anchor
+ foundEdgeAnchor = true
+ break
+ }
+ }
+
+ // Verify that it either is or is not shown depending on expectation.
+ if !shouldBeShown {
+ assert.False(t, foundEdgeAnchor)
+ return
+ }
+ assert.True(t, foundEdgeAnchor)
+
+ // Now click on the anchor and make sure it loads the page with params.
+ err = edgeAnchor.Click()
+ if err != nil {
+ assert.FailNow(t, fmt.Sprintf("Error when clicking on anchor: %s", err.Error()))
+ }
+
+ newUrl, err := wd.CurrentURL()
+ if err != nil {
+ assert.FailNow(t, fmt.Sprintf("Error when getting current url: %s", err.Error()))
+ }
+ assert.Contains(t, newUrl, "product=edge")
+}
+
func TestQueryBuilder_MasterCheckedForMasterLabelQuery(t *testing.T) {
runWebdriverTest(t, func(t *testing.T, app AppServer, wd selenium.WebDriver) {
// Navigate to the wpt.fyi homepage.
diff --git a/webdriver/label_test.go b/webdriver/label_test.go
index 261b81a4315..ab56498953d 100644
--- a/webdriver/label_test.go
+++ b/webdriver/label_test.go
@@ -16,7 +16,7 @@ import (
func TestLabelParam_Results(t *testing.T) {
runWebdriverTest(t, func(t *testing.T, app AppServer, wd selenium.WebDriver) {
aligned := false
- testLabel(t, wd, app, "/", "experimental", "wpt-results", 4, aligned)
+ testLabel(t, wd, app, "/", "experimental", "wpt-results", 3, aligned)
})
}