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

Side by Side Diff: extensions/browser/api/web_request/web_request_time_tracker_unittest.cc

Issue 584163004: Move web_request directory to //extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 6 years, 2 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
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 "chrome/browser/extensions/api/web_request/web_request_time_tracker.h" 5 #include "extensions/browser/api/web_request/web_request_time_tracker.h"
6 6
7 #include "testing/gmock/include/gmock/gmock.h" 7 #include "testing/gmock/include/gmock/gmock.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace { 10 namespace {
11 const base::TimeDelta kRequestDelta = base::TimeDelta::FromMilliseconds(100); 11 const base::TimeDelta kRequestDelta = base::TimeDelta::FromMilliseconds(100);
12 const base::TimeDelta kTinyDelay = base::TimeDelta::FromMilliseconds(1); 12 const base::TimeDelta kTinyDelay = base::TimeDelta::FromMilliseconds(1);
13 const base::TimeDelta kModerateDelay = base::TimeDelta::FromMilliseconds(25); 13 const base::TimeDelta kModerateDelay = base::TimeDelta::FromMilliseconds(25);
14 const base::TimeDelta kExcessiveDelay = base::TimeDelta::FromMilliseconds(75); 14 const base::TimeDelta kExcessiveDelay = base::TimeDelta::FromMilliseconds(75);
15 15
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 NotifyExcessiveDelays(profile, i+1, request_nr, extensions)); 138 NotifyExcessiveDelays(profile, i+1, request_nr, extensions));
139 } 139 }
140 tracker.LogRequestStartTime(request_nr, start, GURL(), profile); 140 tracker.LogRequestStartTime(request_nr, start, GURL(), profile);
141 tracker.IncrementExtensionBlockTime(extension1_id, request_nr, 141 tracker.IncrementExtensionBlockTime(extension1_id, request_nr,
142 kExcessiveDelay); 142 kExcessiveDelay);
143 tracker.IncrementTotalBlockTime(request_nr, kExcessiveDelay); 143 tracker.IncrementTotalBlockTime(request_nr, kExcessiveDelay);
144 tracker.LogRequestEndTime(request_nr, start + kRequestDelta); 144 tracker.LogRequestEndTime(request_nr, start + kRequestDelta);
145 Mock::VerifyAndClearExpectations(delegate); 145 Mock::VerifyAndClearExpectations(delegate);
146 } 146 }
147 } 147 }
OLDNEW
« no previous file with comments | « extensions/browser/api/web_request/web_request_time_tracker.cc ('k') | extensions/common/api/schemas.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698