Collection of prospective test flake fixes

Potentially related:
https://github.com/Polymer/web-component-tester/issues/505

Bug: Issue 5792
Change-Id: I9ab6e8e40d9811dd52906335426764c052907609
This commit is contained in:
Viktar Donich
2017-03-28 17:02:44 -07:00
parent 0712042c72
commit 29e1ce5e84
84 changed files with 251 additions and 93 deletions

View File

@@ -25,6 +25,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-change-list-item.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-list-item></gr-change-list-item>

View File

@@ -25,6 +25,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-change-list-view.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-list-view></gr-change-list-view>
@@ -50,8 +52,11 @@ limitations under the License.
sandbox = sinon.sandbox.create();
});
teardown(function() {
teardown(function(done) {
flush(function() {
sandbox.restore();
done();
});
});
test('url is properly encoded', function() {
@@ -170,7 +175,7 @@ limitations under the License.
var stub = sandbox.stub(page, 'show');
element.params = {view: 'gr-change-list-view', query: CHANGE_ID};
flushAsynchronousOperations();
flushAsynchronousOperations()
assert.isFalse(stub.called);
});
@@ -181,7 +186,7 @@ limitations under the License.
var stub = sandbox.stub(page, 'show');
element.params = {view: 'gr-change-list-view', query: CHANGE_ID};
flushAsynchronousOperations();
flushAsynchronousOperations()
assert.isFalse(stub.called);
});

View File

@@ -25,6 +25,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-change-list.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-list></gr-change-list>

View File

@@ -67,7 +67,7 @@
this._loading = false;
}.bind(this)).catch(function(err) {
this._loading = false;
console.error(err.message);
console.warn(err.message);
}.bind(this));
},

View File

@@ -23,6 +23,8 @@ limitations under the License.
<link rel="import" href="gr-dashboard-view.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-dashboard-view></gr-dashboard-view>

View File

@@ -25,6 +25,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-account-entry.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-account-entry></gr-account-entry>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-account-list.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-account-list></gr-account-list>

View File

@@ -25,6 +25,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-change-actions.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-actions></gr-change-actions>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-change-metadata</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-change-metadata.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-metadata></gr-change-metadata>

View File

