Index: wp-testcase/test-xmlrpc-api/test_wp_getComments.php
===================================================================
--- wp-testcase/test-xmlrpc-api/test_wp_getComments.php	(revision 0)
+++ wp-testcase/test-xmlrpc-api/test_wp_getComments.php	(revision 0)
@@ -0,0 +1,110 @@
+<?php
+
+class TestXMLRPCServer_wp_getComments extends WPXMLRPCServerTestCase {
+	function test_contributor_capabilities() {
+		wp_delete_comment( 1 );
+		$author_id = get_user_by( 'login', 'author' )->ID;
+		$post = array( 'post_title' => 'Author', 'post_author' => $author_id, 'post_status' => 'publish' );
+		$author_post_id = wp_insert_post( $post );
+
+		$author_comment_id = wp_insert_comment( array(
+			'comment_post_ID' => $author_post_id,
+			'comment_author' => "Commenter 1",
+			'comment_author_url' => "http://example.com/1/",
+			'comment_approved' => 0,
+		));
+		
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$post = array( 'post_title' => 'Editor', 'post_author' => $editor_id, 'post_status' => 'publish' );
+		$editor_post_id = wp_insert_post( $post );
+		
+		$editor_comment_id = wp_insert_comment(array(
+			'comment_post_ID' => $editor_post_id,
+			'comment_author' => "Commenter 2",
+			'comment_author_url' => "http://example.com/2/",
+			'comment_approved' => 0,
+		));
+
+		$result = $this->myxmlrpcserver->wp_getComments( array( 1, 'contributor', 'contributor' ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertInternalType( 'array', $result );
+
+		$this->assertEquals( 2, count( $result ) );
+		
+		$this->assertFalse( $result[0]['can_edit'] );
+		$this->assertFalse( $result[1]['can_edit'] );
+	}
+
+	function test_author_capabilities() {
+		wp_delete_comment( 1 );
+		$author_id = get_user_by( 'login', 'author' )->ID;
+		$post = array( 'post_title' => 'Author', 'post_author' => $author_id, 'post_status' => 'publish' );
+		$author_post_id = wp_insert_post( $post );
+
+		wp_insert_comment( array(
+			'comment_post_ID' => $author_post_id,
+			'comment_author' => "Commenter 1",
+			'comment_author_url' => "http://example.com/1/",
+			'comment_approved' => 0,
+		));
+		
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$post = array( 'post_title' => 'Editor', 'post_author' => $editor_id, 'post_status' => 'publish' );
+		$editor_post_id = wp_insert_post( $post );
+		
+		wp_insert_comment(array(
+			'comment_post_ID' => $editor_post_id,
+			'comment_author' => "Commenter 2",
+			'comment_author_url' => "http://example.com/2/",
+			'comment_approved' => 0,
+		));
+
+		$result = $this->myxmlrpcserver->wp_getComments( array( 1, 'author', 'author', array( 'post_id' => $author_post_id ) ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertInternalType( 'array', $result );
+		$this->assertEquals( 1, count( $result ) );
+		$this->assertTrue( $result[0]['can_edit'] );
+
+		$result = $this->myxmlrpcserver->wp_getComments( array( 1, 'author', 'author', array( 'post_id' => $editor_post_id ) ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertInternalType( 'array', $result );
+		$this->assertEquals( 1, count( $result ) );
+		$this->assertFalse( $result[0]['can_edit'] );
+	}
+
+	function test_editor_capabilities() {
+		wp_delete_comment( 1 );
+		$author_id = get_user_by( 'login', 'author' )->ID;
+		$post = array( 'post_title' => 'Editor', 'post_author' => $author_id, 'post_status' => 'publish' );
+		$author_post_id = wp_insert_post( $post );
+
+		wp_insert_comment( array(
+			'comment_post_ID' => $author_post_id,
+			'comment_author' => "Commenter 1",
+			'comment_author_url' => "http://example.com/1/",
+			'comment_approved' => 0,
+		));
+		
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$post = array( 'post_title' => 'Editor', 'post_author' => $editor_id, 'post_status' => 'publish' );
+		$editor_post_id = wp_insert_post( $post );
+		
+		wp_insert_comment(array(
+			'comment_post_ID' => $editor_post_id,
+			'comment_author' => "Commenter 2",
+			'comment_author_url' => "http://example.com/2/",
+			'comment_approved' => 0,
+		));
+
+		$result = $this->myxmlrpcserver->wp_getComments( array( 1, 'editor', 'editor' ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertInternalType( 'array', $result );
+
+		$this->assertEquals( 2, count( $result ) );
+		
+		$this->assertTrue( $result[0]['can_edit'] );
+		$this->assertTrue( $result[1]['can_edit'] );
+	}
+}
+
+?>
\ No newline at end of file
Index: wp-testcase/test-xmlrpc-api/test_wp_editComment.php
===================================================================
--- wp-testcase/test-xmlrpc-api/test_wp_editComment.php	(revision 0)
+++ wp-testcase/test-xmlrpc-api/test_wp_editComment.php	(revision 0)
@@ -0,0 +1,60 @@
+<?php
+
+class TestXMLRPCServer_wp_editComment extends WPXMLRPCServerTestCase {
+	var $author_post_id;
+	var $editor_post_id;
+	var $author_comment_id;
+	var $editor_comment_id;
+	
+	function setUp() {
+		parent::setUp();
+
+		wp_delete_comment(1);
+
+		$author_id = get_user_by( 'login', 'author' )->ID;
+		$original_title = 'Post test by author';
+		$post = array( 'post_title' => $original_title, 'post_author' => $author_id );
+		$author_post_id = wp_insert_post( $post );
+
+		$this->author_comment_id = wp_insert_comment(array(
+			'comment_post_ID' => $author_post_id,
+			'comment_author' => "Commenter 1",
+			'comment_author_url' => "http://example.com/1/",
+			'comment_approved' => 1,
+		));
+		
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$original_title = 'Post test by editor';
+		$post = array( 'post_title' => $original_title, 'post_author' => $editor_id );
+		$editor_post_id = wp_insert_post( $post );
+		
+		$this->editor_comment_id = wp_insert_comment(array(
+			'comment_post_ID' => $editor_post_id,
+			'comment_author' => "Commenter 2",
+			'comment_author_url' => "http://example.com/2/",
+			'comment_approved' => 0,
+		));
+	}
+
+	function tearDown() {
+		parent::tearDown();
+
+		wp_delete_post( $this->author_post_id );
+		wp_delete_post( $this->editor_post_id );
+	}
+
+	function test_author_can_edit_own_comment() {
+		$result = $this->myxmlrpcserver->wp_editComment( array( 1, 'author', 'author', $this->author_comment_id, array( 'status' => 'hold' ) ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertTrue( $result );
+	}
+
+	function test_author_cannot_edit_others_comment() {
+		$result = $this->myxmlrpcserver->wp_editComment( array( 1, 'author', 'author', $this->editor_comment_id, array( 'status' => 'hold' ) ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 403, $result->code );
+		$this->assertEquals( __( 'You are not allowed to moderate this comment.' ), $result->message );
+	}
+}
+
+?>
\ No newline at end of file
