Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: chrome/browser/ui/views/location_bar/star_view_browsertest.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 browser()->tab_strip_model()->GetActiveWebContents(); 106 browser()->tab_strip_model()->GetActiveWebContents();
107 content::TitleWatcher title_watcher(tab, expected_title); 107 content::TitleWatcher title_watcher(tab, expected_title);
108 108
109 GURL url = ui_test_utils::GetTestUrl( 109 GURL url = ui_test_utils::GetTestUrl(
110 base::FilePath().AppendASCII("printing"), 110 base::FilePath().AppendASCII("printing"),
111 base::FilePath().AppendASCII("npapi_plugin.html")); 111 base::FilePath().AppendASCII("npapi_plugin.html"));
112 ui_test_utils::NavigateToURL(browser(), url); 112 ui_test_utils::NavigateToURL(browser(), url);
113 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); 113 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
114 114
115 // Now get the region of the plugin before the star view is shown. 115 // Now get the region of the plugin before the star view is shown.
116 HWND hwnd = tab->GetView()->GetNativeView()->GetDispatcher()->host()-> 116 HWND hwnd = tab->GetView()->GetNativeView()->GetHost()->
117 GetAcceleratedWidget(); 117 GetAcceleratedWidget();
118 HWND child = NULL; 118 HWND child = NULL;
119 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child)); 119 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child));
120 120
121 RECT region_before, region_after; 121 RECT region_before, region_after;
122 int result = GetWindowRgnBox(child, &region_before); 122 int result = GetWindowRgnBox(child, &region_before);
123 ASSERT_EQ(result, SIMPLEREGION); 123 ASSERT_EQ(result, SIMPLEREGION);
124 124
125 // Now show the star view 125 // Now show the star view
126 BrowserView* browser_view = reinterpret_cast<BrowserView*>( 126 BrowserView* browser_view = reinterpret_cast<BrowserView*>(
(...skipping 29 matching lines...) Expand all
156 region_before.left == region_after.left && 156 region_before.left == region_after.left &&
157 region_before.top == region_after.top && 157 region_before.top == region_after.top &&
158 region_before.right == region_after.right && 158 region_before.right == region_after.right &&
159 region_before.bottom == region_after.bottom; 159 region_before.bottom == region_after.bottom;
160 ASSERT_FALSE(rects_equal); 160 ASSERT_FALSE(rects_equal);
161 } 161 }
162 162
163 #endif 163 #endif
164 164
165 } // namespace 165 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698