| 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 // is deleted properly upon RWH going away. | 693 // is deleted properly upon RWH going away. |
| 694 set_widget_host_uses_shutdown_to_destroy(true); | 694 set_widget_host_uses_shutdown_to_destroy(true); |
| 695 } | 695 } |
| 696 | 696 |
| 697 // We explicitly invoke SetUp to allow gesture debounce customization. | 697 // We explicitly invoke SetUp to allow gesture debounce customization. |
| 698 void SetUp() override { | 698 void SetUp() override { |
| 699 is_guest_view_hack_ = true; | 699 is_guest_view_hack_ = true; |
| 700 | 700 |
| 701 RenderWidgetHostViewAuraTest::SetUp(); | 701 RenderWidgetHostViewAuraTest::SetUp(); |
| 702 | 702 |
| 703 guest_view_weak_ = (new RenderWidgetHostViewGuest(widget_host_, nullptr, | 703 guest_view_weak_ = (RenderWidgetHostViewGuest::Create(widget_host_, nullptr, |
| 704 view_->GetWeakPtr())) | 704 view_->GetWeakPtr())) |
| 705 ->GetWeakPtr(); | 705 ->GetWeakPtr(); |
| 706 } | 706 } |
| 707 | 707 |
| 708 void TearDown() override { | 708 void TearDown() override { |
| 709 // Internal override to do nothing, we clean up ourselves in the test body. | 709 // Internal override to do nothing, we clean up ourselves in the test body. |
| 710 // This helps us test that |guest_view_weak_| does not leak. | 710 // This helps us test that |guest_view_weak_| does not leak. |
| 711 } | 711 } |
| 712 | 712 |
| 713 protected: | 713 protected: |
| 714 base::WeakPtr<RenderWidgetHostViewBase> guest_view_weak_; | 714 base::WeakPtr<RenderWidgetHostViewBase> guest_view_weak_; |
| (...skipping 3960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4675 | 4675 |
| 4676 // Retrieve the selected text from clipboard and verify it is as expected. | 4676 // Retrieve the selected text from clipboard and verify it is as expected. |
| 4677 base::string16 result_text; | 4677 base::string16 result_text; |
| 4678 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); | 4678 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); |
| 4679 EXPECT_EQ(expected_text, result_text); | 4679 EXPECT_EQ(expected_text, result_text); |
| 4680 } | 4680 } |
| 4681 } | 4681 } |
| 4682 #endif | 4682 #endif |
| 4683 | 4683 |
| 4684 } // namespace content | 4684 } // namespace content |
| OLD | NEW |