Index: wp-testcase/test_shortcode.php
===================================================================
--- wp-testcase/test_shortcode.php	(revision 694)
+++ wp-testcase/test_shortcode.php	(working copy)
@@ -11,7 +11,7 @@
 	extract(shortcode_atts(array(
 		'foo' => 'no foo',
 		'baz' => 'default baz',
-	), $atts));
+	), $atts, 'bartag'));
 
 	return "foo = {$foo}";
 }
@@ -50,6 +50,9 @@
 		$this->atts = null;
 		$this->content = null;
 		$this->tagname = null;
+		$this->filter_atts_out = null;
+		$this->filter_atts_pairs = null;
+		$this->filter_atts_atts = null;
 
 	}
 
@@ -319,7 +322,45 @@
 		$this->assertEquals( $test_string, $actual );
 	}
 
+	function _filter_atts( $out, $pairs, $atts ) {
+		$this->filter_atts_out = $out;
+		$this->filter_atts_pairs = $pairs;
+		$this->filter_atts_atts = $atts;
+		return $out;
+	}
+
+	function _filter_atts2( $out, $pairs, $atts ) {
+		// If foo attribute equals "foo1", change it to be default value
+		if ( isset( $out['foo'] ) && 'foo1' == $out['foo'] )
+			$out['foo'] = $pairs['foo'];
+		// If baz attribute is set, remove it
+		if ( isset( $out['baz'] ) )
+			unset( $out['baz'] );
+		$this->filter_atts_out = $out;
+		return $out;
+	}
+
+	// Test to ensure the filter passes proper arguments
+	function test_shortcode_atts_filter_basics() {
+		add_filter( 'shortcode_atts_bartag', array( &$this, '_filter_atts' ), 10, 3 );
+		do_shortcode('[bartag foo="foo1" /]');
+		$this->assertEquals( array( 'foo' => 'foo1', 'baz' => 'default baz' ), $this->filter_atts_out );
+		$this->assertEquals( array( 'foo' => 'no foo', 'baz' => 'default baz' ), $this->filter_atts_pairs );
+		$this->assertEquals( array( 'foo' => 'foo1' ), $this->filter_atts_atts );
+		remove_filter( 'shortcode_atts_bartag', array( &$this, '_filter_atts' ), 10, 3 );
+	}
+
+	function test_shortcode_atts_filtering() {
+		add_filter( 'shortcode_atts_bartag', array( &$this, '_filter_atts2' ), 10, 3 );
+		$out = do_shortcode('[bartag foo="foo1" baz="baz1" /]');
+		$this->assertEquals( array( 'foo' => 'no foo' ), $this->filter_atts_out );
+		$this->assertEquals( 'foo = no foo', $out );
+		$out = do_shortcode('[bartag foo="foo2" /]');
+		$this->assertEquals( 'foo = foo2', $out );
+		remove_filter( 'shortcode_atts_bartag', array( &$this, '_filter_atts2' ), 10, 3 );
+	}
 }
+
 //http://core.trac.wordpress.org/ticket/10326
 class TestShortcodeStripping extends WPTestCase {
 	function test_strip_shortcodes() {
