### Eclipse Workspace Patch 1.0
#P simpletest
Index: drupal_test_case.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v
retrieving revision 1.68
diff -u -r1.68 drupal_test_case.php
--- drupal_test_case.php	25 Mar 2008 15:07:57 -0000	1.68
+++ drupal_test_case.php	26 Mar 2008 04:13:00 -0000
@@ -864,15 +864,38 @@
     $this->assertTrue($fields && (!$value || $fields[0]['value'] == $value), $message);
   }
 
+  function assertNoFieldByXPath($xpath, $value, $message) {
+    $fields = array();
+    if ($this->parse()) {
+      $fields = $this->elements->xpath($xpath);
+    }
+    $this->assertFalse($fields && (!$value || $fields[0]['value'] == $value), $message);
+  }
+
   function assertFieldByName($name, $value = '', $message = '') {
     $this->assertFieldByXPath($this->_constructFieldXpath('name', $name), $value, $message ? $message : t(' [browser] found field by name @name', array('@name' => $name)));
   }
+  
+  function assertNoFieldByName($name, $value = '', $message = '') {
+    $this->assertNoFieldByXPath($this->_constructFieldXpath('name', $name), $value, $message ? $message : t(' [browser] found field by name @name', array('@name' => $name)));
+  }
+
   function assertFieldById($id, $value = '', $message = '') {
     $this->assertFieldByXPath($this->_constructFieldXpath('id', $id), $value, $message ? $message : t(' [browser] found field by id @id', array('@id' => $id)));
   }
+
+  function assertNoFieldById($id, $value = '', $message = '') {
+    $this->assertNoFieldByXPath($this->_constructFieldXpath('id', $id), $value, $message ? $message : t(' [browser] found field by id @id', array('@id' => $id)));
+  }
+
   function assertField($field, $message = '') {
     $this->assertFieldByXPath($this->_constructFieldXpath('name', $field) .'|'. $this->_constructFieldXpath('id', $field), '', $message);
   }
+
+  function assertNoField($field, $message = '') {
+    $this->assertNoFieldByXPath($this->_constructFieldXpath('name', $field) .'|'. $this->_constructFieldXpath('id', $field), '', $message);
+  }
+
   function _constructFieldXpath($attribute, $value) {
     return '//textarea[@'. $attribute .'="'. $value .'"]|//input[@'. $attribute .'="'. $value .'"]|//select[@'. $attribute .'="'. $value .'"]';
   }
@@ -881,5 +904,4 @@
     $curl_code = curl_getinfo($this->ch, CURLINFO_HTTP_CODE);
     $this->assertTrue($curl_code == $code, t(' [browser] HTTP response expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)));
   }
-
 }
