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

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

Issue 2190463008: Add an error page for HTTP 404 error pages without bodies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch runtime test to title1.html Created 4 years, 4 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
« no previous file with comments | « components/error_page/common/localized_error.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "extensions/browser/api/runtime/runtime_api.h" 11 #include "extensions/browser/api/runtime/runtime_api.h"
12 #include "extensions/browser/extension_dialog_auto_confirm.h" 12 #include "extensions/browser/extension_dialog_auto_confirm.h"
13 #include "extensions/browser/extension_registry.h" 13 #include "extensions/browser/extension_registry.h"
14 #include "extensions/test/result_catcher.h" 14 #include "extensions/test/result_catcher.h"
15 #include "net/test/embedded_test_server/embedded_test_server.h" 15 #include "net/test/embedded_test_server/embedded_test_server.h"
16 16
17 // Tests the privileged components of chrome.runtime. 17 // Tests the privileged components of chrome.runtime.
18 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimePrivileged) { 18 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimePrivileged) {
19 ASSERT_TRUE(RunExtensionTest("runtime/privileged")) << message_; 19 ASSERT_TRUE(RunExtensionTest("runtime/privileged")) << message_;
20 } 20 }
21 21
22 // Tests the unprivileged components of chrome.runtime. 22 // Tests the unprivileged components of chrome.runtime.
23 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeUnprivileged) { 23 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeUnprivileged) {
24 ASSERT_TRUE(StartEmbeddedTestServer()); 24 ASSERT_TRUE(StartEmbeddedTestServer());
25 ASSERT_TRUE( 25 ASSERT_TRUE(
26 LoadExtension(test_data_dir_.AppendASCII("runtime/content_script"))); 26 LoadExtension(test_data_dir_.AppendASCII("runtime/content_script")));
27 27
28 // The content script runs on webpage.html. 28 // The content script runs on this page.
29 extensions::ResultCatcher catcher; 29 extensions::ResultCatcher catcher;
30 ui_test_utils::NavigateToURL(browser(), 30 ui_test_utils::NavigateToURL(browser(),
31 embedded_test_server()->GetURL("/webpage.html")); 31 embedded_test_server()->GetURL("/title1.html"));
32 EXPECT_TRUE(catcher.GetNextResult()) << message_; 32 EXPECT_TRUE(catcher.GetNextResult()) << message_;
33 } 33 }
34 34
35 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeUninstallURL) { 35 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ChromeRuntimeUninstallURL) {
36 // Auto-confirm the uninstall dialog. 36 // Auto-confirm the uninstall dialog.
37 extensions::ScopedTestDialogAutoConfirm auto_confirm( 37 extensions::ScopedTestDialogAutoConfirm auto_confirm(
38 extensions::ScopedTestDialogAutoConfirm::ACCEPT); 38 extensions::ScopedTestDialogAutoConfirm::ACCEPT);
39 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("runtime") 39 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("runtime")
40 .AppendASCII("uninstall_url") 40 .AppendASCII("uninstall_url")
41 .AppendASCII("sets_uninstall_url"))); 41 .AppendASCII("sets_uninstall_url")));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « components/error_page/common/localized_error.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698