| 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 "chrome/browser/ui/views/location_bar/star_view.h" | 5 #include "chrome/browser/ui/views/location_bar/star_view.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 GURL url = ui_test_utils::GetTestUrl( | 100 GURL url = ui_test_utils::GetTestUrl( |
| 101 base::FilePath().AppendASCII("printing"), | 101 base::FilePath().AppendASCII("printing"), |
| 102 base::FilePath().AppendASCII("npapi_plugin.html")); | 102 base::FilePath().AppendASCII("npapi_plugin.html")); |
| 103 ui_test_utils::NavigateToURL(browser(), url); | 103 ui_test_utils::NavigateToURL(browser(), url); |
| 104 LOG(ERROR) << "2"; | 104 LOG(ERROR) << "2"; |
| 105 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 105 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
| 106 LOG(ERROR) << "3"; | 106 LOG(ERROR) << "3"; |
| 107 | 107 |
| 108 // Now get the region of the plugin before the star view is shown. | 108 // Now get the region of the plugin before the star view is shown. |
| 109 HWND hwnd = | 109 HWND hwnd = tab->GetView()->GetNativeView()->GetDispatcher()->host()-> |
| 110 tab->GetView()->GetNativeView()->GetDispatcher()->GetAcceleratedWidget(); | 110 GetAcceleratedWidget(); |
| 111 HWND child = NULL; | 111 HWND child = NULL; |
| 112 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child)); | 112 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child)); |
| 113 LOG(ERROR) << "4"; | 113 LOG(ERROR) << "4"; |
| 114 | 114 |
| 115 RECT region_before, region_after; | 115 RECT region_before, region_after; |
| 116 int result = GetWindowRgnBox(child, ®ion_before); | 116 int result = GetWindowRgnBox(child, ®ion_before); |
| 117 ASSERT_EQ(result, SIMPLEREGION); | 117 ASSERT_EQ(result, SIMPLEREGION); |
| 118 | 118 |
| 119 // Now show the star view | 119 // Now show the star view |
| 120 BrowserView* browser_view = reinterpret_cast<BrowserView*>( | 120 BrowserView* browser_view = reinterpret_cast<BrowserView*>( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 region_before.left == region_after.left && | 153 region_before.left == region_after.left && |
| 154 region_before.top == region_after.top && | 154 region_before.top == region_after.top && |
| 155 region_before.right == region_after.right && | 155 region_before.right == region_after.right && |
| 156 region_before.bottom == region_after.bottom; | 156 region_before.bottom == region_after.bottom; |
| 157 ASSERT_FALSE(rects_equal); | 157 ASSERT_FALSE(rects_equal); |
| 158 } | 158 } |
| 159 | 159 |
| 160 #endif | 160 #endif |
| 161 | 161 |
| 162 } // namespace | 162 } // namespace |
| OLD | NEW |