Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/runners/edge_process.js

Issue 29940622: Issue 7116 Run browser test in Microsoft Edge (Closed)
Patch Set: Created Nov. 9, 2018, 7:44 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test_runner.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runners/edge_process.js
diff --git a/test/runners/edge_process.js b/test/runners/edge_process.js
new file mode 100644
index 0000000000000000000000000000000000000000..4df91febbf92428acb0534f1a3fcc8d8d019e226
--- /dev/null
+++ b/test/runners/edge_process.js
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-present eyeo GmbH
+ *
+ * Adblock Plus is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus 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 Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+"use strict";
+
+const edge = require("selenium-webdriver/edge");
+const {executeScript} = require("./webdriver");
+
+function runScript(script, scriptName, scriptArgs)
+{
+ let service = new edge.ServiceBuilder()
+ // Due to some incompatibilities between selenium-webdriver 3.6
+ // and Microsoft Edge webdriver we have to use the JSON wire protocol.
+ // However once we update to selenium-webdriver 4.0 we should remove this line.
+ .addArguments("--jwp")
+ .build();
+ let options = new edge.Options();
+
+ let driver = edge.Driver.createSession(options, service);
+
+ return executeScript(driver, "Microsoft Edge (WebDriver)",
+ script, scriptName, scriptArgs);
+}
+
+module.exports = function(script, scriptName, ...scriptArgs)
+{
+ return runScript(script, scriptName, scriptArgs);
+};
« no previous file with comments | « no previous file | test_runner.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld