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/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 } | 373 } |
374 | 374 |
375 protected: | 375 protected: |
376 ScreenshotTracker* screenshot_manager() { return screenshot_manager_; } | 376 ScreenshotTracker* screenshot_manager() { return screenshot_manager_; } |
377 void set_min_screenshot_interval(int interval_ms) { | 377 void set_min_screenshot_interval(int interval_ms) { |
378 screenshot_manager_->SetScreenshotInterval(interval_ms); | 378 screenshot_manager_->SetScreenshotInterval(interval_ms); |
379 } | 379 } |
380 | 380 |
381 void AddInputEventMessageFilter() { | 381 void AddInputEventMessageFilter() { |
382 filter_ = new InputEventMessageFilterWaitsForAcks(); | 382 filter_ = new InputEventMessageFilterWaitsForAcks(); |
383 GetRenderWidgetHost()->GetProcess()->AddFilter(filter_); | 383 GetRenderWidgetHost()->GetProcess()->AddFilter(filter_.get()); |
384 } | 384 } |
385 | 385 |
386 private: | 386 private: |
387 ScreenshotTracker* screenshot_manager_; | 387 ScreenshotTracker* screenshot_manager_; |
388 scoped_refptr<InputEventMessageFilterWaitsForAcks> filter_; | 388 scoped_refptr<InputEventMessageFilterWaitsForAcks> filter_; |
389 | 389 |
390 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAuraTest); | 390 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAuraTest); |
391 }; | 391 }; |
392 | 392 |
393 // Flaky on Windows: http://crbug.com/305722 | 393 // Flaky on Windows: http://crbug.com/305722 |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 WaitAFrame(); | 961 WaitAFrame(); |
962 | 962 |
963 if (!navigated) | 963 if (!navigated) |
964 EXPECT_EQ(10, ExecuteScriptAndExtractInt("touchmoveCount")); | 964 EXPECT_EQ(10, ExecuteScriptAndExtractInt("touchmoveCount")); |
965 else | 965 else |
966 EXPECT_GT(10, ExecuteScriptAndExtractInt("touchmoveCount")); | 966 EXPECT_GT(10, ExecuteScriptAndExtractInt("touchmoveCount")); |
967 } | 967 } |
968 } | 968 } |
969 | 969 |
970 } // namespace content | 970 } // namespace content |
OLD | NEW |