aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bg/js/backend.js2
-rw-r--r--ext/bg/js/search.js2
-rw-r--r--test/test-document.js18
-rw-r--r--test/test-stylesheet.css32
4 files changed, 20 insertions, 34 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 6e5235ed..d0d53a36 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -695,7 +695,7 @@ class Backend {
await Backend._focusTab(tab);
if (queryParams.query) {
await new Promise((resolve) => chrome.tabs.sendMessage(
- tab.id, {action: 'searchQueryUpdate', params: {query: queryParams.query}}, resolve
+ tab.id, {action: 'searchQueryUpdate', params: {text: queryParams.query}}, resolve
));
}
return true;
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index f9481ea2..5881f6f8 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -56,7 +56,7 @@ class DisplaySearch extends Display {
]);
this._runtimeMessageHandlers = new Map([
- ['searchQueryUpdate', ({query}) => { this.onExternalSearchUpdate(query); }]
+ ['searchQueryUpdate', this.onExternalSearchUpdate.bind(this)]
]);
}
diff --git a/test/test-document.js b/test/test-document.js
index ab5f5716..80b9719d 100644
--- a/test/test-document.js
+++ b/test/test-document.js
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2020 Alex Yatskov <alex@foosoft.net>
+ * Author: Alex Yatskov <alex@foosoft.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
const fs = require('fs');
const path = require('path');
const assert = require('assert');
diff --git a/test/test-stylesheet.css b/test/test-stylesheet.css
deleted file mode 100644
index ab25732e..00000000
--- a/test/test-stylesheet.css
+++ /dev/null
@@ -1,32 +0,0 @@
-body {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 14px;
- max-width: 680px;
- padding: 0 1em;
- box-sizing: border-box;
- margin: 0 auto;
- background-color: #f8f8f8;
- counter-reset: test-id;
-}
-
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
-
-.test {
- background-color: #ffffff;
- margin: 1em 0;
- padding: 0.5em;
- box-shadow: rgba(64, 64, 64, 0.3) 0px 1px 2px 0px, rgba(64, 64, 64, 0.15) 0px 1px 3px 1px;
- border-radius: 4px;
-}
-
-.test:before {
- content: "Test " counter(test-id);
- display: block;
- counter-increment: test-id;
- margin-bottom: 0.5em;
- border-bottom: 1px solid #d8d8d8;
- font-weight: bold;
-}