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 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 sink_->ClearMessages(); | 1586 sink_->ClearMessages(); |
1587 | 1587 |
1588 aura_test_helper_->test_screen()->SetDeviceScaleFactor(2.0f); | 1588 aura_test_helper_->test_screen()->SetDeviceScaleFactor(2.0f); |
1589 EXPECT_EQ("200x200", view_->GetPhysicalBackingSize().ToString()); | 1589 EXPECT_EQ("200x200", view_->GetPhysicalBackingSize().ToString()); |
1590 // Extra ScreenInfoChanged message for |parent_view_|. | 1590 // Extra ScreenInfoChanged message for |parent_view_|. |
1591 // Changing the device scale factor triggers the | 1591 // Changing the device scale factor triggers the |
1592 // RenderWidgetHostViewAura::OnDisplayMetricsChanged() observer callback, | 1592 // RenderWidgetHostViewAura::OnDisplayMetricsChanged() observer callback, |
1593 // which sends a ViewMsg_Resize::ID message to the renderer. | 1593 // which sends a ViewMsg_Resize::ID message to the renderer. |
1594 EXPECT_EQ(1u, sink_->message_count()); | 1594 EXPECT_EQ(1u, sink_->message_count()); |
1595 EXPECT_EQ(ViewMsg_Resize::ID, sink_->GetMessageAt(0)->type()); | 1595 EXPECT_EQ(ViewMsg_Resize::ID, sink_->GetMessageAt(0)->type()); |
1596 auto view_delegate = static_cast<MockRenderWidgetHostDelegate*>( | 1596 auto* view_delegate = static_cast<MockRenderWidgetHostDelegate*>( |
1597 static_cast<RenderWidgetHostImpl*>(view_->GetRenderWidgetHost()) | 1597 static_cast<RenderWidgetHostImpl*>(view_->GetRenderWidgetHost()) |
1598 ->delegate()); | 1598 ->delegate()); |
1599 EXPECT_EQ(2.0f, view_delegate->get_last_device_scale_factor()); | 1599 EXPECT_EQ(2.0f, view_delegate->get_last_device_scale_factor()); |
1600 | 1600 |
1601 widget_host_->ResetSizeAndRepaintPendingFlags(); | 1601 widget_host_->ResetSizeAndRepaintPendingFlags(); |
1602 sink_->ClearMessages(); | 1602 sink_->ClearMessages(); |
1603 | 1603 |
1604 aura_test_helper_->test_screen()->SetDeviceScaleFactor(1.0f); | 1604 aura_test_helper_->test_screen()->SetDeviceScaleFactor(1.0f); |
1605 // Extra ScreenInfoChanged message for |parent_view_|. | 1605 // Extra ScreenInfoChanged message for |parent_view_|. |
1606 EXPECT_EQ(1u, sink_->message_count()); | 1606 EXPECT_EQ(1u, sink_->message_count()); |
(...skipping 3160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4767 // There is no composition in the beginning. | 4767 // There is no composition in the beginning. |
4768 EXPECT_FALSE(has_composition_text()); | 4768 EXPECT_FALSE(has_composition_text()); |
4769 SetHasCompositionTextToTrue(); | 4769 SetHasCompositionTextToTrue(); |
4770 view->ImeCancelComposition(); | 4770 view->ImeCancelComposition(); |
4771 // The composition must have been canceled. | 4771 // The composition must have been canceled. |
4772 EXPECT_FALSE(has_composition_text()); | 4772 EXPECT_FALSE(has_composition_text()); |
4773 } | 4773 } |
4774 } | 4774 } |
4775 | 4775 |
4776 } // namespace content | 4776 } // namespace content |
OLD | NEW |