OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/apps/app_browsertest_util.h" | 5 #include "chrome/browser/apps/app_browsertest_util.h" |
6 #include "chrome/browser/extensions/api/management/management_api.h" | 6 #include "chrome/browser/extensions/api/management/management_api.h" |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chrome/browser/extensions/extension_function_test_utils.h" | 8 #include "chrome/browser/extensions/extension_function_test_utils.h" |
9 #include "chrome/browser/extensions/test_extension_dir.h" | 9 #include "chrome/browser/extensions/test_extension_dir.h" |
10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 .AppendASCII("sets_uninstall_url"))); | 40 .AppendASCII("sets_uninstall_url"))); |
41 ASSERT_TRUE(RunExtensionTest("runtime/uninstall_url")) << message_; | 41 ASSERT_TRUE(RunExtensionTest("runtime/uninstall_url")) << message_; |
42 } | 42 } |
43 | 43 |
44 namespace extensions { | 44 namespace extensions { |
45 | 45 |
46 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeGetPlatformInfo) { | 46 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeGetPlatformInfo) { |
47 scoped_ptr<base::Value> result( | 47 scoped_ptr<base::Value> result( |
48 extension_function_test_utils::RunFunctionAndReturnSingleResult( | 48 extension_function_test_utils::RunFunctionAndReturnSingleResult( |
49 new RuntimeGetPlatformInfoFunction(), "[]", browser())); | 49 new RuntimeGetPlatformInfoFunction(), "[]", browser())); |
50 ASSERT_TRUE(result.get() != NULL); | 50 ASSERT_TRUE(result.get() != nullptr); |
51 base::DictionaryValue* dict = | 51 base::DictionaryValue* dict = |
52 extension_function_test_utils::ToDictionary(result.get()); | 52 extension_function_test_utils::ToDictionary(result.get()); |
53 ASSERT_TRUE(dict != NULL); | 53 ASSERT_TRUE(dict != nullptr); |
54 EXPECT_TRUE(dict->HasKey("os")); | 54 EXPECT_TRUE(dict->HasKey("os")); |
55 EXPECT_TRUE(dict->HasKey("arch")); | 55 EXPECT_TRUE(dict->HasKey("arch")); |
56 EXPECT_TRUE(dict->HasKey("nacl_arch")); | 56 EXPECT_TRUE(dict->HasKey("nacl_arch")); |
57 } | 57 } |
58 | 58 |
59 // Tests chrome.runtime.getPackageDirectory with an app. | 59 // Tests chrome.runtime.getPackageDirectory with an app. |
60 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, | 60 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
61 ChromeRuntimeGetPackageDirectoryEntryApp) { | 61 ChromeRuntimeGetPackageDirectoryEntryApp) { |
62 ClearCommandLineArgs(); | 62 ClearCommandLineArgs(); |
63 ASSERT_TRUE(RunPlatformAppTest("api_test/runtime/get_package_directory/app")) | 63 ASSERT_TRUE(RunPlatformAppTest("api_test/runtime/get_package_directory/app")) |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } else { | 114 } else { |
115 load_observer.Wait(); | 115 load_observer.Wait(); |
116 WaitForExtensionViewsToLoad(); | 116 WaitForExtensionViewsToLoad(); |
117 } | 117 } |
118 } | 118 } |
119 ASSERT_TRUE( | 119 ASSERT_TRUE( |
120 registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)); | 120 registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)); |
121 } | 121 } |
122 | 122 |
123 } // namespace extensions | 123 } // namespace extensions |
OLD | NEW |