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 #include "base/command_line.h" | 4 #include "base/command_line.h" |
5 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "chrome/browser/extensions/api/system_info_display/display_info_provide
r.h" | 6 #include "chrome/browser/extensions/api/system_info_display/display_info_provide
r.h" |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chrome/browser/extensions/extension_test_message_listener.h" | 8 #include "chrome/browser/extensions/extension_test_message_listener.h" |
9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 SystemInfoDisplayApiTest() {} | 48 SystemInfoDisplayApiTest() {} |
49 virtual ~SystemInfoDisplayApiTest() {} | 49 virtual ~SystemInfoDisplayApiTest() {} |
50 | 50 |
51 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 51 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
52 ExtensionApiTest::SetUpCommandLine(command_line); | 52 ExtensionApiTest::SetUpCommandLine(command_line); |
53 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); | 53 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); |
54 } | 54 } |
55 | 55 |
56 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 56 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
57 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 57 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
58 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); | 58 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
59 } | 59 } |
60 | 60 |
61 private: | 61 private: |
62 scoped_ptr<MessageLoop> message_loop_; | 62 scoped_ptr<base::MessageLoop> message_loop_; |
63 }; | 63 }; |
64 | 64 |
65 IN_PROC_BROWSER_TEST_F(SystemInfoDisplayApiTest, Display) { | 65 IN_PROC_BROWSER_TEST_F(SystemInfoDisplayApiTest, Display) { |
66 // The |provider| will be owned by the singleton instance. | 66 // The |provider| will be owned by the singleton instance. |
67 scoped_refptr<MockDisplayInfoProvider> provider = | 67 scoped_refptr<MockDisplayInfoProvider> provider = |
68 new MockDisplayInfoProvider(); | 68 new MockDisplayInfoProvider(); |
69 DisplayInfoProvider::InitializeForTesting(provider); | 69 DisplayInfoProvider::InitializeForTesting(provider); |
70 ASSERT_TRUE(RunPlatformAppTest("systeminfo/display")) << message_; | 70 ASSERT_TRUE(RunPlatformAppTest("systeminfo/display")) << message_; |
71 } | 71 } |
72 | 72 |
73 } // namespace extensions | 73 } // namespace extensions |
OLD | NEW |