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

Unified Diff: chrome/browser/extensions/api/system_info_memory/system_info_memory_apitest.cc

Issue 19912002: [SystemInfo API] Rename systemInfo Memory API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update commit message. Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/system_info_memory/system_info_memory_apitest.cc
diff --git a/chrome/browser/extensions/api/system_info_memory/system_info_memory_apitest.cc b/chrome/browser/extensions/api/system_info_memory/system_info_memory_apitest.cc
deleted file mode 100644
index 0f070ec77ef2017f3142647cc316c6f148ccbbd3..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/system_info_memory/system_info_memory_apitest.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
-#include "chrome/browser/extensions/api/system_info_memory/memory_info_provider.h"
-#include "chrome/browser/extensions/extension_apitest.h"
-#include "chrome/browser/extensions/extension_test_message_listener.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/test/base/ui_test_utils.h"
-
-namespace extensions {
-
-using api::system_info_memory::MemoryInfo;
-
-const char kExtensionId[] = "lfmcnjhchhgejbpbonjobnlbcgcnmjif";
-
-class MockMemoryInfoProviderImpl : public MemoryInfoProvider {
- public:
- MockMemoryInfoProviderImpl() {}
-
- virtual bool QueryInfo() OVERRIDE {
- info_.capacity = 4096;
- info_.available_capacity = 1024;
- return true;
- }
- private:
- virtual ~MockMemoryInfoProviderImpl() {}
-};
-
-class SystemInfoMemoryApiTest: public ExtensionApiTest {
- public:
- SystemInfoMemoryApiTest() {}
- virtual ~SystemInfoMemoryApiTest() {}
-
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
- ExtensionApiTest::SetUpCommandLine(command_line);
- command_line->AppendSwitchASCII(switches::kWhitelistedExtensionID,
- kExtensionId);
- }
-
- virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
- ExtensionApiTest::SetUpInProcessBrowserTestFixture();
- message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
- }
-
- private:
- scoped_ptr<base::MessageLoop> message_loop_;
-};
-
-IN_PROC_BROWSER_TEST_F(SystemInfoMemoryApiTest, Memory) {
- scoped_refptr<MemoryInfoProvider> provider = new MockMemoryInfoProviderImpl();
- // The provider is owned by the single MemoryInfoProvider instance.
- MemoryInfoProvider::InitializeForTesting(provider);
- ASSERT_TRUE(RunExtensionTest("systeminfo/memory")) << message_;
-}
-
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698