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

Unified Diff: ash/common/devtools/ash_devtools_unittest.cc

Issue 2798333005: Moves WmWindow::GetInternalWidget() into a standalone function (Closed)
Patch Set: 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 | « ash/common/accelerators/debug_commands.cc ('k') | ash/common/focus_cycler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/devtools/ash_devtools_unittest.cc
diff --git a/ash/common/devtools/ash_devtools_unittest.cc b/ash/common/devtools/ash_devtools_unittest.cc
index 1b11d2693725fcbaf0760aa0cdc0858441faae70..79f8d5845c6beac6a8d37ee2b680f7d7d90665b2 100644
--- a/ash/common/devtools/ash_devtools_unittest.cc
+++ b/ash/common/devtools/ash_devtools_unittest.cc
@@ -8,6 +8,7 @@
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/root_window_controller.h"
+#include "ash/wm/widget_finder.h"
#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "ui/display/display.h"
@@ -80,7 +81,7 @@ std::string GetAttributeValue(const std::string& attribute, DOM::Node* node) {
bool Equals(WmWindow* window, DOM::Node* node) {
int children_count = static_cast<int>(window->GetChildren().size());
- if (window->GetInternalWidget())
+ if (GetInternalWidgetForWindow(window->aura_window()))
children_count++;
return "Window" == node->getNodeName() &&
window->aura_window()->GetName() == GetAttributeValue("name", node) &&
@@ -169,10 +170,11 @@ void ExpectHighlighted(const gfx::Rect& bounds, int root_window_index) {
WmWindow* highlighting_window = GetHighlightingWindow(root_window_index);
EXPECT_TRUE(highlighting_window->IsVisible());
EXPECT_EQ(bounds, highlighting_window->GetBoundsInScreen());
- EXPECT_EQ(kBackgroundColor, highlighting_window->GetInternalWidget()
- ->GetRootView()
- ->background()
- ->get_color());
+ EXPECT_EQ(kBackgroundColor,
+ GetInternalWidgetForWindow(highlighting_window->aura_window())
+ ->GetRootView()
+ ->background()
+ ->get_color());
}
} // namespace
« no previous file with comments | « ash/common/accelerators/debug_commands.cc ('k') | ash/common/focus_cycler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698