OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/test/ui_test_utils.h" | 5 #include "chrome/test/ui_test_utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 35 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
36 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 36 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
37 #include "chrome/common/chrome_paths.h" | 37 #include "chrome/common/chrome_paths.h" |
38 #include "chrome/common/extensions/extension_action.h" | 38 #include "chrome/common/extensions/extension_action.h" |
39 #include "chrome/common/notification_type.h" | 39 #include "chrome/common/notification_type.h" |
40 #include "chrome/test/automation/javascript_execution_controller.h" | 40 #include "chrome/test/automation/javascript_execution_controller.h" |
41 #include "chrome/test/bookmark_load_observer.h" | 41 #include "chrome/test/bookmark_load_observer.h" |
42 #if defined(TOOLKIT_VIEWS) | 42 #if defined(TOOLKIT_VIEWS) |
43 #include "views/focus/accelerator_handler.h" | 43 #include "views/focus/accelerator_handler.h" |
44 #endif | 44 #endif |
45 #include "gfx/size.h" | |
46 #include "googleurl/src/gurl.h" | 45 #include "googleurl/src/gurl.h" |
47 #include "net/base/net_util.h" | 46 #include "net/base/net_util.h" |
48 #include "testing/gtest/include/gtest/gtest.h" | 47 #include "testing/gtest/include/gtest/gtest.h" |
49 #include "third_party/skia/include/core/SkBitmap.h" | 48 #include "third_party/skia/include/core/SkBitmap.h" |
50 #include "third_party/skia/include/core/SkColor.h" | 49 #include "third_party/skia/include/core/SkColor.h" |
| 50 #include "ui/gfx/size.h" |
51 | 51 |
52 namespace ui_test_utils { | 52 namespace ui_test_utils { |
53 | 53 |
54 namespace { | 54 namespace { |
55 | 55 |
56 // Used to block until a navigation completes. | 56 // Used to block until a navigation completes. |
57 class NavigationNotificationObserver : public NotificationObserver { | 57 class NavigationNotificationObserver : public NotificationObserver { |
58 public: | 58 public: |
59 NavigationNotificationObserver(NavigationController* controller, | 59 NavigationNotificationObserver(NavigationController* controller, |
60 int number_of_navigations) | 60 int number_of_navigations) |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap); | 1024 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap); |
1025 } | 1025 } |
1026 | 1026 |
1027 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { | 1027 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { |
1028 DCHECK(bitmap); | 1028 DCHECK(bitmap); |
1029 SnapshotTaker taker; | 1029 SnapshotTaker taker; |
1030 return taker.TakeEntirePageSnapshot(rvh, bitmap); | 1030 return taker.TakeEntirePageSnapshot(rvh, bitmap); |
1031 } | 1031 } |
1032 | 1032 |
1033 } // namespace ui_test_utils | 1033 } // namespace ui_test_utils |
OLD | NEW |