<!DOCTYPE html>
<html>
<body>
<div id="console"></div>
<script>
for (p in window) {
  if (p == 'localStorage' || p == 'sessionStorage') continue;
  var obj = window[p];
  if (obj)
    obj.foo = "FAIL: Visible in isolated world.";
}

if (window.testRunner) {
  testRunner.dumpAsText();
  testRunner.evaluateScriptInIsolatedWorld(
    0,
    "(function() {\n" +
    "  for (p in window) {\n" +
    "    var obj = window[p];\n" +
    "    if (obj && obj.foo) {\n" +
    "      var div = document.createElement('div');\n" +
    "      div.innerHTML = p + ': ' + obj.foo;\n" +
    "      document.getElementById('console').appendChild(div);\n" +
    "    }\n" +
    "  }\n" +
    "  var div = document.createElement('div');\n" +
    "  div.innerHTML = 'Done.'\n" +
    "  document.getElementById('console').appendChild(div);\n" +
    "})();");
}
</script>
</body>
</html>
