Commit 1597f447 authored by Julian Watson's avatar Julian Watson Committed by Commit Bot

crostini: remove SubPagePortForwarding logging

Logging was added to the SubPagePortForwarding tests in
182b5776 to diagnose test flakes.

The test proved to no longer be flakey, so the logging can be removed.

Bug: 1056268
Change-Id: I306ae2ee7d1f8107f95059e89f28065fcd7d1161
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152048
Commit-Queue: Julian Watson <juwa@google.com>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Auto-Submit: Julian Watson <juwa@google.com>
Reviewed-by: default avatarNic Hollingum <hollingum@google.com>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759522}
parent 3c7cc1ba
......@@ -357,7 +357,6 @@ suite('CrostiniPageTests', function() {
/** @type {?SettingsCrostiniPortForwarding} */
let subpage;
setup(async function() {
/*TODO(juwa): remove*/ console.log(`setting up ${this.test.title}`);
setCrostiniPrefs(true, {
forwardedPorts: [
{
......@@ -375,47 +374,27 @@ suite('CrostiniPageTests', function() {
]
});
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
settings.Router.getInstance().navigateTo(
settings.routes.CROSTINI_PORT_FORWARDING);
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
subpage = crostiniPage.$$('settings-crostini-port-forwarding');
assertTrue(!!subpage);
/*TODO(juwa): remove*/ console.log(`setup ${this.test.title}`);
});
test('Forwarded ports are shown', function() {
/*TODO(juwa): remove*/ console.log(`running ${this.test.title}`);
// Extra list item for the titles.
assertEquals(
3, subpage.shadowRoot.querySelectorAll('.list-item').length);
/*TODO(juwa): remove*/ console.log(`ran ${this.test.title}`);
});
test('AddPortSuccess', async function() {
/*TODO(juwa): remove*/ console.log(`running ${this.test.title}`);
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
subpage = crostiniPage.$$('settings-crostini-port-forwarding');
subpage.$$('#addPort cr-button').click();
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
subpage = subpage.$$('settings-crostini-add-port-dialog');
const portNumberInput = subpage.$$('#portNumberInput');
portNumberInput.value = '5000';
......@@ -424,24 +403,14 @@ suite('CrostiniPageTests', function() {
subpage.$$('cr-dialog cr-button[id="continue"]').click();
assertEquals(
1, crostiniBrowserProxy.getCallCount('addCrostiniPortForward'));
/*TODO(juwa): remove*/ console.log(`ran ${this.test.title}`);
});
test('AddPortFail', async function() {
/*TODO(juwa): remove*/ console.log(`running ${this.test.title}`);
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
subpage = crostiniPage.$$('settings-crostini-port-forwarding');
subpage.$$('#addPort cr-button').click();
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
subpage = subpage.$$('settings-crostini-add-port-dialog');
const portNumberInput = subpage.$$('#portNumberInput');
portNumberInput.value = 'INVALID_PORT_NUMBER';
......@@ -458,36 +427,21 @@ suite('CrostiniPageTests', function() {
subpage.$$('cr-dialog cr-button[id="continue"]').click();
assertEquals(
1, crostiniBrowserProxy.getCallCount('addCrostiniPortForward'));
/*TODO(juwa): remove*/ console.log(`ran ${this.test.title}`);
});
test('AddPortCancel', async function() {
/*TODO(juwa): remove*/ console.log(`running ${this.test.title}`);
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
subpage = crostiniPage.$$('settings-crostini-port-forwarding');
subpage.$$('#addPort cr-button').click();
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
subpage = subpage.$$('settings-crostini-add-port-dialog');
subpage.$$('cr-dialog cr-button[id="cancel"]').click();
/*TODO(juwa): remove*/ console.log(
`before flushAsync ${this.test.title}`);
await flushAsync();
/*TODO(juwa): remove*/ console.log(
`after flushAsync ${this.test.title}`);
subpage = crostiniPage.$$('settings-crostini-port-forwarding');
assertTrue(!!subpage);
/*TODO(juwa): remove*/ console.log(`ran ${this.test.title}`);
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment