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 28 matching lines...) Expand all Loading... |
39 window_->AddObserver(this); | 39 window_->AddObserver(this); |
40 } | 40 } |
41 virtual ~TestWindowObserver() { | 41 virtual ~TestWindowObserver() { |
42 if (window_) | 42 if (window_) |
43 window_->RemoveObserver(this); | 43 window_->RemoveObserver(this); |
44 } | 44 } |
45 | 45 |
46 bool destroyed() const { return destroyed_; } | 46 bool destroyed() const { return destroyed_; } |
47 | 47 |
48 // aura::WindowObserver overrides: | 48 // aura::WindowObserver overrides: |
49 virtual void OnWindowDestroyed(aura::Window* window) { | 49 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE { |
50 CHECK_EQ(window, window_); | 50 CHECK_EQ(window, window_); |
51 destroyed_ = true; | 51 destroyed_ = true; |
52 window_ = NULL; | 52 window_ = NULL; |
53 } | 53 } |
54 | 54 |
55 private: | 55 private: |
56 // Window that we're observing, or NULL if it's been destroyed. | 56 // Window that we're observing, or NULL if it's been destroyed. |
57 aura::Window* window_; | 57 aura::Window* window_; |
58 | 58 |
59 // Was |window_| destroyed? | 59 // Was |window_| destroyed? |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, | 304 EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, |
305 view_->touch_event_.touches[0].state); | 305 view_->touch_event_.touches[0].state); |
306 | 306 |
307 view_->OnTouchEvent(&release); | 307 view_->OnTouchEvent(&release); |
308 EXPECT_TRUE(release.stopped_propagation()); | 308 EXPECT_TRUE(release.stopped_propagation()); |
309 EXPECT_EQ(WebKit::WebInputEvent::TouchEnd, view_->touch_event_.type); | 309 EXPECT_EQ(WebKit::WebInputEvent::TouchEnd, view_->touch_event_.type); |
310 EXPECT_EQ(0U, view_->touch_event_.touchesLength); | 310 EXPECT_EQ(0U, view_->touch_event_.touchesLength); |
311 } | 311 } |
312 | 312 |
313 } // namespace content | 313 } // namespace content |
OLD | NEW |