Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: extensions/browser/api/runtime/runtime_apitest.cc

Issue 936123002: [Extensions] Implement chrome.runtime.openOptionsPage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: default impl Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 25 matching lines...) Expand all
36 // Auto-confirm the uninstall dialog. 36 // Auto-confirm the uninstall dialog.
37 extensions::ManagementUninstallFunction::SetAutoConfirmForTest(true); 37 extensions::ManagementUninstallFunction::SetAutoConfirmForTest(true);
38 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("runtime") 38 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("runtime")
39 .AppendASCII("uninstall_url") 39 .AppendASCII("uninstall_url")
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, ChromeRuntimeOpenOptionsPage) {
47 ASSERT_TRUE(RunExtensionTest("runtime/open_options_page"));
48 }
49
50 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeOpenOptionsPageError) {
51 ASSERT_TRUE(RunExtensionTest("runtime/open_options_page_error"));
52 }
53
46 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeGetPlatformInfo) { 54 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeGetPlatformInfo) {
47 scoped_ptr<base::Value> result( 55 scoped_ptr<base::Value> result(
48 extension_function_test_utils::RunFunctionAndReturnSingleResult( 56 extension_function_test_utils::RunFunctionAndReturnSingleResult(
49 new RuntimeGetPlatformInfoFunction(), "[]", browser())); 57 new RuntimeGetPlatformInfoFunction(), "[]", browser()));
50 ASSERT_TRUE(result.get() != NULL); 58 ASSERT_TRUE(result.get() != NULL);
51 base::DictionaryValue* dict = 59 base::DictionaryValue* dict =
52 extension_function_test_utils::ToDictionary(result.get()); 60 extension_function_test_utils::ToDictionary(result.get());
53 ASSERT_TRUE(dict != NULL); 61 ASSERT_TRUE(dict != NULL);
54 EXPECT_TRUE(dict->HasKey("os")); 62 EXPECT_TRUE(dict->HasKey("os"));
55 EXPECT_TRUE(dict->HasKey("arch")); 63 EXPECT_TRUE(dict->HasKey("arch"));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } else { 122 } else {
115 load_observer.Wait(); 123 load_observer.Wait();
116 WaitForExtensionViewsToLoad(); 124 WaitForExtensionViewsToLoad();
117 } 125 }
118 } 126 }
119 ASSERT_TRUE( 127 ASSERT_TRUE(
120 registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)); 128 registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED));
121 } 129 }
122 130
123 } // namespace extensions 131 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/runtime/runtime_api_delegate.cc ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698