Enable Enterprise enrollment on desktop builds.
[chromium-blink-merge.git] / chrome / browser / apps / app_crash_browsertest.cc
blobb03d1200091d446213460e715c70c64abc7e4da4
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/apps/app_browsertest_util.h"
6 #include "chrome/browser/extensions/extension_test_message_listener.h"
8 // This class of BrowserTests is a helper to create tests related to crashes in
9 // Chrome Apps. To be tested, the app will have to be placed as any other test
10 // app (see PlatformAppBrowserTest) and will need to send a "Done" message back.
11 // When the "Done" message is received, the test succeed. If it is not, it is
12 // assumed that Chrome has crashed and the test will anyway fail.
14 // The entry in this file should be something like:
15 // IN_PROC_BROWSER_TEST_F(AppCrashTest, <TEST_NAME>) {
16 // ASSERT_TRUE(RunAppCrashTest("<DIRECTORY_TEST_NAME>"));
17 // }
19 class AppCrashTest : public extensions::PlatformAppBrowserTest {
20 public:
21 bool RunAppCrashTest(const char* name) {
22 ExtensionTestMessageListener listener("Done", false);
23 LoadAndLaunchPlatformApp(name);
24 return listener.WaitUntilSatisfied();
28 IN_PROC_BROWSER_TEST_F(AppCrashTest, HiddenWindows) {
29 ASSERT_TRUE(RunAppCrashTest("crashtest_hidden_windows"));