From f6f64297aa030cd3fbad4bbb9e322e469bc762e8 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 4 Feb 2018 19:27:22 +0900 Subject: first webextension test --- e2e/ambassador/src/background/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'e2e/ambassador/src/background/index.js') diff --git a/e2e/ambassador/src/background/index.js b/e2e/ambassador/src/background/index.js index e69de29..027c953 100644 --- a/e2e/ambassador/src/background/index.js +++ b/e2e/ambassador/src/background/index.js @@ -0,0 +1,12 @@ +import { WINDOWS_CREATE, WINDOWS_REMOVE } from '../shared/messages'; +import { receiveContentMessage } from './ipc'; + +receiveContentMessage((message) => { + switch (message.type) { + case WINDOWS_CREATE: + return browser.windows.create(); + case WINDOWS_REMOVE: + return browser.windows.remove(message.windowId); + } +}); + -- cgit v1.2.3