| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <list> | 5 #include <list> |
| 6 #include <utility> | 6 #include <utility> |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 RegisterComponent(&com2, kTestComponent_jebg, Version("0.9"), &installer2); | 512 RegisterComponent(&com2, kTestComponent_jebg, Version("0.9"), &installer2); |
| 513 | 513 |
| 514 const GURL expected_update_url_1( | 514 const GURL expected_update_url_1( |
| 515 "http://localhost/upd?extra=foo" | 515 "http://localhost/upd?extra=foo" |
| 516 "&x=id%3Dabagagagagagagagagagagagagagagag%26v%3D2.2%26fp%3D%26uc" | 516 "&x=id%3Dabagagagagagagagagagagagagagagag%26v%3D2.2%26fp%3D%26uc" |
| 517 "&x=id%3Djebgalgnebhfojomionfpkfelancnnkf%26v%3D0.9%26fp%3D%26uc"); | 517 "&x=id%3Djebgalgnebhfojomionfpkfelancnnkf%26v%3D0.9%26fp%3D%26uc"); |
| 518 | 518 |
| 519 const GURL expected_update_url_2( | 519 const GURL expected_update_url_2( |
| 520 "http://localhost/upd?extra=foo" | 520 "http://localhost/upd?extra=foo" |
| 521 "&x=id%3Djebgalgnebhfojomionfpkfelancnnkf%26v%3D0.9%26fp%3D%26uc" | 521 "&x=id%3Djebgalgnebhfojomionfpkfelancnnkf%26v%3D0.9%26fp%3D%26uc" |
| 522 "%26installsource%3Dondemand" |
| 522 "&x=id%3Dabagagagagagagagagagagagagagagag%26v%3D2.2%26fp%3D%26uc"); | 523 "&x=id%3Dabagagagagagagagagagagagagagagag%26v%3D2.2%26fp%3D%26uc"); |
| 523 | 524 |
| 524 interceptor.SetResponse(expected_update_url_1, | 525 interceptor.SetResponse(expected_update_url_1, |
| 525 test_file("updatecheck_reply_empty")); | 526 test_file("updatecheck_reply_empty")); |
| 526 interceptor.SetResponse(expected_update_url_2, | 527 interceptor.SetResponse(expected_update_url_2, |
| 527 test_file("updatecheck_reply_1.xml")); | 528 test_file("updatecheck_reply_1.xml")); |
| 528 interceptor.SetResponse(GURL(expected_crx_url), | 529 interceptor.SetResponse(GURL(expected_crx_url), |
| 529 test_file("jebgalgnebhfojomionfpkfelancnnkf.crx")); | 530 test_file("jebgalgnebhfojomionfpkfelancnnkf.crx")); |
| 530 // Test success. | 531 // Test success. |
| 531 test_configurator()->SetLoopCount(2); | 532 test_configurator()->SetLoopCount(2); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 component_updater()->Start(); | 840 component_updater()->Start(); |
| 840 message_loop.Run(); | 841 message_loop.Run(); |
| 841 | 842 |
| 842 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->error()); | 843 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->error()); |
| 843 EXPECT_EQ(2, static_cast<TestInstaller*>(com.installer)->install_count()); | 844 EXPECT_EQ(2, static_cast<TestInstaller*>(com.installer)->install_count()); |
| 844 | 845 |
| 845 EXPECT_EQ(6, interceptor.GetHitCount()); | 846 EXPECT_EQ(6, interceptor.GetHitCount()); |
| 846 | 847 |
| 847 component_updater()->Stop(); | 848 component_updater()->Stop(); |
| 848 } | 849 } |
| OLD | NEW |