Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: chrome/browser/component_updater/test/component_updater_service_unittest.cc

Issue 17419011: Implement coarse "on demand" functionality for update checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sync
Patch Set: Fix Windows compiler error. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/component_updater/component_updater_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/component_updater_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698