selenium-webdriver 4.0.0-alpha.3 → 4.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +9 -2
- package/README.md +2 -4
- package/chrome.js +19 -527
- package/chromium.js +762 -0
- package/edge.js +97 -58
- package/firefox.js +23 -5
- package/http/index.js +4 -0
- package/io/index.js +1 -1
- package/lib/actions.js +1 -1
- package/lib/atoms/get-attribute.js +1 -2
- package/lib/atoms/is-displayed.js +5 -6
- package/lib/atoms/make-atoms-module.js +17 -0
- package/lib/capabilities.js +17 -4
- package/lib/command.js +1 -0
- package/lib/http.js +8 -3
- package/lib/input.js +6 -6
- package/lib/logging.js +1 -1
- package/lib/webdriver.js +33 -3
- package/net/portprober.js +1 -1
- package/package.json +8 -9
- package/BUILD.bazel +0 -88
- package/example/chrome_android.js +0 -42
- package/example/chrome_mobile_emulation.js +0 -42
- package/example/firefox_channels.js +0 -77
- package/example/google_search.js +0 -50
- package/example/google_search_test.js +0 -72
- package/example/headless.js +0 -55
- package/example/logging.js +0 -68
- package/jasmine.json +0 -11
- package/lib/atoms/BUILD.bazel +0 -28
- package/lib/test/bootstrap_jasmine.js +0 -28
- package/lib/test/build.js +0 -156
- package/lib/test/data/actions/click.html +0 -24
- package/lib/test/data/actions/drag.html +0 -77
- package/lib/test/data/actions/record_click.html +0 -21
- package/lib/test/data/chrome/download.html +0 -2
- package/lib/test/data/firefox/webextension.xpi +0 -0
- package/lib/test/fileserver.js +0 -337
- package/lib/test/httpserver.js +0 -120
- package/lib/test/index.js +0 -87
- package/lib/test/resources.js +0 -40
- package/test/actions_test.js +0 -206
- package/test/builder_test.js +0 -106
- package/test/chrome/devtools_test.js +0 -93
- package/test/chrome/options_test.js +0 -121
- package/test/chrome/service_test.js +0 -45
- package/test/cookie_test.js +0 -210
- package/test/element_finding_test.js +0 -431
- package/test/execute_script_test.js +0 -355
- package/test/fingerprint_test.js +0 -63
- package/test/firefox_test.js +0 -233
- package/test/frame_test.js +0 -45
- package/test/http/http_test.js +0 -229
- package/test/http/util_test.js +0 -178
- package/test/io/io_test.js +0 -364
- package/test/io/zip_test.js +0 -126
- package/test/lib/by_test.js +0 -160
- package/test/lib/capabilities_test.js +0 -129
- package/test/lib/error_test.js +0 -333
- package/test/lib/http_test.js +0 -576
- package/test/lib/input_test.js +0 -1379
- package/test/lib/logging_test.js +0 -272
- package/test/lib/promise_test.js +0 -674
- package/test/lib/testutil.js +0 -90
- package/test/lib/until_test.js +0 -478
- package/test/lib/webdriver_test.js +0 -1692
- package/test/logging_test.js +0 -160
- package/test/net/index_test.js +0 -60
- package/test/net/portprober_test.js +0 -128
- package/test/page_loading_test.js +0 -156
- package/test/proxy_test.js +0 -167
- package/test/rect_test.js +0 -51
- package/test/remote_test.js +0 -98
- package/test/safari_test.js +0 -44
- package/test/stale_element_test.js +0 -60
- package/test/upload_test.js +0 -78
- package/test/window_test.js +0 -168
- package/testing/index.js +0 -498
- package/tools/init_jasmine.js +0 -7
package/test/http/http_test.js
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
-
// or more contributor license agreements. See the NOTICE file
|
|
3
|
-
// distributed with this work for additional information
|
|
4
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
-
// to you under the Apache License, Version 2.0 (the
|
|
6
|
-
// "License"); you may not use this file except in compliance
|
|
7
|
-
// with the License. You may obtain a copy of the License at
|
|
8
|
-
//
|
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
//
|
|
11
|
-
// Unless required by applicable law or agreed to in writing,
|
|
12
|
-
// software distributed under the License is distributed on an
|
|
13
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
// KIND, either express or implied. See the License for the
|
|
15
|
-
// specific language governing permissions and limitations
|
|
16
|
-
// under the License.
|
|
17
|
-
|
|
18
|
-
'use strict';
|
|
19
|
-
|
|
20
|
-
var assert = require('assert'),
|
|
21
|
-
http = require('http'),
|
|
22
|
-
url = require('url');
|
|
23
|
-
|
|
24
|
-
var HttpClient = require('../../http').HttpClient,
|
|
25
|
-
HttpRequest = require('../../lib/http').Request,
|
|
26
|
-
HttpResponse = require('../../lib/http').Response,
|
|
27
|
-
Server = require('../../lib/test/httpserver').Server;
|
|
28
|
-
|
|
29
|
-
describe('HttpClient', function() {
|
|
30
|
-
|
|
31
|
-
var server = new Server(function(req, res) {
|
|
32
|
-
let parsedUrl = url.parse(req.url);
|
|
33
|
-
|
|
34
|
-
if (req.method == 'GET' && req.url == '/echo') {
|
|
35
|
-
res.writeHead(200);
|
|
36
|
-
res.end(JSON.stringify(req.headers));
|
|
37
|
-
|
|
38
|
-
} else if (req.method == 'GET' && req.url == '/redirect') {
|
|
39
|
-
res.writeHead(303, {'Location': server.url('/hello')});
|
|
40
|
-
res.end();
|
|
41
|
-
|
|
42
|
-
} else if (req.method == 'GET' && req.url == '/hello') {
|
|
43
|
-
res.writeHead(200, {'content-type': 'text/plain'});
|
|
44
|
-
res.end('hello, world!');
|
|
45
|
-
|
|
46
|
-
} else if (req.method == 'GET' && req.url == '/chunked') {
|
|
47
|
-
res.writeHead(200, {
|
|
48
|
-
'content-type': 'text/html; charset=utf-8',
|
|
49
|
-
'transfer-encoding': 'chunked'
|
|
50
|
-
});
|
|
51
|
-
res.write('<!DOCTYPE html>');
|
|
52
|
-
setTimeout(() => res.end('<h1>Hello, world!</h1>'), 20);
|
|
53
|
-
|
|
54
|
-
} else if (req.method == 'GET' && req.url == '/badredirect') {
|
|
55
|
-
res.writeHead(303, {});
|
|
56
|
-
res.end();
|
|
57
|
-
|
|
58
|
-
} else if (req.method == 'GET' && req.url == '/protected') {
|
|
59
|
-
var denyAccess = function() {
|
|
60
|
-
res.writeHead(401, {'WWW-Authenticate': 'Basic realm="test"'});
|
|
61
|
-
res.end('Access denied');
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var basicAuthRegExp = /^\s*basic\s+([a-z0-9\-\._~\+\/]+)=*\s*$/i
|
|
65
|
-
var auth = req.headers.authorization;
|
|
66
|
-
var match = basicAuthRegExp.exec(auth || '');
|
|
67
|
-
if (!match) {
|
|
68
|
-
denyAccess();
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
var userNameAndPass = new Buffer(match[1], 'base64').toString();
|
|
73
|
-
var parts = userNameAndPass.split(':', 2);
|
|
74
|
-
if (parts[0] !== 'genie' && parts[1] !== 'bottle') {
|
|
75
|
-
denyAccess();
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
res.writeHead(200, {'content-type': 'text/plain'});
|
|
80
|
-
res.end('Access granted!');
|
|
81
|
-
|
|
82
|
-
} else if (req.method == 'GET'
|
|
83
|
-
&& parsedUrl.pathname
|
|
84
|
-
&& parsedUrl.pathname.endsWith('/proxy')) {
|
|
85
|
-
let headers = Object.assign({}, req.headers);
|
|
86
|
-
headers['x-proxy-request-uri'] = req.url;
|
|
87
|
-
res.writeHead(200, headers);
|
|
88
|
-
res.end();
|
|
89
|
-
|
|
90
|
-
} else if (req.method == 'GET'
|
|
91
|
-
&& parsedUrl.pathname
|
|
92
|
-
&& parsedUrl.pathname.endsWith('/proxy/redirect')) {
|
|
93
|
-
let path = `/proxy${parsedUrl.search || ''}${parsedUrl.hash || ''}`;
|
|
94
|
-
res.writeHead(303, {'Location': path});
|
|
95
|
-
res.end();
|
|
96
|
-
|
|
97
|
-
} else {
|
|
98
|
-
res.writeHead(404, {});
|
|
99
|
-
res.end();
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
before(function() {
|
|
104
|
-
return server.start();
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
after(function() {
|
|
108
|
-
return server.stop();
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it('can send a basic HTTP request', function() {
|
|
112
|
-
var request = new HttpRequest('GET', '/echo');
|
|
113
|
-
request.headers.set('Foo', 'Bar');
|
|
114
|
-
|
|
115
|
-
var agent = new http.Agent();
|
|
116
|
-
agent.maxSockets = 1; // Only making 1 request.
|
|
117
|
-
|
|
118
|
-
var client = new HttpClient(server.url(), agent);
|
|
119
|
-
return client.send(request).then(function(response) {
|
|
120
|
-
assert.equal(200, response.status);
|
|
121
|
-
|
|
122
|
-
const headers = JSON.parse(response.body);
|
|
123
|
-
assert.equal(headers['content-length'], '0');
|
|
124
|
-
assert.equal(headers['connection'], 'keep-alive');
|
|
125
|
-
assert.equal(headers['host'], server.host());
|
|
126
|
-
|
|
127
|
-
const regex = /^selenium\/.* \(js (windows|mac|linux)\)$/;
|
|
128
|
-
assert.ok(
|
|
129
|
-
regex.test(headers['user-agent']),
|
|
130
|
-
`${headers['user-agent']} does not match ${regex}`);
|
|
131
|
-
|
|
132
|
-
assert.equal(request.headers.get('Foo'), 'Bar');
|
|
133
|
-
assert.equal(
|
|
134
|
-
request.headers.get('Accept'), 'application/json; charset=utf-8');
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
it('handles chunked responses', function() {
|
|
139
|
-
let request = new HttpRequest('GET', '/chunked');
|
|
140
|
-
|
|
141
|
-
let client = new HttpClient(server.url());
|
|
142
|
-
return client.send(request).then(response => {
|
|
143
|
-
assert.equal(200, response.status);
|
|
144
|
-
assert.equal(response.body, '<!DOCTYPE html><h1>Hello, world!</h1>');
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
it('can use basic auth', function() {
|
|
149
|
-
var parsed = url.parse(server.url());
|
|
150
|
-
parsed.auth = 'genie:bottle';
|
|
151
|
-
|
|
152
|
-
var client = new HttpClient(url.format(parsed));
|
|
153
|
-
var request = new HttpRequest('GET', '/protected');
|
|
154
|
-
return client.send(request).then(function(response) {
|
|
155
|
-
assert.equal(200, response.status);
|
|
156
|
-
assert.equal(response.headers.get('content-type'), 'text/plain');
|
|
157
|
-
assert.equal(response.body, 'Access granted!');
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
it('fails requests missing required basic auth', function() {
|
|
162
|
-
var client = new HttpClient(server.url());
|
|
163
|
-
var request = new HttpRequest('GET', '/protected');
|
|
164
|
-
return client.send(request).then(function(response) {
|
|
165
|
-
assert.equal(401, response.status);
|
|
166
|
-
assert.equal(response.body, 'Access denied');
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
it('automatically follows redirects', function() {
|
|
171
|
-
var request = new HttpRequest('GET', '/redirect');
|
|
172
|
-
var client = new HttpClient(server.url());
|
|
173
|
-
return client.send(request).then(function(response) {
|
|
174
|
-
assert.equal(200, response.status);
|
|
175
|
-
assert.equal(response.headers.get('content-type'), 'text/plain');
|
|
176
|
-
assert.equal(response.body, 'hello, world!');
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
it('handles malformed redirect responses', function() {
|
|
181
|
-
var request = new HttpRequest('GET', '/badredirect');
|
|
182
|
-
var client = new HttpClient(server.url());
|
|
183
|
-
return client.send(request).then(assert.fail, function(err) {
|
|
184
|
-
assert.ok(/Failed to parse "Location"/.test(err.message),
|
|
185
|
-
'Not the expected error: ' + err.message);
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
describe('with proxy', function() {
|
|
190
|
-
it('sends request to proxy with absolute URI', function() {
|
|
191
|
-
var request = new HttpRequest('GET', '/proxy');
|
|
192
|
-
var client = new HttpClient(
|
|
193
|
-
'http://another.server.com', undefined, server.url());
|
|
194
|
-
return client.send(request).then(function(response) {
|
|
195
|
-
assert.equal(200, response.status);
|
|
196
|
-
assert.equal(response.headers.get('host'), 'another.server.com');
|
|
197
|
-
assert.equal(
|
|
198
|
-
response.headers.get('x-proxy-request-uri'),
|
|
199
|
-
'http://another.server.com/proxy');
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
it('uses proxy when following redirects', function() {
|
|
204
|
-
var request = new HttpRequest('GET', '/proxy/redirect');
|
|
205
|
-
var client = new HttpClient(
|
|
206
|
-
'http://another.server.com', undefined, server.url());
|
|
207
|
-
return client.send(request).then(function(response) {
|
|
208
|
-
assert.equal(200, response.status);
|
|
209
|
-
assert.equal(response.headers.get('host'), 'another.server.com');
|
|
210
|
-
assert.equal(
|
|
211
|
-
response.headers.get('x-proxy-request-uri'),
|
|
212
|
-
'http://another.server.com/proxy');
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
it('includes search and hash in redirect URI', function() {
|
|
217
|
-
var request = new HttpRequest('GET', '/proxy/redirect?foo#bar');
|
|
218
|
-
var client = new HttpClient(
|
|
219
|
-
'http://another.server.com', undefined, server.url());
|
|
220
|
-
return client.send(request).then(function(response) {
|
|
221
|
-
assert.equal(200, response.status);
|
|
222
|
-
assert.equal(response.headers.get('host'), 'another.server.com');
|
|
223
|
-
assert.equal(
|
|
224
|
-
response.headers.get('x-proxy-request-uri'),
|
|
225
|
-
'http://another.server.com/proxy?foo#bar');
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
});
|
package/test/http/util_test.js
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
-
// or more contributor license agreements. See the NOTICE file
|
|
3
|
-
// distributed with this work for additional information
|
|
4
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
5
|
-
// to you under the Apache License, Version 2.0 (the
|
|
6
|
-
// "License"); you may not use this file except in compliance
|
|
7
|
-
// with the License. You may obtain a copy of the License at
|
|
8
|
-
//
|
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
//
|
|
11
|
-
// Unless required by applicable law or agreed to in writing,
|
|
12
|
-
// software distributed under the License is distributed on an
|
|
13
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
// KIND, either express or implied. See the License for the
|
|
15
|
-
// specific language governing permissions and limitations
|
|
16
|
-
// under the License.
|
|
17
|
-
|
|
18
|
-
'use strict';
|
|
19
|
-
|
|
20
|
-
const assert = require('assert');
|
|
21
|
-
const http = require('http');
|
|
22
|
-
|
|
23
|
-
const error = require('../../lib/error');
|
|
24
|
-
const util = require('../../http/util');
|
|
25
|
-
const promise = require('../../lib/promise');
|
|
26
|
-
|
|
27
|
-
describe('selenium-webdriver/http/util', function() {
|
|
28
|
-
|
|
29
|
-
var server, baseUrl;
|
|
30
|
-
|
|
31
|
-
var status, value, responseCode;
|
|
32
|
-
|
|
33
|
-
function startServer(done) {
|
|
34
|
-
if (server) return done();
|
|
35
|
-
|
|
36
|
-
server = http.createServer(function(req, res) {
|
|
37
|
-
var data = JSON.stringify({status: status, value: value});
|
|
38
|
-
res.writeHead(responseCode, {
|
|
39
|
-
'Content-Type': 'application/json; charset=utf-8',
|
|
40
|
-
'Content-Length': Buffer.byteLength(data, 'utf8')
|
|
41
|
-
});
|
|
42
|
-
res.end(data);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
server.listen(0, '127.0.0.1', function(e) {
|
|
46
|
-
if (e) return done(e);
|
|
47
|
-
|
|
48
|
-
var addr = server.address();
|
|
49
|
-
baseUrl = 'http://' + addr.address + ':' + addr.port;
|
|
50
|
-
done();
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function killServer(done) {
|
|
55
|
-
if (!server) return done();
|
|
56
|
-
server.close(done);
|
|
57
|
-
server = null;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
after(killServer);
|
|
61
|
-
|
|
62
|
-
beforeEach(function(done) {
|
|
63
|
-
status = 0;
|
|
64
|
-
value = 'abc123';
|
|
65
|
-
responseCode = 200;
|
|
66
|
-
startServer(done);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
describe('#getStatus', function() {
|
|
70
|
-
it('should return value field on success', function() {
|
|
71
|
-
return util.getStatus(baseUrl).then(function(response) {
|
|
72
|
-
assert.equal('abc123', response);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it('should fail if response object is not success', function() {
|
|
77
|
-
status = 1;
|
|
78
|
-
return util.getStatus(baseUrl).then(function() {
|
|
79
|
-
throw Error('expected a failure');
|
|
80
|
-
}, function(err) {
|
|
81
|
-
assert.ok(err instanceof error.WebDriverError);
|
|
82
|
-
assert.equal(err.code, error.WebDriverError.code);
|
|
83
|
-
assert.equal(err.message, value);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
it('should fail if the server is not listening', function(done) {
|
|
88
|
-
killServer(function(e) {
|
|
89
|
-
if(e) return done(e);
|
|
90
|
-
|
|
91
|
-
util.getStatus(baseUrl).then(function() {
|
|
92
|
-
done(Error('expected a failure'));
|
|
93
|
-
}, function() {
|
|
94
|
-
// Expected.
|
|
95
|
-
done();
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it('should fail if HTTP status is not 200', function() {
|
|
101
|
-
status = 1;
|
|
102
|
-
responseCode = 404;
|
|
103
|
-
return util.getStatus(baseUrl).then(function() {
|
|
104
|
-
throw Error('expected a failure');
|
|
105
|
-
}, function(err) {
|
|
106
|
-
assert.ok(err instanceof error.WebDriverError);
|
|
107
|
-
assert.equal(err.code, error.WebDriverError.code);
|
|
108
|
-
assert.equal(err.message, value);
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
describe('#waitForServer', function() {
|
|
114
|
-
it('resolves when server is ready', function() {
|
|
115
|
-
status = 1;
|
|
116
|
-
setTimeout(function() { status = 0; }, 50);
|
|
117
|
-
return util.waitForServer(baseUrl, 100);
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('should fail if server does not become ready', function() {
|
|
121
|
-
status = 1;
|
|
122
|
-
return util.waitForServer(baseUrl, 50).
|
|
123
|
-
then(function() {throw Error('Expected to time out')},
|
|
124
|
-
function() {});
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
it('can cancel wait', function() {
|
|
128
|
-
status = 1;
|
|
129
|
-
let cancel = new Promise(resolve => {
|
|
130
|
-
setTimeout(_ => resolve(), 50)
|
|
131
|
-
});
|
|
132
|
-
return util.waitForServer(baseUrl, 200, cancel)
|
|
133
|
-
.then(
|
|
134
|
-
() => { throw Error('Did not expect to succeed!'); },
|
|
135
|
-
(e) => assert.ok(e instanceof util.CancellationError));
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
describe('#waitForUrl', function() {
|
|
140
|
-
it('succeeds when URL returns 2xx', function() {
|
|
141
|
-
responseCode = 404;
|
|
142
|
-
setTimeout(function() { responseCode = 200; }, 50);
|
|
143
|
-
|
|
144
|
-
return util.waitForUrl(baseUrl, 200);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it('fails if URL always returns 4xx', function() {
|
|
148
|
-
responseCode = 404;
|
|
149
|
-
|
|
150
|
-
return util.waitForUrl(baseUrl, 50)
|
|
151
|
-
.then(() => assert.fail('Expected to time out'),
|
|
152
|
-
() => true);
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
it('fails if cannot connect to server', function() {
|
|
156
|
-
return new Promise((resolve, reject) => {
|
|
157
|
-
killServer(function(e) {
|
|
158
|
-
if (e) return reject(e);
|
|
159
|
-
|
|
160
|
-
util.waitForUrl(baseUrl, 50).
|
|
161
|
-
then(function() { reject(Error('Expected to time out')); },
|
|
162
|
-
function() { resolve(); });
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it('can cancel wait', function() {
|
|
168
|
-
responseCode = 404;
|
|
169
|
-
let cancel = new Promise(resolve => {
|
|
170
|
-
setTimeout(_ => resolve(), 50);
|
|
171
|
-
});
|
|
172
|
-
return util.waitForUrl(baseUrl, 200, cancel)
|
|
173
|
-
.then(
|
|
174
|
-
() => { throw Error('Did not expect to succeed!'); },
|
|
175
|
-
(e) => assert.ok(e instanceof util.CancellationError));
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
});
|