Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: milo/appengine/frontend/milo_test.go

Issue 2525493002: Milo: Add themed page for errors (Closed)
Patch Set: Review Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: milo/appengine/frontend/milo_test.go
diff --git a/milo/appengine/frontend/milo_test.go b/milo/appengine/frontend/milo_test.go
index 4ff321c7108218fb99145c55656012d97d4e86ed..3fb78b6a9261c938e93d6f916ca0330355c7701f 100644
--- a/milo/appengine/frontend/milo_test.go
+++ b/milo/appengine/frontend/milo_test.go
@@ -9,6 +9,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
+ "net/url"
"path/filepath"
"reflect"
"regexp"
@@ -78,12 +79,12 @@ func (m fakeOAuthMethod) Authenticate(context.Context, *http.Request) (*auth.Use
}, nil
}
-func (m fakeOAuthMethod) LoginURL(context.Context, string) (string, error) {
- return "https://login.url/", nil
+func (m fakeOAuthMethod) LoginURL(c context.Context, target string) (string, error) {
+ return "https://login.url/?target=" + target, nil
}
-func (m fakeOAuthMethod) LogoutURL(context.Context, string) (string, error) {
- return "https://logout.url/", nil
+func (m fakeOAuthMethod) LogoutURL(c context.Context, target string) (string, error) {
+ return "https://logout.url/?target=" + target, nil
}
type analyticsSettings struct {
@@ -100,6 +101,7 @@ func TestPages(t *testing.T) {
// Load all the bundles.
c := context.Background()
c = memory.Use(c)
+ c = settings.WithRequest(c, &http.Request{URL: &url.URL{Path: "/foobar"}})
c, _ = testclock.UseTime(c, testclock.TestTimeUTC)
a := auth.Authenticator{fakeOAuthMethod{"some_client_id"}}
c = auth.SetAuthenticator(c, a)

Powered by Google App Engine
This is Rietveld 408576698