diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 22:31:35 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 22:31:35 +0000 |
commit | de56f378336660dcc848763c80267a5e063ae47d (patch) | |
tree | 7f551b88923b35bc4022ce6ab3a3f602fb60d91c /webkit/glue/glue_serialize_unittest.cc | |
parent | dc4f63c80cb90efe594131030aad6776e5945fcc (diff) | |
download | chromium_src-de56f378336660dcc848763c80267a5e063ae47d.zip chromium_src-de56f378336660dcc848763c80267a5e063ae47d.tar.gz chromium_src-de56f378336660dcc848763c80267a5e063ae47d.tar.bz2 |
Merge the chrome_webkit_merge_branch back on to trunk. This brings us
up to webkit@36102.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/glue_serialize_unittest.cc')
-rw-r--r-- | webkit/glue/glue_serialize_unittest.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/webkit/glue/glue_serialize_unittest.cc b/webkit/glue/glue_serialize_unittest.cc index 5ecf5bb..48bfb4c5 100644 --- a/webkit/glue/glue_serialize_unittest.cc +++ b/webkit/glue/glue_serialize_unittest.cc @@ -59,8 +59,8 @@ namespace { class GlueSerializeTest : public testing::Test { public: // Makes a FormData with some random data. - FormData* MakeFormData() { - FormData* form_data = new FormData(); + PassRefPtr<FormData> MakeFormData() { + RefPtr<FormData> form_data = FormData::create(); char d1[] = "first data block"; form_data->appendData(d1, sizeof(d1)-1); @@ -70,12 +70,12 @@ class GlueSerializeTest : public testing::Test { char d2[] = "data the second"; form_data->appendData(d2, sizeof(d2)-1); - return form_data; + return form_data.release(); } // Constructs a HistoryItem with some random data and an optional child. PassRefPtr<HistoryItem> MakeHistoryItem(bool with_form_data, bool pregnant) { - RefPtr<HistoryItem> item = new HistoryItem(); + RefPtr<HistoryItem> item = HistoryItem::create(); item->setURLString("urlString"); item->setOriginalURLString("originalURLString"); @@ -98,8 +98,7 @@ class GlueSerializeTest : public testing::Test { // Form Data ResourceRequest dummy_request; // only way to initialize HistoryItem if (with_form_data) { - FormData* form_data = MakeFormData(); - dummy_request.setHTTPBody(form_data); + dummy_request.setHTTPBody(MakeFormData()); dummy_request.setHTTPContentType("formContentType"); dummy_request.setHTTPReferrer("formReferrer"); dummy_request.setHTTPMethod("POST"); @@ -110,7 +109,7 @@ class GlueSerializeTest : public testing::Test { if (pregnant) item->addChildItem(MakeHistoryItem(false, false)); - return item; + return item.release(); } // Checks that a == b. |