OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
6 #include "chrome/browser/apps/app_browsertest_util.h" | 6 #include "chrome/browser/apps/app_browsertest_util.h" |
7 #include "extensions/browser/app_window/native_app_window.h" | 7 #include "extensions/browser/app_window/native_app_window.h" |
8 | 8 |
9 namespace extensions { | 9 namespace extensions { |
10 | 10 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 window->SetAlwaysOnTop(false); | 179 window->SetAlwaysOnTop(false); |
180 EXPECT_FALSE(window->GetBaseWindow()->IsAlwaysOnTop()); | 180 EXPECT_FALSE(window->GetBaseWindow()->IsAlwaysOnTop()); |
181 | 181 |
182 // Ensure that always-on-top remains disabled. | 182 // Ensure that always-on-top remains disabled. |
183 window->Restore(); | 183 window->Restore(); |
184 EXPECT_FALSE(window->GetBaseWindow()->IsAlwaysOnTop()); | 184 EXPECT_FALSE(window->GetBaseWindow()->IsAlwaysOnTop()); |
185 | 185 |
186 CloseAppWindow(window); | 186 CloseAppWindow(window); |
187 } | 187 } |
188 | 188 |
| 189 // Tests a window created with showInShelf property enabled is indeed marked |
| 190 // as shown in shelf in AppWindow. |
| 191 IN_PROC_BROWSER_TEST_F(AppWindowTest, InitShowInShelf) { |
| 192 AppWindow* window = CreateTestAppWindow("{ \"showInShelf\": true }"); |
| 193 ASSERT_TRUE(window); |
| 194 |
| 195 // Ensure that the window created is marked as shown in shelf. |
| 196 EXPECT_TRUE(window->show_in_shelf()); |
| 197 |
| 198 CloseAppWindow(window); |
| 199 } |
| 200 |
189 } // namespace extensions | 201 } // namespace extensions |
OLD | NEW |