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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 GURL url = ui_test_utils::GetTestUrl( | 104 GURL url = ui_test_utils::GetTestUrl( |
105 base::FilePath().AppendASCII("printing"), | 105 base::FilePath().AppendASCII("printing"), |
106 base::FilePath().AppendASCII("npapi_plugin.html")); | 106 base::FilePath().AppendASCII("npapi_plugin.html")); |
107 ui_test_utils::NavigateToURL(browser(), url); | 107 ui_test_utils::NavigateToURL(browser(), url); |
108 | 108 |
109 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 109 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
110 | 110 |
111 // Now get the region of the plugin before and after the print preview is | 111 // Now get the region of the plugin before and after the print preview is |
112 // shown. They should be different. | 112 // shown. They should be different. |
113 HWND hwnd = tab->GetView()->GetNativeView()->GetDispatcher()->host()-> | 113 HWND hwnd = tab->GetView()->GetNativeView()->GetHost()-> |
114 GetAcceleratedWidget(); | 114 GetAcceleratedWidget(); |
115 HWND child = NULL; | 115 HWND child = NULL; |
116 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child)); | 116 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child)); |
117 | 117 |
118 RECT region_before, region_after; | 118 RECT region_before, region_after; |
119 int result = GetWindowRgnBox(child, ®ion_before); | 119 int result = GetWindowRgnBox(child, ®ion_before); |
120 ASSERT_EQ(result, SIMPLEREGION); | 120 ASSERT_EQ(result, SIMPLEREGION); |
121 | 121 |
122 // Now print preview. | 122 // Now print preview. |
123 Print(); | 123 Print(); |
(...skipping 29 matching lines...) Expand all Loading... |
153 browser()->tab_strip_model()->ActivateTabAt(0, true); | 153 browser()->tab_strip_model()->ActivateTabAt(0, true); |
154 | 154 |
155 // Navigate main tab to hide print preview. | 155 // Navigate main tab to hide print preview. |
156 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); | 156 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); |
157 | 157 |
158 browser()->tab_strip_model()->ActivateTabAt(1, true); | 158 browser()->tab_strip_model()->ActivateTabAt(1, true); |
159 } | 159 } |
160 #endif | 160 #endif |
161 | 161 |
162 } // namespace | 162 } // namespace |
OLD | NEW |