Disable loading favicion.ico for vaadin 14 tests (#4856)

This commit is contained in:
Lauri Tulmin 2021-12-10 05:53:21 +02:00 committed by GitHub
parent 458ebc5e55
commit 67aa8979a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,20 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package test.vaadin;
import com.vaadin.flow.server.ServiceInitEvent;
import com.vaadin.flow.server.VaadinServiceInitListener;
public class ApplicationServiceInitListener implements VaadinServiceInitListener {
@Override
public void serviceInit(ServiceInitEvent event) {
event.addBootstrapListener(
response -> {
// ensure that there is no need to request favicon.ico
response.getDocument().head().append("<link rel=\"icon\" href=\"data:,\">");
});
}
}

View File

@ -0,0 +1,20 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package test.vaadin;
import com.vaadin.flow.server.ServiceInitEvent;
import com.vaadin.flow.server.VaadinServiceInitListener;
public class ApplicationServiceInitListener implements VaadinServiceInitListener {
@Override
public void serviceInit(ServiceInitEvent event) {
event.addBootstrapListener(
response -> {
// ensure that there is no need to request favicon.ico
response.getDocument().head().append("<link rel=\"icon\" href=\"data:,\">");
});
}
}