Chromium Code Reviews| Index: ui/aura/mus/window_tree_client_unittest.cc |
| diff --git a/ui/aura/mus/window_tree_client_unittest.cc b/ui/aura/mus/window_tree_client_unittest.cc |
| index f186bd6f14708534cf2db8111b7bfc0f8f880cd5..2dd9326ae73cc7e9473a7e4ff37581889e5793a3 100644 |
| --- a/ui/aura/mus/window_tree_client_unittest.cc |
| +++ b/ui/aura/mus/window_tree_client_unittest.cc |
| @@ -1048,4 +1048,19 @@ TEST_F(WindowTreeClientWmTest, OnWindowTreeCaptureChanged) { |
| capture_recorder.reset_capture_captured_count(); |
| } |
| +TEST_F(WindowTreeClientClientTest, Modal) { |
|
msw
2016/10/27 18:37:37
nit: test a successful change, sequential changes,
sky
2016/10/27 19:30:06
I added a successful test. Sequential doesn't real
|
| + Window window(nullptr); |
| + window.Init(ui::LAYER_NOT_DRAWN); |
| + window.SetProperty(client::kModalKey, ui::MODAL_TYPE_WINDOW); |
| + // Make sure server was told about it, and have the server say it failed. |
| + ASSERT_TRUE( |
| + window_tree()->AckSingleChangeOfType(WindowTreeChangeType::MODAL, false)); |
| + // Type should be back to MODAL_TYPE_NONE as the server didn't accept the |
| + // change. |
| + EXPECT_EQ(ui::MODAL_TYPE_NONE, window.GetProperty(client::kModalKey)); |
| + // There should be no more modal changes. |
| + EXPECT_FALSE( |
| + window_tree()->AckSingleChangeOfType(WindowTreeChangeType::MODAL, false)); |
| +} |
| + |
| } // namespace aura |