Verifies that Overlay.setShowViewportSizeOnResize works.
Response to setDeviceMetricsOverride:
{
id : <number>
result : {
}
sessionId : <string>
}
Initial device metrics:
[
{
"name": "reset",
"data": {
"deviceScaleFactor": 1,
"emulationScaleFactor": 1,
"pageScaleFactor": 1,
"viewportSize": {
"width": 800,
"height": 600
},
"viewportSizeForMediaQueries": {
"width": 800,
"height": 600
},
"pageZoomFactor": 1,
"scrollX": 0,
"scrollY": 0
}
}
]
Response to setDeviceMetricsOverride:
{
id : <number>
result : {
}
sessionId : <string>
}
Device metrics with changed viewport:
[
{
"name": "setOverlay",
"data": "viewportSize"
},
{
"name": "reset",
"data": {
"deviceScaleFactor": 1,
"emulationScaleFactor": 1,
"pageScaleFactor": 1,
"viewportSize": {
"width": 500,
"height": 500
},
"viewportSizeForMediaQueries": {
"width": 500,
"height": 500
},
"pageZoomFactor": 1,
"scrollX": 0,
"scrollY": 0
}
},
{
"name": "drawViewSize",
"data": ""
}
]
Response to setDeviceMetricsOverride:
{
id : <number>
result : {
}
sessionId : <string>
}
Device metrics with scrollbar:
[
{
"name": "setOverlay",
"data": "viewportSize"
},
{
"name": "reset",
"data": {
"deviceScaleFactor": 1,
"emulationScaleFactor": 1,
"pageScaleFactor": 1,
"viewportSize": {
"width": 300,
"height": 300
},
"viewportSizeForMediaQueries": {
"width": 300,
"height": 300
},
"pageZoomFactor": 1,
"scrollX": 0,
"scrollY": 0
}
},
{
"name": "drawViewSize",
"data": ""
}
]