OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "chrome/browser/component_updater/test/component_updater_service_unitte
st.h" | 7 #include "chrome/browser/component_updater/test/component_updater_service_unitte
st.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 | 453 |
454 component_updater()->Stop(); | 454 component_updater()->Stop(); |
455 } | 455 } |
456 | 456 |
457 // Test that a update check due to an on demand call can cause installs. | 457 // Test that a update check due to an on demand call can cause installs. |
458 // Here is the timeline: | 458 // Here is the timeline: |
459 // - First loop: we return a reply that indicates no update, so | 459 // - First loop: we return a reply that indicates no update, so |
460 // nothing happens. | 460 // nothing happens. |
461 // - We make an on demand call. | 461 // - We make an on demand call. |
462 // - This triggers a second loop, which has a reply that triggers an install. | 462 // - This triggers a second loop, which has a reply that triggers an install. |
463 TEST_F(ComponentUpdaterTest, OnDemandUpdate) { | 463 #if defined(OS_LINUX) |
| 464 // http://crbug.com/396488 |
| 465 #define MAYBE_OnDemandUpdate DISABLED_OnDemandUpdate |
| 466 #else |
| 467 #define MAYBE_OnDemandUpdate OnDemandUpdate |
| 468 #endif |
| 469 TEST_F(ComponentUpdaterTest, MAYBE_OnDemandUpdate) { |
464 MockServiceObserver observer; | 470 MockServiceObserver observer; |
465 { | 471 { |
466 InSequence seq; | 472 InSequence seq; |
467 EXPECT_CALL(observer, | 473 EXPECT_CALL(observer, |
468 OnEvent(ServiceObserver::COMPONENT_UPDATER_STARTED, "")) | 474 OnEvent(ServiceObserver::COMPONENT_UPDATER_STARTED, "")) |
469 .Times(1); | 475 .Times(1); |
470 EXPECT_CALL(observer, | 476 EXPECT_CALL(observer, |
471 OnEvent(ServiceObserver::COMPONENT_NOT_UPDATED, | 477 OnEvent(ServiceObserver::COMPONENT_NOT_UPDATED, |
472 "abagagagagagagagagagagagagagagag")) | 478 "abagagagagagagagagagagagagagagag")) |
473 .Times(1); | 479 .Times(1); |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1489 component_updater()->RemoveObserver(&observer2); | 1495 component_updater()->RemoveObserver(&observer2); |
1490 | 1496 |
1491 test_configurator()->SetLoopCount(1); | 1497 test_configurator()->SetLoopCount(1); |
1492 component_updater()->Start(); | 1498 component_updater()->Start(); |
1493 RunThreads(); | 1499 RunThreads(); |
1494 | 1500 |
1495 component_updater()->Stop(); | 1501 component_updater()->Stop(); |
1496 } | 1502 } |
1497 | 1503 |
1498 } // namespace component_updater | 1504 } // namespace component_updater |
OLD | NEW |