OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "chrome/browser/extensions/api/system_info_memory/memory_info_provider.
h" | 7 #include "chrome/browser/extensions/api/system_info_memory/memory_info_provider.
h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_test_message_listener.h" | 9 #include "chrome/browser/extensions/extension_test_message_listener.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 SystemInfoMemoryApiTest() {} | 32 SystemInfoMemoryApiTest() {} |
33 virtual ~SystemInfoMemoryApiTest() {} | 33 virtual ~SystemInfoMemoryApiTest() {} |
34 | 34 |
35 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 35 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
36 ExtensionApiTest::SetUpCommandLine(command_line); | 36 ExtensionApiTest::SetUpCommandLine(command_line); |
37 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 37 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
38 } | 38 } |
39 | 39 |
40 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 40 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
41 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 41 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
42 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); | 42 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
43 } | 43 } |
44 | 44 |
45 private: | 45 private: |
46 scoped_ptr<MessageLoop> message_loop_; | 46 scoped_ptr<base::MessageLoop> message_loop_; |
47 }; | 47 }; |
48 | 48 |
49 IN_PROC_BROWSER_TEST_F(SystemInfoMemoryApiTest, Memory) { | 49 IN_PROC_BROWSER_TEST_F(SystemInfoMemoryApiTest, Memory) { |
50 scoped_refptr<MemoryInfoProvider> provider = new MockMemoryInfoProviderImpl(); | 50 scoped_refptr<MemoryInfoProvider> provider = new MockMemoryInfoProviderImpl(); |
51 // The provider is owned by the single MemoryInfoProvider instance. | 51 // The provider is owned by the single MemoryInfoProvider instance. |
52 MemoryInfoProvider::InitializeForTesting(provider); | 52 MemoryInfoProvider::InitializeForTesting(provider); |
53 ASSERT_TRUE(RunExtensionTest("systeminfo/memory")) << message_; | 53 ASSERT_TRUE(RunExtensionTest("systeminfo/memory")) << message_; |
54 } | 54 } |
55 | 55 |
56 } // namespace extensions | 56 } // namespace extensions |
OLD | NEW |