;
            MockInteractions.tap(button);
          });
        });

        test('multiple modal dialogs opened, handle focus change', function(done) {
          var dialogs = fixture('multiple');

          runAfterOpen(dialogs[0], function() {
            runAfterOpen(dialogs[1], function() {
              // Each modal dialog will trap the focus within its children.
              // Multiple modal dialogs doing it might result in an infinite loop
              // dialog1 focus -> dialog2 focus -> dial