| 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/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/browser/extensions/test_extension_dir.h" | 8 #include "chrome/browser/extensions/test_extension_dir.h" |
| 9 #include "chrome/test/base/ui_test_utils.h" | 9 #include "chrome/test/base/ui_test_utils.h" |
| 10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeOpenOptionsPage) { | 47 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeOpenOptionsPage) { |
| 48 ASSERT_TRUE(RunExtensionTest("runtime/open_options_page")); | 48 ASSERT_TRUE(RunExtensionTest("runtime/open_options_page")); |
| 49 } | 49 } |
| 50 | 50 |
| 51 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeOpenOptionsPageError) { | 51 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeOpenOptionsPageError) { |
| 52 ASSERT_TRUE(RunExtensionTest("runtime/open_options_page_error")); | 52 ASSERT_TRUE(RunExtensionTest("runtime/open_options_page_error")); |
| 53 } | 53 } |
| 54 | 54 |
| 55 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeGetPlatformInfo) { | 55 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeGetPlatformInfo) { |
| 56 scoped_ptr<base::Value> result( | 56 std::unique_ptr<base::Value> result( |
| 57 extension_function_test_utils::RunFunctionAndReturnSingleResult( | 57 extension_function_test_utils::RunFunctionAndReturnSingleResult( |
| 58 new RuntimeGetPlatformInfoFunction(), "[]", browser())); | 58 new RuntimeGetPlatformInfoFunction(), "[]", browser())); |
| 59 ASSERT_TRUE(result.get() != NULL); | 59 ASSERT_TRUE(result.get() != NULL); |
| 60 base::DictionaryValue* dict = | 60 base::DictionaryValue* dict = |
| 61 extension_function_test_utils::ToDictionary(result.get()); | 61 extension_function_test_utils::ToDictionary(result.get()); |
| 62 ASSERT_TRUE(dict != NULL); | 62 ASSERT_TRUE(dict != NULL); |
| 63 EXPECT_TRUE(dict->HasKey("os")); | 63 EXPECT_TRUE(dict->HasKey("os")); |
| 64 EXPECT_TRUE(dict->HasKey("arch")); | 64 EXPECT_TRUE(dict->HasKey("arch")); |
| 65 EXPECT_TRUE(dict->HasKey("nacl_arch")); | 65 EXPECT_TRUE(dict->HasKey("nacl_arch")); |
| 66 } | 66 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } else { | 122 } else { |
| 123 load_observer.Wait(); | 123 load_observer.Wait(); |
| 124 WaitForExtensionViewsToLoad(); | 124 WaitForExtensionViewsToLoad(); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 ASSERT_TRUE( | 127 ASSERT_TRUE( |
| 128 registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)); | 128 registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace extensions | 131 } // namespace extensions |
| OLD | NEW |