<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Bug 1260031 - Intrinsic width with float</title>
  <style>
    #wrapper {
      background: red;
      width: -moz-fit-content;
      width: fit-content;
    }
    #left {
      float: left;
      width: 50px;
      height: 50px;
      background: green;
    }
    #right {
      width: 50px;
      height: 50px;
      background: blue;
    }
  </style>
</head>
<body>
  <div id="test">
    <div id="wrapper">
      <div id="left"></div>
      <div id="right"></div>
    </div>
  </div>
  <script>
    document.getElementById("right").style = location.search.slice(1);
  </script>
</body>
</html>