Skip to content

Commit

Permalink
Changed tests for layout viewport #43
Browse files Browse the repository at this point in the history
  • Loading branch information
gsouf committed Oct 25, 2018
1 parent 5c913f9 commit 495a0c2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
18 changes: 18 additions & 0 deletions test/resources/static-web/bigLayout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<html>
<head>
<title>b - test</title>

<style>
html{
height: 1000px;width: 900px;
}
</style>
</head>
<body>
<h1>page b</h1>
<div>b</div>

<a id="a" href="./a.html">go to a</a>

</body>
</html>
5 changes: 3 additions & 2 deletions test/suites/PageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public function testGetLayoutMetrics()
]);

$page = $browser->createPage();
$page->navigate($this->sitePath('bigLayout.html'))->waitForNavigation();

$page->setViewport(100, 300)->await();

Expand All @@ -125,8 +126,8 @@ public function testGetLayoutMetrics()
[
'x' => 0,
'y' => 0,
'width' => 100,
'height' => 300,
'width' => 900,
'height' => 1000
],
$contentSize
);
Expand Down

0 comments on commit 495a0c2

Please sign in to comment.