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 "chrome/browser/extensions/api/runtime/runtime_api.h" | 5 #include "chrome/browser/extensions/api/runtime/runtime_api.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "chrome/browser/extensions/extension_function_test_utils.h" | 7 #include "chrome/browser/extensions/extension_function_test_utils.h" |
8 #include "chrome/test/base/ui_test_utils.h" | 8 #include "chrome/test/base/ui_test_utils.h" |
9 | 9 |
10 // Tests the privileged components of chrome.runtime. | 10 // Tests the privileged components of chrome.runtime. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 browser())); | 42 browser())); |
43 ASSERT_TRUE(result.get() != NULL); | 43 ASSERT_TRUE(result.get() != NULL); |
44 base::DictionaryValue* dict = | 44 base::DictionaryValue* dict = |
45 extension_function_test_utils::ToDictionary(result.get()); | 45 extension_function_test_utils::ToDictionary(result.get()); |
46 ASSERT_TRUE(dict != NULL); | 46 ASSERT_TRUE(dict != NULL); |
47 EXPECT_TRUE(dict->HasKey("os")); | 47 EXPECT_TRUE(dict->HasKey("os")); |
48 EXPECT_TRUE(dict->HasKey("arch")); | 48 EXPECT_TRUE(dict->HasKey("arch")); |
49 EXPECT_TRUE(dict->HasKey("nacl_arch")); | 49 EXPECT_TRUE(dict->HasKey("nacl_arch")); |
50 } | 50 } |
51 | 51 |
| 52 // Tests chrome.runtime.getPackageDirectory with an app. |
| 53 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, |
| 54 ChromeRuntimeGetPackageDirectoryEntryApp) { |
| 55 ASSERT_TRUE(RunPlatformAppTest("runtime/get_package_directory/app")) |
| 56 << message_; |
| 57 } |
| 58 |
| 59 // Tests chrome.runtime.getPackageDirectory with an extension. |
| 60 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, |
| 61 ChromeRuntimeGetPackageDirectoryEntryExtension) { |
| 62 ASSERT_TRUE(RunExtensionTest("runtime/get_package_directory/extension")) |
| 63 << message_; |
| 64 } |
| 65 |
52 } // namespace extensions | 66 } // namespace extensions |
OLD | NEW |