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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 } | 485 } |
486 | 486 |
487 IN_PROC_BROWSER_TEST_F(KioskAppManagerTest, BadApp) { | 487 IN_PROC_BROWSER_TEST_F(KioskAppManagerTest, BadApp) { |
488 AppDataLoadWaiter waiter(manager(), 2); | 488 AppDataLoadWaiter waiter(manager(), 2); |
489 manager()->AddApp("unknown_app"); | 489 manager()->AddApp("unknown_app"); |
490 TestKioskAppManagerObserver observer(manager()); | 490 TestKioskAppManagerObserver observer(manager()); |
491 waiter.Wait(); | 491 waiter.Wait(); |
492 EXPECT_FALSE(waiter.loaded()); | 492 EXPECT_FALSE(waiter.loaded()); |
493 | 493 |
494 EXPECT_EQ("", GetAppIds()); | 494 EXPECT_EQ("", GetAppIds()); |
495 EXPECT_EQ(1, observer.load_failure_count()); | 495 EXPECT_LE(1, observer.load_failure_count()); |
496 } | 496 } |
497 | 497 |
498 IN_PROC_BROWSER_TEST_F(KioskAppManagerTest, GoodApp) { | 498 IN_PROC_BROWSER_TEST_F(KioskAppManagerTest, GoodApp) { |
499 // Webstore data json is in | 499 // Webstore data json is in |
500 // chrome/test/data/chromeos/app_mode/webstore/inlineinstall/detail/app_1 | 500 // chrome/test/data/chromeos/app_mode/webstore/inlineinstall/detail/app_1 |
501 fake_cws()->SetNoUpdate("app_1"); | 501 fake_cws()->SetNoUpdate("app_1"); |
502 AppDataLoadWaiter waiter(manager(), 2); | 502 AppDataLoadWaiter waiter(manager(), 2); |
503 manager()->AddApp("app_1"); | 503 manager()->AddApp("app_1"); |
504 waiter.Wait(); | 504 waiter.Wait(); |
505 EXPECT_TRUE(waiter.loaded()); | 505 EXPECT_TRUE(waiter.loaded()); |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 manager()->GetConsumerKioskAutoLaunchStatus( | 713 manager()->GetConsumerKioskAutoLaunchStatus( |
714 base::Bind(&ConsumerKioskAutoLaunchStatusCheck, | 714 base::Bind(&ConsumerKioskAutoLaunchStatusCheck, |
715 status.get(), | 715 status.get(), |
716 runner3->QuitClosure())); | 716 runner3->QuitClosure())); |
717 runner3->Run(); | 717 runner3->Run(); |
718 EXPECT_EQ(*status.get(), | 718 EXPECT_EQ(*status.get(), |
719 KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_DISABLED); | 719 KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_DISABLED); |
720 } | 720 } |
721 | 721 |
722 } // namespace chromeos | 722 } // namespace chromeos |
OLD | NEW |