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

Unified Diff: components/exo/shell_surface_unittest.cc

Issue 2480713003: Window prerequisites for ShelfWindowWatcher panel support. (Closed)
Patch Set: Support and test pre-widget exo ShellSurface::SetApplicationId. Created 4 years, 1 month 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 | « components/exo/shell_surface.cc ('k') | ui/aura/client/aura_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface_unittest.cc
diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc
index 1ba2412c316d2ad9e7bef8fa30d56b30f17d7262..575dafc6d6f9d26540c2bc94ec67a8651d594d87 100644
--- a/components/exo/shell_surface_unittest.cc
+++ b/components/exo/shell_surface_unittest.cc
@@ -203,12 +203,14 @@ TEST_F(ShellSurfaceTest, SetApplicationId) {
std::unique_ptr<Surface> surface(new Surface);
std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
+ EXPECT_EQ(nullptr, shell_surface->GetWidget());
+ shell_surface->SetApplicationId("pre-widget-id");
+
surface->Commit();
- EXPECT_EQ("", ShellSurface::GetApplicationId(
- shell_surface->GetWidget()->GetNativeWindow()));
+ aura::Window* window = shell_surface->GetWidget()->GetNativeWindow();
+ EXPECT_EQ("pre-widget-id", ShellSurface::GetApplicationId(window));
shell_surface->SetApplicationId("test");
- EXPECT_EQ("test", ShellSurface::GetApplicationId(
- shell_surface->GetWidget()->GetNativeWindow()));
+ EXPECT_EQ("test", ShellSurface::GetApplicationId(window));
}
TEST_F(ShellSurfaceTest, Move) {
« no previous file with comments | « components/exo/shell_surface.cc ('k') | ui/aura/client/aura_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698