@@ -18,13 +18,15 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-change-view</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../bower_components/page/page.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-change-view.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-view></gr-change-view>
@@ -48,8 +50,11 @@ limitations under the License.
element = fixture('basic');
});
teardown(function() {
teardown(function(done) {
flush(function() {
sandbox.restore();
done();
});
});
suite('keyboard shortcuts', function() {
@@ -812,16 +817,16 @@ limitations under the License.
test('reply dialog focus can be controlled', function() {
var FocusTarget = element.$.replyDialog.FocusTarget;
var openSpy = sandbox.spy(element, '_openReplyDialog');
var openStub = sandbox.stub(element, '_openReplyDialog');
var e = {detail: {}};
element._handleShowReplyDialog(e);
assert(openSpy.lastCall.calledWithExactly(FocusTarget.REVIEWERS),
assert(openStub.lastCall.calledWithExactly(FocusTarget.REVIEWERS),
'_openReplyDialog should have been passed REVIEWERS');
e.detail.value = {ccsOnly: true};
element._handleShowReplyDialog(e);
assert(openSpy.lastCall.calledWithExactly(FocusTarget.CCS),
assert(openStub.lastCall.calledWithExactly(FocusTarget.CCS),
'_openReplyDialog should have been passed CCS');
});

View File

@@ -18,10 +18,12 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-comment-list</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-comment-list.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-comment-list></gr-comment-list>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-commit-info</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-commit-info.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-commit-info></gr-commit-info>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-confirm-cherrypick-dialog</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-confirm-cherrypick-dialog.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-confirm-cherrypick-dialog></gr-confirm-cherrypick-dialog>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-confirm-rebase-dialog</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-confirm-rebase-dialog.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-confirm-rebase-dialog></gr-confirm-rebase-dialog>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-confirm-revert-dialog</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-confirm-revert-dialog.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-confirm-revert-dialog></gr-confirm-revert-dialog>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-download-dialog.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-download-dialog></gr-download-dialog>

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-file-list</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../bower_components/page/page.js"></script>
<script src="../../../scripts/util.js"></script>
@@ -26,6 +26,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-file-list.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-file-list></gr-file-list>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-message.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-message></gr-message>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-messages-list.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-messages-list></gr-messages-list>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-related-changes-list.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-related-changes-list></gr-related-changes-list>

View File

@@ -570,6 +570,8 @@
},
_getStorageLocation: function() {
// Tests trigger this method without setting change.
if (!this.change) { return {}; }
return {
changeNum: this.change._number,
patchNum: this.patchNum,

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-reply-dialog</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-reply-dialog.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-reply-dialog></gr-reply-dialog>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-reviewer-list</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-reviewer-list.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-reviewer-list></gr-reviewer-list>

View File

@@ -66,6 +66,7 @@
},
_getTopContent: function(account) {
// if (!account) { return []; }
return [
{text: account.name, bold: true},
{text: account.email},

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-account-dropdown</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-account-dropdown.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-account-dropdown></gr-account-dropdown>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-error-manager</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-error-manager.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-error-manager></gr-error-manager>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-main-header</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-main-header.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-main-header></gr-main-header>

View File

@@ -18,11 +18,13 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-reporting</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-reporting.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-reporting></gr-reporting>

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-search-bar</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../bower_components/page/page.js"></script>
@@ -26,6 +26,8 @@ limitations under the License.
<link rel="import" href="gr-search-bar.html">
<script src="../../../scripts/util.js"></script>
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-search-bar></gr-search-bar>

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-diff-builder</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../scripts/util.js"></script>
<script src="../gr-diff/gr-diff-line.js"></script>
@@ -29,6 +29,8 @@ limitations under the License.
<link rel="import" href="../../shared/gr-rest-api-interface/mock-diff-response_test.html">
<link rel="import" href="gr-diff-builder.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff-builder>

View File

@@ -25,6 +25,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-diff-comment-thread-group.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff-comment-thread-group></gr-diff-comment-thread-group>

View File

@@ -167,6 +167,7 @@
var c1Date = c1.__date || util.parseDate(c1.updated);
var c2Date = c2.__date || util.parseDate(c2.updated);
var dateCompare = c1Date - c2Date;
if (!c1.id || !c1.id.localeCompare) { return 0; }
// If same date, fall back to sorting by id.
return dateCompare ? dateCompare : c1.id.localeCompare(c2.id);
});
@@ -328,7 +329,7 @@
var index = this._indexOf(comment, this.comments);
if (index === -1) {
// This should never happen: comment belongs to another thread.
console.error('Comment update for another comment thread.');
console.warn('Comment update for another comment thread.');
return;
}
this.set(['comments', index], comment);

View File

@@ -25,6 +25,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-diff-comment-thread.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff-comment-thread></gr-diff-comment-thread>

View File

@@ -26,6 +26,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-diff-comment.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff-comment></gr-diff-comment>

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-diff-cursor</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../scripts/util.js"></script>
@@ -27,6 +27,8 @@ limitations under the License.
<link rel="import" href="./gr-diff-cursor.html">
<link rel="import" href="../../shared/gr-rest-api-interface/mock-diff-response_test.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<mock-diff-response></mock-diff-response>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-annotation</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="gr-annotation.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<div>Lorem ipsum dolor sit amet, suspendisse inceptos vehicula</div>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-diff-highlight</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-diff-highlight.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<style>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-diff-preferences</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-diff-preferences.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff-preferences></gr-diff-preferences>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-diff-processor test</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-diff-processor.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff-processor></gr-diff-processor>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-diff-selection</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-diff-selection.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff-selection>

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-diff-view</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../bower_components/page/page.js"></script>
<script src="../../../scripts/util.js"></script>
@@ -26,6 +26,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-diff-view.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff-view></gr-diff-view>

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-diff</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../scripts/util.js"></script>
@@ -26,6 +26,8 @@ limitations under the License.
<link rel="import" href="../../shared/gr-rest-api-interface/mock-diff-response_test.html">
<link rel="import" href="gr-diff.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-diff></gr-diff>

View File

@@ -18,13 +18,15 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-patch-range-select</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../bower_components/page/page.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-patch-range-select.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-patch-range-select auto></gr-patch-range-select>

View File

@@ -18,13 +18,15 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-ranged-comment-layer</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../gr-diff/gr-diff-line.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-ranged-comment-layer.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-ranged-comment-layer></gr-ranged-comment-layer>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-selection-action-box</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-selection-action-box.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<div>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-syntax-layer</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../shared/gr-rest-api-interface/mock-diff-response_test.html">
<link rel="import" href="gr-syntax-layer.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-syntax-layer></gr-syntax-layer>

View File

@@ -18,11 +18,13 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-syntax-lib-loader</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-syntax-lib-loader.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-syntax-lib-loader></gr-syntax-lib-loader>

View File

@@ -110,7 +110,7 @@
// Preferences are cached when a user is logged in; warm them.
this.$.restAPI.getPreferences();
this.$.restAPI.getDiffPreferences();
this.$.errorManager.knownAccountId = this._account._account_id;
this.$.errorManager.knownAccountId = this._account && this._account._account_id || null;
},
_viewChanged: function(view) {

View File

@@ -23,6 +23,8 @@ limitations under the License.
<link rel="import" href="gr-app.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-app id="app"></gr-app>
@@ -40,7 +42,8 @@ limitations under the License.
appStarted: sandbox.stub(),
});
stub('gr-rest-api-interface', {
getAccount: function() { return Promise.resolve(null); },
getAccount: function() { return Promise.resolve({}); },
getAccountCapabilities: function() { return Promise.resolve({}); },
getConfig: function() {
return Promise.resolve({
gerrit: {web_uis: ['GWT', 'POLYGERRIT']},

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-plugin-host</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-plugin-host.html">

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-account-info</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-account-info.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-account-info></gr-account-info>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-settings-view</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-change-table-editor.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-table-editor></gr-change-table-editor>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-email-editor</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-email-editor.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-email-editor></gr-email-editor>

View File

@@ -18,11 +18,13 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-settings-view</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-group-list.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-group-list></gr-group-list>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-settings-view</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-http-password.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-http-password></gr-http-password>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-settings-view</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-menu-editor.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-menu-editor></gr-menu-editor>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-registration-dialog</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-registration-dialog.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-registration-dialog></gr-registration-dialog>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-settings-view</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-settings-view.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-settings-view></gr-settings-view>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-ssh-editor</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-ssh-editor.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-ssh-editor></gr-ssh-editor>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-settings-view</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-watched-projects-editor.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-watched-projects-editor></gr-watched-projects-editor>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="gr-account-label.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-account-label></gr-account-label>

View File

@@ -23,6 +23,8 @@ limitations under the License.
<link rel="import" href="gr-account-link.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-account-link></gr-account-link>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-reviewer-list</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-autocomplete.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-autocomplete></gr-autocomplete>

View File

@@ -23,6 +23,8 @@ limitations under the License.
<link rel="import" href="gr-avatar.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-avatar></gr-avatar>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-button</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-button.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-button></gr-button>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-change-star.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-star></gr-change-star>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-confirm-dialog</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-confirm-dialog.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-confirm-dialog></gr-confirm-dialog>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-cursor-manager</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-cursor-manager.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-cursor-manager cursor-target-class="targeted"></gr-cursor-manager>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="gr-date-formatter.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-date-formatter date-str="2015-09-24 23:30:17.033000000"></gr-date-formatter>

View File

@@ -18,12 +18,14 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-dropdown</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-dropdown.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-dropdown></gr-dropdown>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="gr-editable-content.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-editable-content></gr-editable-content>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="gr-editable-label.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-editable-label

View File

@@ -23,6 +23,8 @@ limitations under the License.
<link rel="import" href="gr-formatted-text.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-formatted-text></gr-formatted-text>

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-change-actions-js-api</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
@@ -28,6 +28,8 @@ breaking changes to gr-change-actions wont be noticed.
-->
<link rel="import" href="../../change/gr-change-actions/gr-change-actions.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-change-actions></gr-change-actions>

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-change-reply-js-api</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
@@ -28,6 +28,8 @@ breaking changes to gr-reply-dialog wont be noticed.
-->
<link rel="import" href="../../change/gr-reply-dialog/gr-reply-dialog.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-reply-dialog></gr-reply-dialog>

View File

@@ -18,10 +18,12 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-api-interface</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-js-api-interface.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-js-api-interface></gr-js-api-interface>

View File

@@ -25,6 +25,8 @@ limitations under the License.
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-linked-chip.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-linked-chip></gr-linked-chip>

View File

@@ -24,6 +24,8 @@ limitations under the License.
<link rel="import" href="gr-linked-text.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-linked-text>

View File

@@ -18,13 +18,15 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-rest-api-interface</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../../scripts/util.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
<link rel="import" href="gr-rest-api-interface.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-rest-api-interface></gr-rest-api-interface>
@@ -39,6 +41,13 @@ limitations under the License.
setup(function() {
sandbox = sinon.sandbox.create();
element = fixture('basic');
var testJSON = ')]}\'\n{"hello": "bonjour"}';
sandbox.stub(window, 'fetch').returns(Promise.resolve({
ok: true,
text: function() {
return Promise.resolve(testJSON);
},
}));
});
teardown(function() {
@@ -46,16 +55,6 @@ limitations under the License.
});
test('JSON prefix is properly removed', function(done) {
var testJSON = ')]}\'\n{"hello": "bonjour"}';
sandbox.stub(window, 'fetch', function() {
return Promise.resolve({
ok: true,
text: function() {
return Promise.resolve(testJSON);
},
});
});
element.fetchJSON('/dummy/url').then(function(obj) {
assert.deepEqual(obj, {hello: 'bonjour'});
done();
@@ -113,13 +112,11 @@ limitations under the License.
test('request callbacks can be canceled', function(done) {
var cancelCalled = false;
sandbox.stub(window, 'fetch', function() {
return Promise.resolve({
window.fetch.returns(Promise.resolve({
body: {
cancel: function() { cancelCalled = true; },
},
});
});
}));
element.fetchJSON('/dummy/url', null, function() { return true; }).then(
function(obj) {
assert.isUndefined(obj);
@@ -416,9 +413,7 @@ limitations under the License.
test('server error', function(done) {
var getResponseObjectStub = sandbox.stub(element, 'getResponseObject');
sandbox.stub(window, 'fetch', function() {
return Promise.resolve({ok: false});
});
window.fetch.returns(Promise.resolve({ok: false}));
var serverErrorEventPromise = new Promise(function(resolve) {
element.addEventListener('server-error', function() { resolve(); });
});
@@ -446,6 +441,7 @@ limitations under the License.
text: function() { return Promise.resolve(')]}\'{}'); },
},
];
window.fetch.restore();
sandbox.stub(window, 'fetch', function(url) {
if (url === '/accounts/self/detail') {
return Promise.resolve(responses.shift());
@@ -563,13 +559,12 @@ limitations under the License.
'PUT', '/config/server/email.confirm', {token: 'foo'}));
});
test('GrReviewerUpdatesParser.parse is used', function(done) {
test('GrReviewerUpdatesParser.parse is used', function() {
sandbox.stub(GrReviewerUpdatesParser, 'parse').returns(
Promise.resolve('foo'));
element.getChangeDetail(42).then(function(result) {
return element.getChangeDetail(42).then(function(result) {
assert.isTrue(GrReviewerUpdatesParser.parse.calledOnce);
assert.equal(result, 'foo');
done();
});
});

View File

@@ -18,7 +18,7 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-reviewer-updates-parser</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">

View File

@@ -18,11 +18,13 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-select</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-select.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<select is="gr-select">

View File

@@ -17,11 +17,13 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-storage</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-storage.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-storage></gr-storage>

View File

@@ -17,11 +17,13 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-storage</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-tooltip-content.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-tooltip-content>

View File

@@ -17,11 +17,13 @@ limitations under the License.
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-storage</title>
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="gr-tooltip.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-tooltip>