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

Side by Side Diff: chrome/browser/chromeos/login/account_screen_browsertest.cc

Issue 3034038: GTTF: Move more test server code from net/url_request/url_request_unittest.h (Closed)
Patch Set: hopefully final Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <string> 5 #include <string>
6 6
7 #include "chrome/browser/child_process_security_policy.h" 7 #include "chrome/browser/child_process_security_policy.h"
8 #include "chrome/browser/chromeos/login/account_screen.h" 8 #include "chrome/browser/chromeos/login/account_screen.h"
9 #include "chrome/browser/chromeos/login/wizard_controller.h" 9 #include "chrome/browser/chromeos/login/wizard_controller.h"
10 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h" 10 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h"
11 #include "chrome/browser/chrome_thread.h" 11 #include "chrome/browser/chrome_thread.h"
12 #include "chrome/common/url_constants.h" 12 #include "chrome/common/url_constants.h"
13 #include "chrome/test/in_process_browser_test.h" 13 #include "chrome/test/in_process_browser_test.h"
14 #include "chrome/test/ui_test_utils.h" 14 #include "chrome/test/ui_test_utils.h"
15 #include "net/url_request/url_request_about_job.h" 15 #include "net/url_request/url_request_about_job.h"
16 #include "net/url_request/url_request_filter.h" 16 #include "net/url_request/url_request_filter.h"
17 #include "net/test/test_server.h"
17 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
19 20
20 namespace chromeos { 21 namespace chromeos {
21 22
22 class AccountScreenTest : public WizardInProcessBrowserTest { 23 class AccountScreenTest : public WizardInProcessBrowserTest {
23 public: 24 public:
24 AccountScreenTest(): WizardInProcessBrowserTest("account") { 25 AccountScreenTest(): WizardInProcessBrowserTest("account") {
25 } 26 }
26 27
27 protected: 28 protected:
28 // Overridden from WizardInProcessBrowserTest: 29 // Overridden from WizardInProcessBrowserTest:
29 virtual void SetUpWizard() { 30 virtual void SetUpWizard() {
30 HTTPTestServer* server = StartHTTPServer(); 31 net::HTTPTestServer* server = StartHTTPServer();
31 ASSERT_TRUE(server != NULL); 32 ASSERT_TRUE(server != NULL);
32 GURL new_account_page_url(server->TestServerPage("files/new_account.html")); 33 GURL new_account_page_url(server->TestServerPage("files/new_account.html"));
33 AccountScreen::set_new_account_page_url(new_account_page_url); 34 AccountScreen::set_new_account_page_url(new_account_page_url);
34 AccountScreen::set_check_for_https(false); 35 AccountScreen::set_check_for_https(false);
35 } 36 }
36 37
37 private: 38 private:
38 DISALLOW_COPY_AND_ASSIGN(AccountScreenTest); 39 DISALLOW_COPY_AND_ASSIGN(AccountScreenTest);
39 }; 40 };
40 41
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 chrome::kCrosScheme); 75 chrome::kCrosScheme);
75 URLRequestFilter::GetInstance()->AddHostnameHandler(chrome::kCrosScheme, 76 URLRequestFilter::GetInstance()->AddHostnameHandler(chrome::kCrosScheme,
76 "inspector", 77 "inspector",
77 &InspectorHook); 78 &InspectorHook);
78 EXPECT_FALSE(inspector_called); 79 EXPECT_FALSE(inspector_called);
79 ui_test_utils::RunMessageLoop(); 80 ui_test_utils::RunMessageLoop();
80 EXPECT_TRUE(inspector_called); 81 EXPECT_TRUE(inspector_called);
81 } 82 }
82 83
83 } // namespace chromeos 84 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_plugin_unittest.cc ('k') | chrome/browser/chromeos/notifications/notification_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698