Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.203
diff -u -p -r1.203 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	12 Mar 2010 14:38:37 -0000	1.203
+++ modules/simpletest/drupal_web_test_case.php	26 Mar 2010 15:08:58 -0000
@@ -1589,7 +1589,7 @@ class DrupalWebTestCase extends DrupalTe
    * @param $form_id
    *   The optional string identifying the form to be submitted. On some pages
    *   there are many identical forms, so just using the value of the submit
-   *   button is not enough.
+   *   button is not enough. For example: 'trigger-node-presave-assign-form'.
    */
   protected function drupalPost($path, $edit, $submit, array $options = array(), array $headers = array(), $form_id = NULL) {
     $submit_matches = FALSE;
@@ -1602,7 +1602,7 @@ class DrupalWebTestCase extends DrupalTe
       // Let's iterate over all the forms.
       $xpath = "//form";
       if (!empty($form_id)) {
-        $xpath .= "[@id='" . drupal_html_id($form_id) . "']";
+        $xpath .= "[@id='" . $form_id . "']";
       }
       $forms = $this->xpath($xpath);
       foreach ($forms as $form) {
Index: modules/trigger/trigger.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.test,v
retrieving revision 1.28
diff -u -p -r1.28 trigger.test
--- modules/trigger/trigger.test	7 Mar 2010 18:06:06 -0000	1.28
+++ modules/trigger/trigger.test	26 Mar 2010 15:08:58 -0000
@@ -55,18 +55,18 @@ class TriggerContentTestCase extends Tri
     global $user;
     $content_actions = array('node_publish_action', 'node_unpublish_action', 'node_make_sticky_action', 'node_make_unsticky_action', 'node_promote_action', 'node_unpromote_action');
 
+    $test_user = $this->drupalCreateUser(array('administer actions'));
+    $web_user = $this->drupalCreateUser(array('create page content', 'access content', 'administer nodes'));
     foreach ($content_actions as $action) {
       $hash = md5($action);
       $info = $this->actionInfo($action);
 
       // Assign an action to a trigger, then pull the trigger, and make sure
       // the actions fire.
-      $test_user = $this->drupalCreateUser(array('administer actions'));
       $this->drupalLogin($test_user);
       $edit = array('aid' => $hash);
-      $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'));
+      $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'), array(), array(), 'trigger-node-presave-assign-form');
       // Create an unpublished node.
-      $web_user = $this->drupalCreateUser(array('create page content', 'access content', 'administer nodes'));
       $this->drupalLogin($web_user);
       $edit = array();
       $langcode = LANGUAGE_NONE;
@@ -83,12 +83,10 @@ class TriggerContentTestCase extends Tri
 
       // There should be an error when the action is assigned to the trigger
       // twice.
-      $test_user = $this->drupalCreateUser(array('administer actions'));
       $this->drupalLogin($test_user);
+      // This action already assigned in this test.
       $edit = array('aid' => $hash);
-      $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'));
-      $edit = array('aid' => $hash);
-      $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'));
+      $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'), array(), array(), 'trigger-node-presave-assign-form');
       $this->assertRaw(t('The action you chose is already assigned to that trigger.'), t('Check to make sure an error occurs when assigning an action to a trigger twice.'));
 
       // The action should be able to be unassigned from a trigger.
@@ -174,7 +172,7 @@ class TriggerCronTestCase extends Trigge
 
     // Assign a non-configurable action to the cron run trigger.
     $edit = array('aid' => md5('trigger_test_system_cron_action'));
-    $this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'));
+    $this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'), array(), array(), 'trigger-cron-assign-form');
 
     // Assign a configurable action to the cron trigger.
     $action_label = $this->randomName();
@@ -186,7 +184,7 @@ class TriggerCronTestCase extends Trigge
     // $aid is likely 3 but if we add more uses for the sequences table in
     // core it might break, so it is easier to get the value from the database.
     $edit = array('aid' => md5($aid));
-    $this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'));
+    $this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'), array(), array(), 'trigger-cron-assign-form');
 
     // Add a second configurable action to the cron trigger.
     $action_label = $this->randomName();
@@ -196,7 +194,7 @@ class TriggerCronTestCase extends Trigge
     );
     $aid = $this->configureAdvancedAction('trigger_test_system_cron_conf_action', $edit);
     $edit = array('aid' => md5($aid));
-    $this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'));
+    $this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'), array(), array(), 'trigger-cron-assign-form');
 
     // Force a cron run.
     $this->cronRun();
@@ -240,7 +238,7 @@ class TriggerOtherTestCase extends Trigg
     $action_id = 'trigger_test_generic_action';
     $hash = md5($action_id);
     $edit = array('aid' => $hash);
-    $this->drupalPost('admin/structure/trigger/user', $edit, t('Assign'));
+    $this->drupalPost('admin/structure/trigger/user', $edit, t('Assign'), array(), array(), 'trigger-user-insert-assign-form');
 
     // Set action variable to FALSE.
     variable_set( $action_id, FALSE );
@@ -297,7 +295,7 @@ class TriggerOtherTestCase extends Trigg
     $action_id = 'trigger_test_generic_action';
     $hash = md5($action_id);
     $edit = array('aid' => $hash);
-    $this->drupalPost('admin/structure/trigger/comment', $edit, t('Assign'));
+    $this->drupalPost('admin/structure/trigger/comment', $edit, t('Assign'), array(), array(), 'trigger-comment-insert-assign-form');
 
     // Set action variable to FALSE.
     variable_set($action_id, FALSE);
@@ -326,7 +324,7 @@ class TriggerOtherTestCase extends Trigg
     $action_id = 'trigger_test_generic_action';
     $hash = md5($action_id);
     $edit = array('aid' => $hash);
-    $this->drupalPost('admin/structure/trigger/taxonomy', $edit, t('Assign'));
+    $this->drupalPost('admin/structure/trigger/taxonomy', $edit, t('Assign'), array(), array(), 'trigger-taxonomy-term-insert-assign-form');
 
     // Set action variable to FALSE.
     variable_set($action_id, FALSE);
@@ -383,7 +381,7 @@ class TriggerOrphanedActionsTestCase ext
     $test_user = $this->drupalCreateUser(array('administer actions'));
     $this->drupalLogin($test_user);
     $edit = array('aid' => $hash);
-    $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'));
+    $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'), array(), array(), 'trigger-node-presave-assign-form');
 
     // Create an unpublished node.
     $web_user = $this->drupalCreateUser(array('create page content', 'edit own page content', 'access content', 'administer nodes'));
