diff --git a/IPython/html/static/base/js/keyboard.js b/IPython/html/static/base/js/keyboard.js
index 37ab3e3..a5c8a69 100644
--- a/IPython/html/static/base/js/keyboard.js
+++ b/IPython/html/static/base/js/keyboard.js
@@ -262,8 +262,7 @@ IPython.keyboard = (function (IPython) {
         normalize_key : normalize_key,
         normalize_shortcut : normalize_shortcut,
         shortcut_to_event : shortcut_to_event,
-        event_to_shortcut : event_to_shortcut,
-        trigger_keydown : trigger_keydown
+        event_to_shortcut : event_to_shortcut
     };
 
 }(IPython));
diff --git a/IPython/html/tests/notebook/empty_arrow_keys.js b/IPython/html/tests/notebook/empty_arrow_keys.js
index 6abed3a..a949ce5 100644
--- a/IPython/html/tests/notebook/empty_arrow_keys.js
+++ b/IPython/html/tests/notebook/empty_arrow_keys.js
@@ -10,12 +10,12 @@ casper.notebook_test(function () {
         for (i = 0; i < ncells; i++) {
             IPython.notebook.delete_cell();
         }
-        
-        // Simulate the "up arrow" and "down arrow" keys.
-        //
-        IPython.keyboard.trigger_keydown('up');
-        IPython.keyboard.trigger_keydown('down');
+            
         return true;
     });
+    
+    // Simulate the "up arrow" and "down arrow" keys.
+    this.trigger_keydown('up');
+    this.trigger_keydown('down');
     this.test.assertTrue(result, 'Up/down arrow okay in empty notebook.');
 });
diff --git a/IPython/html/tests/notebook/execute_code.js b/IPython/html/tests/notebook/execute_code.js
index 1af684f..b3cc7c9 100644
--- a/IPython/html/tests/notebook/execute_code.js
+++ b/IPython/html/tests/notebook/execute_code.js
@@ -25,6 +25,10 @@ casper.notebook_test(function () {
         IPython.keyboard.trigger_keydown('shift-enter');
     });
 
+    this.then(function(){
+        
+    });
+
     this.wait_for_output(0);
 
     this.then(function () {