| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 9 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 aura::Window* window = view_->GetNativeView(); | 131 aura::Window* window = view_->GetNativeView(); |
| 132 ASSERT_TRUE(window != NULL); | 132 ASSERT_TRUE(window != NULL); |
| 133 EXPECT_EQ(ui::SHOW_STATE_FULLSCREEN, | 133 EXPECT_EQ(ui::SHOW_STATE_FULLSCREEN, |
| 134 window->GetProperty(aura::client::kShowStateKey)); | 134 window->GetProperty(aura::client::kShowStateKey)); |
| 135 | 135 |
| 136 // Check that we requested and received the focus. | 136 // Check that we requested and received the focus. |
| 137 EXPECT_TRUE(window->HasFocus()); | 137 EXPECT_TRUE(window->HasFocus()); |
| 138 | 138 |
| 139 // Check that we'll also say it's okay to activate the window when there's an | 139 // Check that we'll also say it's okay to activate the window when there's an |
| 140 // ActivationClient defined. | 140 // ActivationClient defined. |
| 141 EXPECT_TRUE(view_->ShouldActivate(NULL)); | 141 EXPECT_TRUE(view_->ShouldActivate()); |
| 142 } | 142 } |
| 143 | 143 |
| 144 // Checks that a fullscreen view is destroyed when it loses the focus. | 144 // Checks that a fullscreen view is destroyed when it loses the focus. |
| 145 TEST_F(RenderWidgetHostViewAuraTest, DestroyFullscreenOnBlur) { | 145 TEST_F(RenderWidgetHostViewAuraTest, DestroyFullscreenOnBlur) { |
| 146 view_->InitAsFullscreen(parent_view_); | 146 view_->InitAsFullscreen(parent_view_); |
| 147 aura::Window* window = view_->GetNativeView(); | 147 aura::Window* window = view_->GetNativeView(); |
| 148 ASSERT_TRUE(window != NULL); | 148 ASSERT_TRUE(window != NULL); |
| 149 ASSERT_TRUE(window->HasFocus()); | 149 ASSERT_TRUE(window->HasFocus()); |
| 150 | 150 |
| 151 // After we create and focus another window, the RWHVA's window should be | 151 // After we create and focus another window, the RWHVA's window should be |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 EXPECT_EQ(1U, view_->touch_event_.touchesLength); | 274 EXPECT_EQ(1U, view_->touch_event_.touchesLength); |
| 275 EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, | 275 EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, |
| 276 view_->touch_event_.touches[0].state); | 276 view_->touch_event_.touches[0].state); |
| 277 | 277 |
| 278 EXPECT_EQ(ui::ER_CONSUMED, view_->OnTouchEvent(&release)); | 278 EXPECT_EQ(ui::ER_CONSUMED, view_->OnTouchEvent(&release)); |
| 279 EXPECT_EQ(WebKit::WebInputEvent::TouchEnd, view_->touch_event_.type); | 279 EXPECT_EQ(WebKit::WebInputEvent::TouchEnd, view_->touch_event_.type); |
| 280 EXPECT_EQ(0U, view_->touch_event_.touchesLength); | 280 EXPECT_EQ(0U, view_->touch_event_.touchesLength); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace content | 283 } // namespace content |
| OLD | NEW |