Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chrome-remote-interface

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-remote-interface - npm Package Compare versions

Comparing version 0.12.1 to 0.12.2

2

lib/devtools.js

@@ -176,3 +176,3 @@ var defaults = require('./defaults.js');

}
descriptor = parse(data);
descriptor = JSON.parse(data);
} catch (_) {

@@ -179,0 +179,0 @@ // fall back

@@ -12,3 +12,3 @@ {

"homepage": "https://github.com/cyrus-and/chrome-remote-interface",
"version": "0.12.1",
"version": "0.12.2",
"repository": {

@@ -15,0 +15,0 @@ "type": "git",

@@ -9,5 +9,6 @@ var Chrome = require('../');

describe('with callback', function () {
it('should return the protocol descriptor (possibly) from Chrome', function (done) {
it('should return the protocol descriptor from Chrome', function (done) {
Chrome.Protocol(function (err, protocol) {
assert.ifError(err);
assert(!protocol.fallback);
assert.equal(typeof protocol.descriptor, 'object');

@@ -18,6 +19,6 @@ assert.equal(typeof protocol.descriptor.version, 'object');

});
it('should return the hardcoded protocol descriptor', function (done) {
it('should return the hardcoded protocol descriptor (on error)', function (done) {
Chrome.Protocol({'port':1}, function (err, protocol) {
assert.ifError(err);
assert(!protocol.fromChrome);
assert(protocol.fallback);
assert.equal(typeof protocol.descriptor, 'object');

@@ -28,6 +29,16 @@ assert.equal(typeof protocol.descriptor.version, 'object');

});
it('should return the hardcoded protocol descriptor (if requested)', function (done) {
Chrome.Protocol({'fallback': true}, function (err, protocol) {
assert.ifError(err);
assert(protocol.fallback);
assert.equal(typeof protocol.descriptor, 'object');
assert.equal(typeof protocol.descriptor.version, 'object');
done();
});
});
});
describe('without callback', function () {
it('should return the protocol descriptor (possibly) from Chrome', function (done) {
it('should return the protocol descriptor from Chrome', function (done) {
Chrome.Protocol().then(function (protocol) {
assert(!protocol.fallback);
assert.equal(typeof protocol.descriptor, 'object');

@@ -40,5 +51,5 @@ assert.equal(typeof protocol.descriptor.version, 'object');

});
it('should return the hardcoded protocol descriptor', function (done) {
it('should return the hardcoded protocol descriptor (on error)', function (done) {
Chrome.Protocol({'port':1}).then(function (protocol) {
assert(!protocol.fromChrome);
assert(protocol.fallback);
assert.equal(typeof protocol.descriptor, 'object');

@@ -51,2 +62,12 @@ assert.equal(typeof protocol.descriptor.version, 'object');

});
it('should return the hardcoded protocol descriptor (if requested)', function (done) {
Chrome.Protocol({'fallback': true}).then(function (protocol) {
assert(protocol.fallback);
assert.equal(typeof protocol.descriptor, 'object');
assert.equal(typeof protocol.descriptor.version, 'object');
done();
}).catch(function () {
assert(false);
});
});
});

@@ -53,0 +74,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc