Skip to content

Commit

Permalink
Remove handler for Security.certificateError
Browse files Browse the repository at this point in the history
DevTools has deprecated the old flow of setting overrideCertificateErrors
and then handling an event notification. Instead they are just ignored
upfront.

This was kind-of applied in https://gitlab.com/behat-chrome/chrome-mink-driver/-/commit/457160a51d4792657efe909e8ffa085771f0fa75
so these events will no longer be arriving, and allowing for the possibility
of them just gives yet another place we're tracking page state change and
potentially recursively sending commands.
  • Loading branch information
acoulton committed Sep 15, 2022
1 parent fec0010 commit 59bfbde
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/ChromeDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public function start()
}

if (isset($this->options['validateCertificate']) && $this->options['validateCertificate'] === false) {
$this->page->send('Security.enable');
$this->page->send('Security.setIgnoreCertificateErrors', ['ignore' => true]);
}
}
Expand Down
6 changes: 0 additions & 6 deletions src/ChromePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,6 @@ protected function processResponse(array $data): void
// usleep($data['params']['source']['duration'] * 10);
// }
// break;
case 'Security.certificateError':
if (isset($data['params']['eventId'])) {
$this->send('Security.handleCertificateError', ['eventId' => $data['params']['eventId'], 'action' => 'continue']);
$this->setPageReady(FALSE, $data['method']);
}
break;
case 'Console.messageAdded':
$this->console_messages[] = $data['params']['message'];
break;
Expand Down

0 comments on commit 59bfbde

Please sign in to comment.