| Index: content/browser/renderer_host/render_view_host_unittest.cc
|
| ===================================================================
|
| --- content/browser/renderer_host/render_view_host_unittest.cc (revision 140070)
|
| +++ content/browser/renderer_host/render_view_host_unittest.cc (working copy)
|
| @@ -2,7 +2,6 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "base/utf_string_conversions.h"
|
| #include "content/browser/child_process_security_policy_impl.h"
|
| #include "content/browser/renderer_host/test_render_view_host.h"
|
| #include "content/browser/web_contents/navigation_controller_impl.h"
|
| @@ -155,25 +154,12 @@
|
| WebDropData dropped_data;
|
| gfx::Point client_point;
|
| gfx::Point screen_point;
|
| - FilePath highlighted_file_path(FILE_PATH_LITERAL("/etc/passwd"));
|
| - FilePath selected_file_path(FILE_PATH_LITERAL("/tmp/image.jpg"));
|
| - GURL highlighted_file_url = net::FilePathToFileURL(highlighted_file_path);
|
| - GURL selected_file_url = net::FilePathToFileURL(selected_file_path);
|
| - dropped_data.url = highlighted_file_url;
|
| - dropped_data.filenames.push_back(WebDropData::FileInfo(
|
| - UTF8ToUTF16(selected_file_path.AsUTF8Unsafe()), string16()));
|
| -
|
| + GURL file_url = GURL("file:///etc/passwd");
|
| + dropped_data.url = file_url;
|
| rvh()->DragTargetDragEnter(dropped_data, client_point, screen_point,
|
| WebKit::WebDragOperationNone, 0);
|
| -
|
| - int id = process()->GetID();
|
| - ChildProcessSecurityPolicyImpl* policy =
|
| - ChildProcessSecurityPolicyImpl::GetInstance();
|
| -
|
| - EXPECT_FALSE(policy->CanRequestURL(id, highlighted_file_url));
|
| - EXPECT_FALSE(policy->CanReadFile(id, highlighted_file_path));
|
| - EXPECT_FALSE(policy->CanRequestURL(id, selected_file_url));
|
| - EXPECT_TRUE(policy->CanReadFile(id, selected_file_path));
|
| + EXPECT_FALSE(ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL(
|
| + process()->GetID(), file_url));
|
| }
|
|
|
| // The test that follow trigger DCHECKS in debug build.
|
|
|