| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/stringprintf.h" | 5 #include "base/stringprintf.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/browser/extensions/extension_chrome_auth_private_api.h" | 7 #include "chrome/browser/extensions/extension_chrome_auth_private_api.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Run this as a hosted app. Since we have overridden the cloud print service | 51 // Run this as a hosted app. Since we have overridden the cloud print service |
| 52 // URL in the command line, this URL should match the web extent for our | 52 // URL in the command line, this URL should match the web extent for our |
| 53 // cloud print component app and it should work. | 53 // cloud print component app and it should work. |
| 54 SetCloudPrintCredentialsFunction::SetTestMode(true); | 54 SetCloudPrintCredentialsFunction::SetTestMode(true); |
| 55 GURL page_url = GetTestServerURL( | 55 GURL page_url = GetTestServerURL( |
| 56 "enable_chrome_connector/cloud_print_success_tests.html"); | 56 "enable_chrome_connector/cloud_print_success_tests.html"); |
| 57 ASSERT_TRUE(RunPageTest(page_url.spec())); | 57 ASSERT_TRUE(RunPageTest(page_url.spec())); |
| 58 SetCloudPrintCredentialsFunction::SetTestMode(false); | 58 SetCloudPrintCredentialsFunction::SetTestMode(false); |
| 59 } | 59 } |
| 60 #endif // !defined(OS_CHROMEOS) | 60 #endif // !defined(OS_CHROMEOS) |
| 61 | |
| 62 IN_PROC_BROWSER_TEST_F(ExtensionChromeAuthPrivateApiTest, | |
| 63 SetCloudPrintCredentialsFailureInstalledComponent) { | |
| 64 // Run this as an installed component app. This should also fail because of | |
| 65 // the explicit URL check in the API. | |
| 66 ASSERT_TRUE(RunComponentExtensionTest( | |
| 67 "chrome_auth_private/installed_component_app")); | |
| 68 } | |
| OLD | NEW |