Merge branch 'main' into avm99963-monorail
Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266
GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.js b/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.js
index a7870f6..faaaa63 100644
--- a/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.js
+++ b/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.test.js b/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.test.js
index 82e529d..4739650 100644
--- a/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.test.js
+++ b/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.js
index 54565cf..1ee898a 100644
--- a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.js
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.test.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.test.js
index 911c1a0..52c4f44 100644
--- a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.test.js
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.test.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.js
index e7c1cd3..312f84a 100644
--- a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.js
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.test.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.test.js
index 7a2dd5c..ab8aeb7 100644
--- a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.test.js
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js
index 08a8b25..d9ede34 100644
--- a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.test.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.test.js
index 954b8b9..bf54bdd 100644
--- a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.test.js
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js
index 690bd6a..3fff0f5 100644
--- a/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js
+++ b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js
@@ -1,9 +1,9 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {LitElement, html, css} from 'lit-element';
-
+import {generateProjectIssueURL} from 'shared/helpers.js';
/**
* `<mr-crbug-link>`
*
@@ -75,8 +75,9 @@
issue.projectName == 'chromium' ? '' : issue.projectName + '/');
return `https://crbug.com/${projectPart}${issue.localId}`;
}
- const issueType = issue.approvalValues ? 'approval' : 'detail';
- return `/p/${issue.projectName}/issues/${issueType}?id=${issue.localId}`;
+ const issueType = issue.approvalValues ? '/approval' : '/detail';
+ const params = {'id': issue.localId};
+ return generateProjectIssueURL(issue.projectName, issueType, params);
}
_getHost() {
diff --git a/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js
index aa7f21f..85a1b0c 100644
--- a/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js
+++ b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js
index 1f8b01a..970849d 100644
--- a/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js
+++ b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js
index 7071b77..c0b97a4 100644
--- a/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js
+++ b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js
index 029de6c..0aaa998 100644
--- a/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js
+++ b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,8 +6,6 @@
import {ifDefined} from 'lit-html/directives/if-defined';
import {issueRefToString, issueRefToUrl} from 'shared/convertersV0.js';
import {SHARED_STYLES} from 'shared/shared-styles.js';
-import '../../mr-dropdown/mr-dropdown.js';
-import '../../../help/mr-cue/mr-fed-ref-cue.js';
/**
* `<mr-issue-link>`
@@ -24,41 +22,19 @@
a[is-closed] {
text-decoration: line-through;
}
- mr-dropdown {
- width: var(--chops-main-font-size);
- --mr-dropdown-icon-font-size: var(--chops-main-font-size);
- --mr-dropdown-menu-min-width: 100px;
- }
`,
];
}
/** @override */
render() {
- let fedRefInfo;
- if (this.issue && this.issue.extIdentifier) {
- fedRefInfo = html`
- <!-- TODO(jeffcarp): Figure out CSS to enable menuAlignment=left -->
- <mr-dropdown
- label="Federated Reference Info"
- icon="info_outline"
- menuAlignment="right"
- >
- <mr-fed-ref-cue
- cuePrefName="federated_reference"
- fedRefShortlink=${this.issue.extIdentifier}
- nondismissible>
- </mr-fed-ref-cue>
- </mr-dropdown>
- `;
- }
return html`
<a
id="bugLink"
href=${this.href}
title=${ifDefined(this.issue && this.issue.summary)}
?is-closed=${this.isClosed}
- >${this._linkText}</a>${fedRefInfo}`;
+ >${this._linkText}</a>`;
}
/** @override */
diff --git a/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js
index 1bd3ae9..7e5f899 100644
--- a/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js
+++ b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js
@@ -1,14 +1,16 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {assert} from 'chai';
import {MrIssueLink} from './mr-issue-link.js';
+import sinon from 'sinon';
let element;
describe('mr-issue-link', () => {
beforeEach(() => {
+ window.ga = sinon.stub();
element = document.createElement('mr-issue-link');
document.body.appendChild(element);
});
@@ -97,42 +99,6 @@
assert.equal(link.title, '');
});
- it('displays an icon for federated references', async () => {
- element.issue = {
- extIdentifier: 'b/5678',
- };
-
- await element.updateComplete;
-
- const dropdown = element.shadowRoot.querySelector('mr-dropdown');
- assert.isNotNull(dropdown);
- const anchor = dropdown.shadowRoot.querySelector('.anchor');
- assert.isNotNull(anchor);
- assert.include(anchor.innerText, 'info_outline');
- });
-
- it('displays an info popup for federated references', async () => {
- element.issue = {
- extIdentifier: 'b/5678',
- };
-
- await element.updateComplete;
-
- const dropdown = element.shadowRoot.querySelector('mr-dropdown');
- const anchor = dropdown.shadowRoot.querySelector('.anchor');
- anchor.click();
-
- await dropdown.updateComplete;
-
- assert.isTrue(dropdown.opened);
-
- const cue = dropdown.querySelector('mr-fed-ref-cue');
- assert.isNotNull(cue);
- const message = cue.shadowRoot.querySelector('#message');
- assert.isNotNull(message);
- assert.include(message.innerText, 'Buganizer issue tracker');
- });
-
it('shows title when summary is defined', async () => {
element.issue = {
projectName: 'test',
diff --git a/static_src/elements/framework/links/mr-user-link/mr-user-link.js b/static_src/elements/framework/links/mr-user-link/mr-user-link.js
index 8e5be27..7cb15ef 100644
--- a/static_src/elements/framework/links/mr-user-link/mr-user-link.js
+++ b/static_src/elements/framework/links/mr-user-link/mr-user-link.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js b/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js
index ec84074..8b3331b 100644
--- a/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js
+++ b/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-autocomplete/mr-autocomplete.js b/static_src/elements/framework/mr-autocomplete/mr-autocomplete.js
index c37eb42..b5bdc14 100644
--- a/static_src/elements/framework/mr-autocomplete/mr-autocomplete.js
+++ b/static_src/elements/framework/mr-autocomplete/mr-autocomplete.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-autocomplete/mr-autocomplete.test.js b/static_src/elements/framework/mr-autocomplete/mr-autocomplete.test.js
index 0c4e3ae..b3aaba8 100644
--- a/static_src/elements/framework/mr-autocomplete/mr-autocomplete.test.js
+++ b/static_src/elements/framework/mr-autocomplete/mr-autocomplete.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-button-bar/mr-button-bar.js b/static_src/elements/framework/mr-button-bar/mr-button-bar.js
index 8cff503..d586042 100644
--- a/static_src/elements/framework/mr-button-bar/mr-button-bar.js
+++ b/static_src/elements/framework/mr-button-bar/mr-button-bar.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-button-bar/mr-button-bar.test.js b/static_src/elements/framework/mr-button-bar/mr-button-bar.test.js
index 349a8df..ef4471a 100644
--- a/static_src/elements/framework/mr-button-bar/mr-button-bar.test.js
+++ b/static_src/elements/framework/mr-button-bar/mr-button-bar.test.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-comment-content/mr-attachment.js b/static_src/elements/framework/mr-comment-content/mr-attachment.js
index c435dfd..5db8017 100644
--- a/static_src/elements/framework/mr-comment-content/mr-attachment.js
+++ b/static_src/elements/framework/mr-comment-content/mr-attachment.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-comment-content/mr-attachment.test.js b/static_src/elements/framework/mr-comment-content/mr-attachment.test.js
index ec79c66..976e85c 100644
--- a/static_src/elements/framework/mr-comment-content/mr-attachment.test.js
+++ b/static_src/elements/framework/mr-comment-content/mr-attachment.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-comment-content/mr-comment-content.js b/static_src/elements/framework/mr-comment-content/mr-comment-content.js
index c2bf3e8..0b490e4 100644
--- a/static_src/elements/framework/mr-comment-content/mr-comment-content.js
+++ b/static_src/elements/framework/mr-comment-content/mr-comment-content.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-comment-content/mr-comment-content.test.js b/static_src/elements/framework/mr-comment-content/mr-comment-content.test.js
index 4eeaab5..d5bf499 100644
--- a/static_src/elements/framework/mr-comment-content/mr-comment-content.test.js
+++ b/static_src/elements/framework/mr-comment-content/mr-comment-content.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-comment-content/mr-description.js b/static_src/elements/framework/mr-comment-content/mr-description.js
index 89ae105..9244e82 100644
--- a/static_src/elements/framework/mr-comment-content/mr-description.js
+++ b/static_src/elements/framework/mr-comment-content/mr-description.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -55,6 +55,7 @@
/** @override */
render() {
const selectedDescription = this.selectedDescription;
+ const author = selectedDescription.commenter ? selectedDescription.commenter.displayName: '';
return html`
<div class="select-container">
@@ -67,7 +68,7 @@
</div>
<mr-comment-content
.content=${selectedDescription.content}
- .author=${selectedDescription.commenter.displayName}
+ .author=${author}
></mr-comment-content>
<div>
${(selectedDescription.attachments || []).map((attachment) => html`
diff --git a/static_src/elements/framework/mr-comment-content/mr-description.test.js b/static_src/elements/framework/mr-comment-content/mr-description.test.js
index 9d39149..98b4fe8 100644
--- a/static_src/elements/framework/mr-comment-content/mr-description.test.js
+++ b/static_src/elements/framework/mr-comment-content/mr-description.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-dropdown/mr-account-dropdown.js b/static_src/elements/framework/mr-dropdown/mr-account-dropdown.js
index 15c3e7c..ed27db7 100644
--- a/static_src/elements/framework/mr-dropdown/mr-account-dropdown.js
+++ b/static_src/elements/framework/mr-dropdown/mr-account-dropdown.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-dropdown/mr-account-dropdown.test.js b/static_src/elements/framework/mr-dropdown/mr-account-dropdown.test.js
index f365823..f857507 100644
--- a/static_src/elements/framework/mr-dropdown/mr-account-dropdown.test.js
+++ b/static_src/elements/framework/mr-dropdown/mr-account-dropdown.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-dropdown/mr-dropdown.js b/static_src/elements/framework/mr-dropdown/mr-dropdown.js
index 4564ab0..e6fe543 100644
--- a/static_src/elements/framework/mr-dropdown/mr-dropdown.js
+++ b/static_src/elements/framework/mr-dropdown/mr-dropdown.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-dropdown/mr-dropdown.test.js b/static_src/elements/framework/mr-dropdown/mr-dropdown.test.js
index 51f8ce9..ec340ed 100644
--- a/static_src/elements/framework/mr-dropdown/mr-dropdown.test.js
+++ b/static_src/elements/framework/mr-dropdown/mr-dropdown.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-error/mr-error.js b/static_src/elements/framework/mr-error/mr-error.js
index 084a326..2af7e6f 100644
--- a/static_src/elements/framework/mr-error/mr-error.js
+++ b/static_src/elements/framework/mr-error/mr-error.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-header/mr-header.js b/static_src/elements/framework/mr-header/mr-header.js
index 5b9defa..b29db00 100644
--- a/static_src/elements/framework/mr-header/mr-header.js
+++ b/static_src/elements/framework/mr-header/mr-header.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -15,6 +15,7 @@
import '../mr-dropdown/mr-account-dropdown.js';
import './mr-search-bar.js';
+import {generateProjectIssueURL} from 'shared/helpers.js';
import {SHARED_STYLES} from 'shared/shared-styles.js';
import {logEvent} from 'monitoring/client-logger.js';
@@ -147,7 +148,7 @@
.queryParams=${this.queryParams}
.issueEntryUrl=${this.issueEntryUrl}
></mr-keystrokes>
- <a href="/p/${this.projectName}/issues/list" class="home-link">
+ <a href="${generateProjectIssueURL(this.projectName, '/list')}" class="home-link">
${this.projectThumbnailUrl ? html`
<img
class="project-logo"
@@ -338,9 +339,9 @@
const mayBeRedirectedToWizard = role === projectRoles.NONE;
if (!this.userDisplayName || !config || !config.customIssueEntryUrl ||
!mayBeRedirectedToWizard) {
- return `/p/${this.projectName}/issues/entry`;
+ return generateProjectIssueURL(this.projectName, '/entry');
}
-
+ //TODO(monorail/12012) redirec to tracker once new chromium wizard is ready.
return `/p/${this.projectName}/issues/wizard`;
}
@@ -365,7 +366,7 @@
items.push({text: 'My Projects', separator: true});
projects.forEach((project) => {
- items.push({text: project, url: `/p/${project}/issues/list`});
+ items.push({text: project, url: generateProjectIssueURL(project, '/list')});
});
}
@@ -374,7 +375,7 @@
items.push({text: 'Starred Projects', separator: true});
starredProjects.forEach((project) => {
- items.push({text: project, url: `/p/${project}/issues/list`});
+ items.push({text: project, url: generateProjectIssueURL(project, '/list')});
});
}
diff --git a/static_src/elements/framework/mr-header/mr-header.test.js b/static_src/elements/framework/mr-header/mr-header.test.js
index e290584..49e7bab 100644
--- a/static_src/elements/framework/mr-header/mr-header.test.js
+++ b/static_src/elements/framework/mr-header/mr-header.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -161,12 +161,13 @@
});
});
+ // TODO(b/283983843): Prefix project names with "mock".
it('_projectDropdownItems computes projects for user', () => {
element.userProjects = {
ownerOf: ['chromium'],
memberOf: ['v8'],
- contributorTo: ['skia'],
- starredProjects: ['gerrit'],
+ contributorTo: ['mockskia'],
+ starredProjects: ['mockgerrit'],
};
element.userDisplayName = 'test@example.com';
@@ -177,13 +178,13 @@
// My Projects
assert.equal(items[1].text, 'chromium');
assert.equal(items[1].url, '/p/chromium/issues/list');
- assert.equal(items[2].text, 'skia');
- assert.equal(items[2].url, '/p/skia/issues/list');
+ assert.equal(items[2].text, 'mockskia');
+ assert.equal(items[2].url, '/p/mockskia/issues/list');
assert.equal(items[3].text, 'v8');
assert.equal(items[3].url, '/p/v8/issues/list');
// Starred Projects
- assert.equal(items[5].text, 'gerrit');
- assert.equal(items[5].url, '/p/gerrit/issues/list');
+ assert.equal(items[5].text, 'mockgerrit');
+ assert.equal(items[5].url, '/p/mockgerrit/issues/list');
});
});
diff --git a/static_src/elements/framework/mr-header/mr-search-bar.js b/static_src/elements/framework/mr-header/mr-search-bar.js
index 536dfcf..5156c01 100644
--- a/static_src/elements/framework/mr-header/mr-search-bar.js
+++ b/static_src/elements/framework/mr-header/mr-search-bar.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-header/mr-search-bar.test.js b/static_src/elements/framework/mr-header/mr-search-bar.test.js
index c758a41..d8db788 100644
--- a/static_src/elements/framework/mr-header/mr-search-bar.test.js
+++ b/static_src/elements/framework/mr-header/mr-search-bar.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.js b/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.js
index 13f8267..14329b3 100644
--- a/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.js
+++ b/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.test.js b/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.test.js
index cd124a5..894e7c6 100644
--- a/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.test.js
+++ b/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-issue-list/mr-issue-list.js b/static_src/elements/framework/mr-issue-list/mr-issue-list.js
index 3e0a279..d788da8 100644
--- a/static_src/elements/framework/mr-issue-list/mr-issue-list.js
+++ b/static_src/elements/framework/mr-issue-list/mr-issue-list.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-issue-list/mr-issue-list.test.js b/static_src/elements/framework/mr-issue-list/mr-issue-list.test.js
index 3861e32..b7a3b70 100644
--- a/static_src/elements/framework/mr-issue-list/mr-issue-list.test.js
+++ b/static_src/elements/framework/mr-issue-list/mr-issue-list.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {assert} from 'chai';
diff --git a/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.js b/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.js
index 5d6a97b..96b81be 100644
--- a/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.js
+++ b/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {css} from 'lit-element';
diff --git a/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.test.js b/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.test.js
index 495ffe2..4469471 100644
--- a/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.test.js
+++ b/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-issue-slo/mr-issue-slo.js b/static_src/elements/framework/mr-issue-slo/mr-issue-slo.js
index 5a3e42c..ac3dc1b 100644
--- a/static_src/elements/framework/mr-issue-slo/mr-issue-slo.js
+++ b/static_src/elements/framework/mr-issue-slo/mr-issue-slo.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-issue-slo/mr-issue-slo.test.js b/static_src/elements/framework/mr-issue-slo/mr-issue-slo.test.js
index 28d23eb..eeb55c7 100644
--- a/static_src/elements/framework/mr-issue-slo/mr-issue-slo.test.js
+++ b/static_src/elements/framework/mr-issue-slo/mr-issue-slo.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-issue-slo/slo-rules.js b/static_src/elements/framework/mr-issue-slo/slo-rules.js
index e351ae0..09f2b6c 100644
--- a/static_src/elements/framework/mr-issue-slo/slo-rules.js
+++ b/static_src/elements/framework/mr-issue-slo/slo-rules.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-issue-slo/slo-rules.test.js b/static_src/elements/framework/mr-issue-slo/slo-rules.test.js
index a48e5e2..2b370b6 100644
--- a/static_src/elements/framework/mr-issue-slo/slo-rules.test.js
+++ b/static_src/elements/framework/mr-issue-slo/slo-rules.test.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-keystrokes/mr-keystrokes.js b/static_src/elements/framework/mr-keystrokes/mr-keystrokes.js
index 9e932d6..1a61fae 100644
--- a/static_src/elements/framework/mr-keystrokes/mr-keystrokes.js
+++ b/static_src/elements/framework/mr-keystrokes/mr-keystrokes.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-keystrokes/mr-keystrokes.test.js b/static_src/elements/framework/mr-keystrokes/mr-keystrokes.test.js
index 0d7468f..8cc5085 100644
--- a/static_src/elements/framework/mr-keystrokes/mr-keystrokes.test.js
+++ b/static_src/elements/framework/mr-keystrokes/mr-keystrokes.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.js b/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.js
index a5f9d7a..28c13b6 100644
--- a/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.js
+++ b/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.test.js b/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.test.js
index b6dbb41..5350989 100644
--- a/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.test.js
+++ b/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-site-banner/mr-site-banner.js b/static_src/elements/framework/mr-site-banner/mr-site-banner.js
index 2a98a5c..263633e 100644
--- a/static_src/elements/framework/mr-site-banner/mr-site-banner.js
+++ b/static_src/elements/framework/mr-site-banner/mr-site-banner.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-site-banner/mr-site-banner.test.js b/static_src/elements/framework/mr-site-banner/mr-site-banner.test.js
index 527b942..0ee6b46 100644
--- a/static_src/elements/framework/mr-site-banner/mr-site-banner.test.js
+++ b/static_src/elements/framework/mr-site-banner/mr-site-banner.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-star/mr-issue-star.js b/static_src/elements/framework/mr-star/mr-issue-star.js
index 5255820..20420e2 100644
--- a/static_src/elements/framework/mr-star/mr-issue-star.js
+++ b/static_src/elements/framework/mr-star/mr-issue-star.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {connectStore, store} from 'reducers/base.js';
diff --git a/static_src/elements/framework/mr-star/mr-issue-star.test.js b/static_src/elements/framework/mr-star/mr-issue-star.test.js
index bb618f7..bd43354 100644
--- a/static_src/elements/framework/mr-star/mr-issue-star.test.js
+++ b/static_src/elements/framework/mr-star/mr-issue-star.test.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-star/mr-project-star.js b/static_src/elements/framework/mr-star/mr-project-star.js
index 14b2c73..9b72076 100644
--- a/static_src/elements/framework/mr-star/mr-project-star.js
+++ b/static_src/elements/framework/mr-star/mr-project-star.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {connectStore, store} from 'reducers/base.js';
diff --git a/static_src/elements/framework/mr-star/mr-project-star.test.js b/static_src/elements/framework/mr-star/mr-project-star.test.js
index 6afd982..796f35d 100644
--- a/static_src/elements/framework/mr-star/mr-project-star.test.js
+++ b/static_src/elements/framework/mr-star/mr-project-star.test.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-star/mr-star.js b/static_src/elements/framework/mr-star/mr-star.js
index fe509be..406811e 100644
--- a/static_src/elements/framework/mr-star/mr-star.js
+++ b/static_src/elements/framework/mr-star/mr-star.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-star/mr-star.test.js b/static_src/elements/framework/mr-star/mr-star.test.js
index 4db7877..0f39f81 100644
--- a/static_src/elements/framework/mr-star/mr-star.test.js
+++ b/static_src/elements/framework/mr-star/mr-star.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import sinon from 'sinon';
diff --git a/static_src/elements/framework/mr-tabs/mr-tabs.js b/static_src/elements/framework/mr-tabs/mr-tabs.js
index d14688e..0c40305 100644
--- a/static_src/elements/framework/mr-tabs/mr-tabs.js
+++ b/static_src/elements/framework/mr-tabs/mr-tabs.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-tabs/mr-tabs.test.js b/static_src/elements/framework/mr-tabs/mr-tabs.test.js
index 1d55c39..195cb5f 100644
--- a/static_src/elements/framework/mr-tabs/mr-tabs.test.js
+++ b/static_src/elements/framework/mr-tabs/mr-tabs.test.js
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-upload/mr-upload.js b/static_src/elements/framework/mr-upload/mr-upload.js
index 5fee672..bbc8318 100644
--- a/static_src/elements/framework/mr-upload/mr-upload.js
+++ b/static_src/elements/framework/mr-upload/mr-upload.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-upload/mr-upload.test.js b/static_src/elements/framework/mr-upload/mr-upload.test.js
index 0a0b1e8..1586634 100644
--- a/static_src/elements/framework/mr-upload/mr-upload.test.js
+++ b/static_src/elements/framework/mr-upload/mr-upload.test.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/static_src/elements/framework/mr-warning/mr-warning.js b/static_src/elements/framework/mr-warning/mr-warning.js
index 51de376..75adae0 100644
--- a/static_src/elements/framework/mr-warning/mr-warning.js
+++ b/static_src/elements/framework/mr-warning/mr-warning.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.