Unverified Commit 7abdf64d authored by Soufiane Ghzal's avatar Soufiane Ghzal Committed by GitHub
Browse files

Merge pull request #136 from chrome-php/dev-v0.8.1

Dev v0.8.1
parents 5caadebb 81d4df7f
......@@ -12,9 +12,21 @@
* none
## 0.8.1
> *2020-02-20*
> Description
* Bug fixes:
* fixed browser close
* fixed unit tests
* testing php 7.3 and 7.4
## 0.8.0
> *2020-02-20* (not released)
> *2020-02-20*
* Features:
* Added Page::pdf (thanks @tanasecosminromeo)
......
......@@ -99,7 +99,15 @@ class Browser
*/
public function close()
{
// TODO check browser.close on chrome 63
$this->sendCloseMessage();
}
/**
* Send close message to the browser
* @throws OperationTimedOut
*/
final public function sendCloseMessage()
{
$r = $this->connection->sendMessageSync(new Message('Browser.close'));
if (!$r->isSuccessful()) {
// log
......
......@@ -190,7 +190,7 @@ class BrowserProcess implements LoggerAwareInterface
try {
// log
$this->logger->debug('process: trying to close chrome gracefully');
$this->browser->close();
$this->browser->sendCloseMessage();
} catch (\Exception $e) {
//log
$this->logger->debug('process: closing chrome gracefully - compatibility');
......
......@@ -19,11 +19,19 @@ class HttpEnabledTestCase extends BaseTestCase
self::$process = new Process([
'php',
'-S localhost:8083',
'-t ' . __DIR__ . '/../resources/static-web'
'-S',
'localhost:8083',
'-t',
__DIR__ . '/../resources/static-web'
]);
self::$process->start();
usleep(10000); //wait for server to get going
usleep(80000); //wait for server to get going
// ensure it started
if (!self::$process->isRunning()) {
$message = self::$process->getErrorOutput();
throw new \Exception('Cannot start webserver for tests: ' . $message);
}
}
public static function tearDownAfterClass()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment