diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc
index 042b2ab4e8300..ba4ebe174a3dd 100644
--- a/chrome/common/common_param_traits.cc
+++ b/chrome/common/common_param_traits.cc
@@ -378,7 +378,20 @@ struct ParamTraits<net::UploadData::Element> {
         break;
       }
       case net::UploadData::TYPE_CHUNK: {
-        m->WriteData(&p.bytes()[0], static_cast<int>(p.bytes().size()));
+        std::string chunk_length = StringPrintf("%X\r\n", p.bytes().size());
+        std::vector<char> bytes;
+        bytes.insert(bytes.end(), chunk_length.data(),
+                     chunk_length.data() + chunk_length.length());
+        const char* data = &p.bytes()[0];
+        bytes.insert(bytes.end(), data, data + p.bytes().size());
+        const char* crlf = "\r\n";
+        bytes.insert(bytes.end(), crlf, crlf + strlen(crlf));
+        if (p.is_last_chunk()) {
+          const char* end_of_data = "0\r\n\r\n";
+          bytes.insert(bytes.end(), end_of_data,
+                       end_of_data + strlen(end_of_data));
+        }
+        m->WriteData(&bytes[0], static_cast<int>(bytes.size()));
         // If this element is part of a chunk upload then send over information
         // indicating if this is the last chunk.
         WriteParam(m, p.is_last_chunk());
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index d38dc7cc1daf3..fe3cc03e7bdce 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -505,10 +505,7 @@ int main(int argc, char** argv) {
     return 0;
   }
 
-  return 0;
-
   // TODO(tommi): Stuff be broke. Needs a fixin'.
-#if 0
   // This is awkward: the TestSuite derived CFUrlRequestUnittestRunner contains
   // the instance of the AtExitManager that RegisterPathProvider() and others
   // below require. So we have to instantiate this first.
@@ -527,5 +524,4 @@ int main(int argc, char** argv) {
   PluginService::EnableChromePlugins(false);
   test_suite.RunMainUIThread();
   return 0;
-#endif
 }