| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
| 8 #include "content/public/common/file_chooser_file_info.h" | 8 #include "content/public/common/file_chooser_file_info.h" |
| 9 #include "content/public/common/file_chooser_params.h" | 9 #include "content/public/common/file_chooser_params.h" |
| 10 #include "content/public/test/render_view_test.h" | 10 #include "content/public/test/render_view_test.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 void SetUp() override { | 36 void SetUp() override { |
| 37 SetContentClient(&client_); | 37 SetContentClient(&client_); |
| 38 RenderViewTest::SetUp(); | 38 RenderViewTest::SetUp(); |
| 39 ppapi::ProxyLock::DisableLockingOnThreadForTest(); | 39 ppapi::ProxyLock::DisableLockingOnThreadForTest(); |
| 40 | 40 |
| 41 globals_.GetResourceTracker()->DidCreateInstance(pp_instance_); | 41 globals_.GetResourceTracker()->DidCreateInstance(pp_instance_); |
| 42 } | 42 } |
| 43 void TearDown() override { | 43 void TearDown() override { |
| 44 globals_.GetResourceTracker()->DidDeleteInstance(pp_instance_); | 44 globals_.GetResourceTracker()->DidDeleteInstance(pp_instance_); |
| 45 | 45 |
| 46 // Turn locking back to the default for tests that run later. | |
| 47 ppapi::ProxyLock::EnableLockingOnThreadForTest(); | |
| 48 RenderViewTest::TearDown(); | 46 RenderViewTest::TearDown(); |
| 49 } | 47 } |
| 50 | 48 |
| 51 PP_Instance pp_instance() const { return pp_instance_; } | 49 PP_Instance pp_instance() const { return pp_instance_; } |
| 52 | 50 |
| 53 private: | 51 private: |
| 54 PP_Instance pp_instance_; | 52 PP_Instance pp_instance_; |
| 55 | 53 |
| 56 ppapi::TestGlobals globals_; | 54 ppapi::TestGlobals globals_; |
| 57 TestContentClient client_; | 55 TestContentClient client_; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 accept.push_back("text/plain"); | 142 accept.push_back("text/plain"); |
| 145 PpapiHostMsg_FileChooser_Show show_msg(false, false, std::string(), accept); | 143 PpapiHostMsg_FileChooser_Show show_msg(false, false, std::string(), accept); |
| 146 | 144 |
| 147 ppapi::proxy::ResourceMessageCallParams call_params(pp_resource, 0); | 145 ppapi::proxy::ResourceMessageCallParams call_params(pp_resource, 0); |
| 148 ppapi::host::HostMessageContext context(call_params); | 146 ppapi::host::HostMessageContext context(call_params); |
| 149 int32 result = chooser.OnResourceMessageReceived(show_msg, &context); | 147 int32 result = chooser.OnResourceMessageReceived(show_msg, &context); |
| 150 EXPECT_EQ(PP_ERROR_NO_USER_GESTURE, result); | 148 EXPECT_EQ(PP_ERROR_NO_USER_GESTURE, result); |
| 151 } | 149 } |
| 152 | 150 |
| 153 } // namespace content | 151 } // namespace content |
| OLD | NEW |