Skip to content

Commit 9a706fe

Browse files
m90mantoni
authored andcommitted
Swallow deprecation notices about window.webkitStorageInfo
1 parent 119d6f0 commit 9a706fe

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

lib/chromium.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,18 @@ module.exports = function (b, opts) {
116116
var text = msg.text();
117117
if (msg.type() !== 'log') {
118118
// Swallow SSL vertificate warning that occurs on navigation before
119-
// the script is injected.
119+
// the script is injected. Also swallow deprecation notices about
120+
// window.webkitStorageInfo.
120121
text.split('\n').forEach(function (line) {
121-
if (line.indexOf('SSL certificate') === -1) {
122-
process.stderr.write(line);
123-
process.stderr.write('\n');
122+
var skipLine = line.indexOf('SSL certificate') >= 0
123+
|| line.indexOf(
124+
'\'window.webkitStorageInfo\' is deprecated'
125+
) >= 0;
126+
if (skipLine) {
127+
return;
124128
}
129+
process.stderr.write(line);
130+
process.stderr.write('\n');
125131
});
126132
return;
127133
}

test/chromium-test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,17 @@ describe('chromium', function () {
139139

140140
assert.equal(code, 0);
141141
assert.equal(stdout, '# chromium:\n');
142-
143142
// The sub-set lines actually relating to the console output. Other
144143
// lines may relate to internal Chrome errors, such as
145144
// '[0322/162300.874805:ERROR:command_buffer_proxy_impl.cc(125)]
146145
// ContextResult::kTransientFailure: Failed to send
147146
// GpuChannelMsg_CreateCommandBuffer.'
148147
var stderrLines = stderr
149148
.split('\n')
150-
.filter(function (l) { return l.indexOf('INFO:CONSOLE') >= 0; });
149+
.filter(function (l) {
150+
return l.indexOf('INFO:CONSOLE') >= 0
151+
&& l.indexOf('window.webkitStorageInfo') === -1;
152+
});
151153
var expectedLines = [
152154
'ok 1 test passes',
153155
'# tests 1',

0 commit comments

Comments
 (0)