OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/safe_browsing/incident_reporting_service.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting_service.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
673 // Adding the same incident again should still result in no upload. | 673 // Adding the same incident again should still result in no upload. |
674 AddTestIncident(profile); | 674 AddTestIncident(profile); |
675 | 675 |
676 // Let all tasks run. | 676 // Let all tasks run. |
677 task_runner_->RunUntilIdle(); | 677 task_runner_->RunUntilIdle(); |
678 | 678 |
679 // No upload should have taken place. | 679 // No upload should have taken place. |
680 AssertNoUpload(); | 680 AssertNoUpload(); |
681 } | 681 } |
682 | 682 |
683 // Tests that no upload results from adding an incident that is not affiliated | |
684 // with a profile. | |
685 TEST_F(IncidentReportingServiceTest, ProcessWideNoProfileNoUpload) { | |
robertshield
2014/08/05 21:26:28
I vaguely recall suggesting an extra test here in
| |
686 // Add the test incident. | |
687 AddTestIncident(NULL); | |
688 | |
689 // Let all tasks run. | |
690 task_runner_->RunUntilIdle(); | |
691 | |
692 // No upload should have taken place. | |
693 AssertNoUpload(); | |
694 } | |
695 | |
683 // Parallel uploads | 696 // Parallel uploads |
684 // Shutdown during processing | 697 // Shutdown during processing |
685 // environment colection taking longer than incident delay timer | 698 // environment colection taking longer than incident delay timer |
686 // environment colection taking longer than incident delay timer, and then | 699 // environment colection taking longer than incident delay timer, and then |
687 // another incident arriving | 700 // another incident arriving |
OLD | NEW |