Skip to content

Commit de26038

Browse files
committed
fix test for 'custom_html_size_100%' page with ignore default margins
1 parent 346560d commit de26038

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

spec/browser_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ module Ferrum
104104

105105
include_examples 'resize viewport by fullscreen' do
106106
let(:path) { "/ferrum/custom_html_size_100%" }
107-
let(:viewport_size) { [1280, 1016] }
107+
let(:viewport_size) { [1272, 1008] }
108108
end
109109
end
110110

spec/support/views/custom_html_size_100%.erb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@
77
height: 100%;
88
}
99

10+
body {
11+
/*
12+
deal with the default Chrome margins
13+
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/html/resources/html.css;
14+
*/
15+
margin: 0;
16+
}
17+
1018
.spacer {
11-
width: 1272px; /* using scrollWidth adds 8px */
12-
height: 1008px; /* using scrollHeight adds 16px */
19+
width: 1272px;
20+
height: 1008px;
1321
}
1422
</style>
1523
</head>

0 commit comments

Comments
 (0)