Index: wp-testcase/test_includes_wp-scripts.php
===================================================================
--- wp-testcase/test_includes_wp-scripts.php	(revision 744)
+++ wp-testcase/test_includes_wp-scripts.php	(working copy)
@@ -35,5 +35,46 @@
 		// No scripts left to print
 		$this->assertEquals("", get_echo('wp_print_scripts'));
 	}
+	
+	/**
+	 * Test the different protocol references in wp_enqueue_script
+	 * @global WP_Scripts $wp_scripts
+	 */
+	public function test_protocols() {
+		$this->knownWPBug( 16560 );
+
+		// Init
+		global $wp_scripts;
+		$base_url_backup = $wp_scripts->base_url;
+		$wp_scripts->base_url = 'http://localhost/wordpress';
+		$expected = '';
+		$ver = get_bloginfo( 'version' );
+
+		// Try with an HTTP reference
+		wp_enqueue_script( 'jquery-http', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' );
+		$expected  .= "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=$ver'></script>\n";
+
+		// Try with an HTTPS reference
+		wp_enqueue_script( 'jquery-https', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' );
+		$expected  .= "<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=$ver'></script>\n";
+		
+		// Try with an automatic protocol reference (//)
+		wp_enqueue_script( 'jquery-doubleslash', '//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' );
+		$expected  .= "<script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=$ver'></script>\n";
+
+		// Try with a local resource and an automatic protocol reference (//)
+		$url = '/' . plugins_url( '/my_plugin/script.js');
+		wp_enqueue_script( 'plugin-script', $url  );
+		$expected  .= "<script type='text/javascript' src='$url?ver=$ver'></script>\n";
+
+		// Go!
+		$this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
+
+		// No scripts left to print
+		$this->assertEquals( '', get_echo( 'wp_print_scripts' ) );
+
+		// Cleanup
+		$wp_scripts->base_url = $base_url_backup;
+	}
 }
 ?>

Index: wp-testcase/test_includes_wp-styles.php
===================================================================
--- wp-testcase/test_includes_wp-styles.php	(revision 744)
+++ wp-testcase/test_includes_wp-styles.php	(working copy)
@@ -33,5 +33,46 @@
 		// No styles left to print
 		$this->assertEquals("", get_echo('wp_print_styles'));
 	}
+	
+	/**
+	 * Test the different protocol references in wp_enqueue_style
+	 * @global WP_Styles $wp_styles
+	 */
+	public function test_protocols() {
+		$this->knownWPBug( 16560 );
+
+		// Init
+		global $wp_styles;
+		$base_url_backup = $wp_styles->base_url;
+		$wp_styles->base_url = 'http://localhost/wordpress';
+		$expected = '';
+		$ver = get_bloginfo( 'version' );
+
+		// Try with an HTTP reference
+		wp_enqueue_style( 'reset-css-http', 'http://yui.yahooapis.com/2.8.1/build/reset/reset-min.css' );
+		$expected  .= "<link rel='stylesheet' id='reset-css-http-css'  href='http://yui.yahooapis.com/2.8.1/build/reset/reset-min.css?ver=$ver' type='text/css' media='all' />\n";
+
+		// Try with an HTTPS reference
+		wp_enqueue_style( 'reset-css-https', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' );
+		$expected  .= "<link rel='stylesheet' id='reset-css-https-css'  href='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=$ver' type='text/css' media='all' />\n";
+		
+		// Try with an automatic protocol reference (//)
+		wp_enqueue_style( 'reset-css-doubleslash', '//yui.yahooapis.com/2.8.1/build/reset/reset-min.css' );
+		$expected  .= "<link rel='stylesheet' id='reset-css-doubleslash-css'  href='//yui.yahooapis.com/2.8.1/build/reset/reset-min.css?ver=$ver' type='text/css' media='all' />\n";
+
+		// Try with a local resource and an automatic protocol reference (//)
+		$url = '/' . plugins_url( '/my_plugin/style.css');
+		wp_enqueue_style( 'plugin-style', $url  );
+		$expected  .= "<link rel='stylesheet' id='plugin-style-css'  href='$url?ver=$ver' type='text/css' media='all' />\n";
+
+		// Go!
+		$this->assertEquals( $expected, get_echo( 'wp_print_styles' ) );
+
+		// No styles left to print
+		$this->assertEquals( '', get_echo( 'wp_print_styles' ) );
+
+		// Cleanup
+		$wp_styles->base_url = $base_url_backup;
+	}
 }
 ?>
