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. 8, 2018, 10:01 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/lib/filterNotifier.js b/test/runners/edge_process.js
similarity index 52%
copy from lib/filterNotifier.js
copy to test/runners/edge_process.js
index f10be3ef2e3dfd05affaea0fce8b83cdd99abf83..c9630d4c8b08c27326cfe1905d127e358be9cca0 100644
--- a/lib/filterNotifier.js
+++ b/test/runners/edge_process.js
@@ -17,17 +17,29 @@
"use strict";
-/**
- * @fileOverview This component manages listeners and calls them to distribute
- * messages about filter changes.
- */
+const edge = require("selenium-webdriver/edge");
Sebastian Noack 2018/11/09 19:13:43 Nit: The blank line here seems superfluous.
geo 2018/11/09 19:45:09 Done.
-const {EventEmitter} = require("./events");
+const {executeScript} = require("./webdriver");
-/**
- * This object allows registering and triggering listeners for filter events.
- * @type {EventEmitter}
- */
-let filterNotifier = new EventEmitter();
+function runScript(script, scriptName, scriptArgs)
+{
+ let service = new edge.ServiceBuilder()
+ .addArguments("--jwp")
Sebastian Noack 2018/11/09 19:13:43 Mind adding a comment why that is necessary, and t
geo 2018/11/09 19:45:09 Done.
+ .build();
+ let options = new edge.Options();
+
+ let driver = edge.Driver.createSession(options, service);
+
+ return executeScript(driver, "Microsoft Edge (WebDriver)",
+ script, scriptName, scriptArgs);
+}
-exports.filterNotifier = filterNotifier;
+module.exports = function(script, scriptName, ...scriptArgs)
+{
+ return runScript(script, scriptName, scriptArgs)
+ .then(result => result)
+ .catch(error =>
+ {
+ throw error;
+ });
Sebastian Noack 2018/11/09 19:13:43 What is the purpose of the then() and catch() call
geo 2018/11/09 19:45:09 Done.
+};
« 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