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

Side by Side Diff: chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_unittest.cc

Issue 15817008: Move systemInfo.cpu API out out experimental namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // CpuInfoProvider unit tests 5 // CpuInfoProvider unit tests
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h" 9 #include "chrome/browser/extensions/api/system_info_cpu/cpu_info_provider.h"
10 #include "content/public/test/test_browser_thread.h" 10 #include "content/public/test/test_browser_thread.h"
11 #include "content/public/test/test_utils.h" 11 #include "content/public/test/test_utils.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 using api::experimental_system_info_cpu::CpuInfo; 16 using api::system_info_cpu::CpuInfo;
17 using api::experimental_system_info_cpu::CpuUpdateInfo; 17 using api::system_info_cpu::CpuUpdateInfo;
18 using content::BrowserThread; 18 using content::BrowserThread;
19 19
20 struct TestCpuInfo { 20 struct TestCpuInfo {
21 std::string arch_name; 21 std::string arch_name;
22 std::string model_name; 22 std::string model_name;
23 int num_of_processors; 23 int num_of_processors;
24 }; 24 };
25 25
26 struct TestCpuTimeInfo { 26 struct TestCpuTimeInfo {
27 int64 user; 27 int64 user;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 base::Bind(&CpuInfoProviderTest::OnCheckCpuSamplingFinishedForTesting, 273 base::Bind(&CpuInfoProviderTest::OnCheckCpuSamplingFinishedForTesting,
274 base::Unretained(this))); 274 base::Unretained(this)));
275 content::RunAllPendingInMessageLoop(content::BrowserThread::FILE); 275 content::RunAllPendingInMessageLoop(content::BrowserThread::FILE);
276 content::RunMessageLoop(); 276 content::RunMessageLoop();
277 cpu_info_provider_->StopSampling(); 277 cpu_info_provider_->StopSampling();
278 content::RunAllPendingInMessageLoop(content::BrowserThread::FILE); 278 content::RunAllPendingInMessageLoop(content::BrowserThread::FILE);
279 VerifyResult(); 279 VerifyResult();
280 } 280 }
281 281
282 } 282 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698