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

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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/fragmentation_checker_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 = fragmentation_checker::CountFileExtents(module_path);
15 EXPECT_GT(extent_count, 0);
16 }
17
18 TEST(FragmentationChecker, InvalidFile) {
19 FilePath module_path;
20 ASSERT_TRUE(PathService::Get(base::FILE_MODULE, &module_path));
21 module_path = module_path.DirName().AppendASCII(guid::GenerateGUID());
22 int extent_count = fragmentation_checker::CountFileExtents(module_path);
23 EXPECT_EQ(extent_count, 0);
24 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/fragmentation_checker_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698