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

Unified Diff: components/exo/shell_surface_unittest.cc

Issue 2694213003: mash: wires up shadows for mash (Closed)
Patch Set: defaults test Created 3 years, 10 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
Index: components/exo/shell_surface_unittest.cc
diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc
index bd892727284c55e9397fbe5ec3ac61922c621bb5..d6bcc5f4b0085b31c5a71ace40da55982b3f761a 100644
--- a/components/exo/shell_surface_unittest.cc
+++ b/components/exo/shell_surface_unittest.cc
@@ -46,6 +46,10 @@ uint32_t ConfigureFullscreen(uint32_t serial,
return serial;
}
+wm::ShadowElevation GetShadowElevation(aura::Window* window) {
+ return window->GetProperty(wm::kShadowElevationKey);
+}
+
TEST_F(ShellSurfaceTest, AcknowledgeConfigure) {
gfx::Size buffer_size(32, 32);
std::unique_ptr<Buffer> buffer(
@@ -560,14 +564,14 @@ TEST_F(ShellSurfaceTest, SurfaceShadow) {
shell_surface->SetRectangularSurfaceShadow(gfx::Rect());
surface->Commit();
- EXPECT_EQ(wm::ShadowElevation::NONE, wm::GetShadowElevation(window));
+ EXPECT_EQ(wm::ShadowElevation::NONE, GetShadowElevation(window));
EXPECT_FALSE(shadow->layer()->visible());
// 6) This should enable non surface shadow again.
shell_surface->SetRectangularSurfaceShadow(gfx::Rect(10, 10, 100, 100));
surface->Commit();
- EXPECT_EQ(wm::ShadowElevation::MEDIUM, wm::GetShadowElevation(window));
+ EXPECT_EQ(wm::ShadowElevation::MEDIUM, GetShadowElevation(window));
EXPECT_TRUE(shadow->layer()->visible());
// For surface shadow, the underlay is placed at the bottom of shell surfaces.
@@ -637,14 +641,14 @@ TEST_F(ShellSurfaceTest, NonSurfaceShadow) {
shell_surface->SetRectangularShadowEnabled(false);
surface->Commit();
- EXPECT_EQ(wm::ShadowElevation::NONE, wm::GetShadowElevation(window));
+ EXPECT_EQ(wm::ShadowElevation::NONE, GetShadowElevation(window));
EXPECT_FALSE(shadow->layer()->visible());
// 6) This should enable non surface shadow.
shell_surface->SetRectangularShadowEnabled(true);
surface->Commit();
- EXPECT_EQ(wm::ShadowElevation::MEDIUM, wm::GetShadowElevation(window));
+ EXPECT_EQ(wm::ShadowElevation::MEDIUM, GetShadowElevation(window));
EXPECT_TRUE(shadow->layer()->visible());
// For no surface shadow, both of underlay and overlay should be stacked
@@ -691,7 +695,7 @@ TEST_F(ShellSurfaceTest, ShadowWithStateChange) {
shell_surface->SetRectangularSurfaceShadow(shadow_bounds);
surface->Commit();
- EXPECT_EQ(wm::ShadowElevation::MEDIUM, wm::GetShadowElevation(window));
+ EXPECT_EQ(wm::ShadowElevation::MEDIUM, GetShadowElevation(window));
// Shadow overlay bounds.
EXPECT_TRUE(shadow->layer()->visible());
« no previous file with comments | « chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc ('k') | services/ui/public/interfaces/window_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698