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

Side by Side Diff: chrome/browser/fragmentation_checker_unittest_win.cc

Issue 8085026: Add a metric to Chrome to measure fragmentation of chrome.dll at startup.BUG=98033TEST=None (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/file_path.h"
6 #include "base/path_service.h"
7 #include "chrome/browser/fragmentation_checker_win.h"
8 #include "chrome/common/guid.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 TEST(FragmentationChecker, BasicCheck) {
12 FilePath module_path;
13 ASSERT_TRUE(PathService::Get(base::FILE_MODULE, &module_path));
14 int extent_count = 0;
15 EXPECT_TRUE(fragmentation_checker::CountFileExtents(module_path,
16 &extent_count));
17 EXPECT_GT(extent_count, 0);
18 }
19
20 TEST(FragmentationChecker, InvalidFile) {
21 FilePath module_path;
22 ASSERT_TRUE(PathService::Get(base::FILE_MODULE, &module_path));
23 module_path = module_path.DirName().AppendASCII(guid::GenerateGUID());
24 int extent_count = 0;
25 EXPECT_FALSE(fragmentation_checker::CountFileExtents(module_path,
26 &extent_count));
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698