Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / browser / download / drag_download_file_browsertest.cc
index a4f5005..136fac3 100644 (file)
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/browser/power_save_blocker.h"
 #include "content/public/common/content_client.h"
+#include "content/public/test/content_browser_test.h"
+#include "content/public/test/content_browser_test_utils.h"
 #include "content/public/test/download_test_observer.h"
 #include "content/public/test/test_utils.h"
 #include "content/shell/browser/shell.h"
 #include "content/shell/browser/shell_browser_context.h"
 #include "content/shell/browser/shell_download_manager_delegate.h"
-#include "content/test/content_browser_test.h"
-#include "content/test/content_browser_test_utils.h"
 #include "content/test/net/url_request_mock_http_job.h"
 #include "content/test/net/url_request_slow_download_job.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -94,12 +94,9 @@ IN_PROC_BROWSER_TEST_F(DragDownloadFileTest, DragDownloadFileTest_NetError) {
       "download-test.lib"))));
   Referrer referrer;
   std::string referrer_encoding;
-  DragDownloadFile* file = new DragDownloadFile(name,
-                                                scoped_ptr<net::FileStream>(),
-                                                url,
-                                                referrer,
-                                                referrer_encoding,
-                                                shell()->web_contents());
+  scoped_refptr<DragDownloadFile> file(
+      new DragDownloadFile(name, base::File(), url, referrer,
+                           referrer_encoding, shell()->web_contents()));
   scoped_refptr<MockDownloadFileObserver> observer(
       new MockDownloadFileObserver());
   EXPECT_CALL(*observer.get(), OnDownloadAborted())
@@ -117,11 +114,10 @@ IN_PROC_BROWSER_TEST_F(DragDownloadFileTest, DragDownloadFileTest_Complete) {
       "download-test.lib"))));
   Referrer referrer;
   std::string referrer_encoding;
-  net::FileStream* stream = NULL;
   SetUpServer();
-  DragDownloadFile* file = new DragDownloadFile(
-      name, scoped_ptr<net::FileStream>(stream), url, referrer,
-      referrer_encoding, shell()->web_contents());
+  scoped_refptr<DragDownloadFile> file(new DragDownloadFile(
+      name, base::File(), url, referrer,
+      referrer_encoding, shell()->web_contents()));
   scoped_refptr<MockDownloadFileObserver> observer(
       new MockDownloadFileObserver());
   EXPECT_CALL(*observer.get(), OnDownloadCompleted(_))