OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 477 |
478 waiter.Wait(); | 478 waiter.Wait(); |
479 EXPECT_TRUE(waiter.loaded()); | 479 EXPECT_TRUE(waiter.loaded()); |
480 | 480 |
481 manager()->GetApps(&apps); | 481 manager()->GetApps(&apps); |
482 EXPECT_EQ(1u, apps.size()); | 482 EXPECT_EQ(1u, apps.size()); |
483 EXPECT_EQ("app_1", apps[0].app_id); | 483 EXPECT_EQ("app_1", apps[0].app_id); |
484 EXPECT_EQ("Updated App1 Name", apps[0].name); | 484 EXPECT_EQ("Updated App1 Name", apps[0].name); |
485 } | 485 } |
486 | 486 |
487 IN_PROC_BROWSER_TEST_F(KioskAppManagerTest, BadApp) { | 487 // Test is flaky. See http://crbug.com/379769 for details. |
| 488 IN_PROC_BROWSER_TEST_F(KioskAppManagerTest, DISABLED_BadApp) { |
488 AppDataLoadWaiter waiter(manager(), 2); | 489 AppDataLoadWaiter waiter(manager(), 2); |
489 manager()->AddApp("unknown_app"); | 490 manager()->AddApp("unknown_app"); |
490 TestKioskAppManagerObserver observer(manager()); | 491 TestKioskAppManagerObserver observer(manager()); |
491 waiter.Wait(); | 492 waiter.Wait(); |
492 EXPECT_FALSE(waiter.loaded()); | 493 EXPECT_FALSE(waiter.loaded()); |
493 | 494 |
494 EXPECT_EQ("", GetAppIds()); | 495 EXPECT_EQ("", GetAppIds()); |
495 EXPECT_EQ(1, observer.load_failure_count()); | 496 EXPECT_EQ(1, observer.load_failure_count()); |
496 } | 497 } |
497 | 498 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 manager()->GetConsumerKioskAutoLaunchStatus( | 714 manager()->GetConsumerKioskAutoLaunchStatus( |
714 base::Bind(&ConsumerKioskAutoLaunchStatusCheck, | 715 base::Bind(&ConsumerKioskAutoLaunchStatusCheck, |
715 status.get(), | 716 status.get(), |
716 runner3->QuitClosure())); | 717 runner3->QuitClosure())); |
717 runner3->Run(); | 718 runner3->Run(); |
718 EXPECT_EQ(*status.get(), | 719 EXPECT_EQ(*status.get(), |
719 KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_DISABLED); | 720 KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_DISABLED); |
720 } | 721 } |
721 | 722 |
722 } // namespace chromeos | 723 } // namespace chromeos |
OLD | NEW |