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

Side by Side Diff: chrome/browser/extensions/api/chrome_auth_private/chrome_auth_private_apitest.cc

Issue 10796062: Moving chrome_auth_private to c/b/extensions/api (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/api/chrome_auth_private/chrome_auth_private_ api.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.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"
11 #include "chrome/test/base/ui_test_utils.h" 11 #include "chrome/test/base/ui_test_utils.h"
12 #include "net/base/mock_host_resolver.h" 12 #include "net/base/mock_host_resolver.h"
13 13
14 // A base class for tests below. 14 // A base class for tests below.
15 class ExtensionChromeAuthPrivateApiTest : public ExtensionApiTest { 15 class ExtensionChromeAuthPrivateApiTest : public ExtensionApiTest {
16 public: 16 public:
17 void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 17 void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
(...skipping 26 matching lines...) Expand all
44 return url.ReplaceComponents(replace_host); 44 return url.ReplaceComponents(replace_host);
45 } 45 }
46 }; 46 };
47 47
48 #if !defined(OS_CHROMEOS) 48 #if !defined(OS_CHROMEOS)
49 IN_PROC_BROWSER_TEST_F(ExtensionChromeAuthPrivateApiTest, 49 IN_PROC_BROWSER_TEST_F(ExtensionChromeAuthPrivateApiTest,
50 SetCloudPrintCredentialsSuccessHosted) { 50 SetCloudPrintCredentialsSuccessHosted) {
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 extensions::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 extensions::SetCloudPrintCredentialsFunction::SetTestMode(false);
59 } 59 }
60 #endif // !defined(OS_CHROMEOS) 60 #endif // !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698