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

Unified Diff: ash/devtools/ash_devtools_unittest.cc

Issue 2814243002: Removes a couple more functions from WmWindow (Closed)
Patch Set: feedback Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/mus/test/ash_test_impl_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/devtools/ash_devtools_unittest.cc
diff --git a/ash/devtools/ash_devtools_unittest.cc b/ash/devtools/ash_devtools_unittest.cc
index f840134fe8fc3783d379f3dfb0c9865b30059794..5ebb719cde486e5fedd1191bfede842d52f0475c 100644
--- a/ash/devtools/ash_devtools_unittest.cc
+++ b/ash/devtools/ash_devtools_unittest.cc
@@ -5,6 +5,7 @@
#include "ash/devtools/ash_devtools_css_agent.h"
#include "ash/devtools/ash_devtools_dom_agent.h"
#include "ash/root_window_controller.h"
+#include "ash/shell.h"
#include "ash/shell_port.h"
#include "ash/test/ash_test.h"
#include "ash/wm/widget_finder.h"
@@ -134,14 +135,13 @@ int GetPropertyByName(const std::string& name,
return -1;
}
-WmWindow* GetHighlightingWindow(int root_window_index) {
- WmWindow::Windows overlay_windows =
- ShellPort::Get()
- ->GetAllRootWindows()[root_window_index]
- ->GetChildByShellWindowId(kShellWindowId_OverlayContainer)
- ->GetChildren();
- for (WmWindow* window : overlay_windows) {
- if (window->aura_window()->GetName() == "HighlightingWidget")
+aura::Window* GetHighlightingWindow(int root_window_index) {
+ const aura::Window::Windows& overlay_windows =
+ Shell::GetAllRootWindows()[root_window_index]
+ ->GetChildById(kShellWindowId_OverlayContainer)
+ ->children();
+ for (aura::Window* window : overlay_windows) {
+ if (window->GetName() == "HighlightingWidget")
return window;
}
NOTREACHED();
@@ -167,14 +167,13 @@ std::unique_ptr<DOM::HighlightConfig> CreateHighlightConfig(
}
void ExpectHighlighted(const gfx::Rect& bounds, int root_window_index) {
- WmWindow* highlighting_window = GetHighlightingWindow(root_window_index);
+ aura::Window* highlighting_window = GetHighlightingWindow(root_window_index);
EXPECT_TRUE(highlighting_window->IsVisible());
EXPECT_EQ(bounds, highlighting_window->GetBoundsInScreen());
- EXPECT_EQ(kBackgroundColor,
- GetInternalWidgetForWindow(highlighting_window->aura_window())
- ->GetRootView()
- ->background()
- ->get_color());
+ EXPECT_EQ(kBackgroundColor, GetInternalWidgetForWindow(highlighting_window)
+ ->GetRootView()
+ ->background()
+ ->get_color());
}
} // namespace
« no previous file with comments | « no previous file | ash/mus/test/ash_test_impl_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698