Skip to content

Commit

Permalink
Fixed bug making it impossible to opt-out of auto-enrollment.
Browse files Browse the repository at this point in the history
During the OOBE flow there's an iframe pointing to "chrome://terms", whose
contentDocument is undefined.

BUG=chromium-os:27045
TEST=Steps in the bug now work as expected.

Review URL: https://chromiumcodereview.appspot.com/9594024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124965 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
joaodasilva@chromium.org committed Mar 5, 2012
1 parent a07e8eb commit 76bc3f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chrome/browser/resources/shared/js/cr/ui/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ cr.define('cr.ui.dialogs', function() {

var iframes = doc.querySelectorAll('iframe');
for (var i = 0; i < iframes.length; i++) {
elements = elements.concat(this.findFocusableElements_(
iframes[i].contentDocument));
// Some iframes have an undefined contentDocument for security reasons,
// such as chrome://terms (which is used in the chromeos OOBE screens).
var contentDoc = iframes[i].contentDocument;
if (contentDoc)
elements = elements.concat(this.findFocusableElements_(contentDoc));
}
return elements;
};
Expand Down

0 comments on commit 76bc3f1

Please sign in to comment.