<!DOCTYPE HTML>
<html>
<head>
<title>This tests that autosize uses the min-width as the base for resolving viewport unit values</title>
<style>
#w100 {
    width: 100vw;
    height: 10px;
}

#w50 {
    width: 50vw;
    height: 10px;
}

#w10 {
    width: 10vw;
    height: 10px;
}

#w0 {
    width: 0vw;
    height: 10px;
}
</style>
<script>
if (window.internals)
    internals.enableFixedWidthAutoSizeMode(true, 2000, 600);

if (window.testRunner)
    testRunner.dumpAsText();
</script>
</head>
<body>
<div id=w100></div>
<div id=w50></div>
<div id=w10></div>
<div id=w0></div>
<img src="notfound.jpg" width=3000px height=100px>
<pre id=result></pre>
<script>
document.body.offsetWidth;
result.textContent = window.getComputedStyle(w100, null).getPropertyValue("width") + " "
    + window.getComputedStyle(w50, null).getPropertyValue("width") + " "
    + window.getComputedStyle(w10, null).getPropertyValue("width") + " "  
	+ window.getComputedStyle(w0, null).getPropertyValue("width");  
if (window.internals)
    internals.enableFixedWidthAutoSizeMode(false, 0, 0, 0, 0);
</script>
</body>
</html>
