Index: tests/query.php
===================================================================
--- tests/query.php	(revision 1097)
+++ tests/query.php	(working copy)
@@ -256,6 +256,23 @@
 		$this->assertEquals( $page_id, $wp_query->get_queried_object()->ID );
 	}
 
+	function test_page_on_front_query_var () {
+		$page_id = $this->factory->post->create( array( 'post_type' => 'page', 'post_title' => 'Front', 'post_content' => 'Front Page' ) );
+		update_option( 'show_on_front', 'page' );
+		update_option( 'page_on_front', $page_id );
+
+		add_filter('query_vars', create_function('$vars','$vars[] = "foo"; return $vars;'));
+
+		$this->go_to('/?foo=bard');
+		$this->assertQueryTrue('is_page','is_singular');
+
+		$this->assertEquals( get_query_var( 'foo' ), 'bard' );
+
+		// Verify the expected page is queried
+		global $wp_query;
+		$this->assertEquals( $page_id, $wp_query->get_queried_object()->ID );
+	}
+
 	// FIXME: no tests for these yet
 	// 'about/attachment/([^/]+)/?$' => 'index.php?attachment=$matches[1]',
 	// 'about/attachment/([^/]+)/trackback/?$' => 'index.php?attachment=$matches[1]&tb=1',
