summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/resources/chromium/content-index-helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/resources/chromium/content-index-helpers.js')
-rw-r--r--testing/web-platform/tests/resources/chromium/content-index-helpers.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/web-platform/tests/resources/chromium/content-index-helpers.js b/testing/web-platform/tests/resources/chromium/content-index-helpers.js
new file mode 100644
index 0000000000..936fe84c9b
--- /dev/null
+++ b/testing/web-platform/tests/resources/chromium/content-index-helpers.js
@@ -0,0 +1,9 @@
+import {ContentIndexService} from '/gen/third_party/blink/public/mojom/content_index/content_index.mojom.m.js';
+
+// Returns a promise if the chromium based browser fetches icons for
+// content-index.
+export async function fetchesIcons() {
+ const remote = ContentIndexService.getRemote();
+ const {iconSizes} = await remote.getIconSizes();
+ return iconSizes.length > 0;
+};