| OLD | NEW |
| 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "net/url_request/url_request_interceptor.h" | 64 #include "net/url_request/url_request_interceptor.h" |
| 65 #include "net/url_request/url_request_job.h" | 65 #include "net/url_request/url_request_job.h" |
| 66 #include "net/url_request/url_request_test_job.h" | 66 #include "net/url_request/url_request_test_job.h" |
| 67 #include "net/url_request/url_request_test_util.h" | 67 #include "net/url_request/url_request_test_util.h" |
| 68 #include "ui/base/l10n/l10n_util.h" | 68 #include "ui/base/l10n/l10n_util.h" |
| 69 | 69 |
| 70 #if defined(OS_CHROMEOS) | 70 #if defined(OS_CHROMEOS) |
| 71 #include "chrome/browser/browser_process.h" | 71 #include "chrome/browser/browser_process.h" |
| 72 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 72 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 73 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 73 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 74 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" | 74 #include "chrome/browser/chromeos/settings/stub_install_attributes.h" |
| 75 #include "components/policy/core/common/policy_types.h" | 75 #include "components/policy/core/common/policy_types.h" |
| 76 #else | 76 #else |
| 77 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 77 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
| 78 #endif | 78 #endif |
| 79 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 79 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
| 80 | 80 |
| 81 using content::BrowserThread; | 81 using content::BrowserThread; |
| 82 using content::NavigationController; | 82 using content::NavigationController; |
| 83 using net::URLRequestFailedJob; | 83 using net::URLRequestFailedJob; |
| 84 using net::URLRequestTestJob; | 84 using net::URLRequestTestJob; |
| (...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 EXPECT_FALSE(IsDisplayingText(browser(), GetShowSavedButtonLabel())); | 1292 EXPECT_FALSE(IsDisplayingText(browser(), GetShowSavedButtonLabel())); |
| 1293 } | 1293 } |
| 1294 | 1294 |
| 1295 class ErrorPageOfflineTest : public ErrorPageTest { | 1295 class ErrorPageOfflineTest : public ErrorPageTest { |
| 1296 protected: | 1296 protected: |
| 1297 | 1297 |
| 1298 void SetUpInProcessBrowserTestFixture() override { | 1298 void SetUpInProcessBrowserTestFixture() override { |
| 1299 #if defined(OS_CHROMEOS) | 1299 #if defined(OS_CHROMEOS) |
| 1300 if (enroll_) { | 1300 if (enroll_) { |
| 1301 // Set up fake install attributes. | 1301 // Set up fake install attributes. |
| 1302 std::unique_ptr<policy::StubEnterpriseInstallAttributes> attributes( | 1302 std::unique_ptr<chromeos::StubInstallAttributes> attributes = |
| 1303 new policy::StubEnterpriseInstallAttributes()); | 1303 base::MakeUnique<chromeos::StubInstallAttributes>(); |
| 1304 attributes->SetDomain("example.com"); | 1304 attributes->SetDomain("example.com"); |
| 1305 attributes->SetRegistrationUser("user@example.com"); | 1305 attributes->SetRegistrationUser("user@example.com"); |
| 1306 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( | 1306 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( |
| 1307 attributes.release()); | 1307 attributes.release()); |
| 1308 } | 1308 } |
| 1309 #endif | 1309 #endif |
| 1310 | 1310 |
| 1311 // Sets up a mock policy provider for user and device policies. | 1311 // Sets up a mock policy provider for user and device policies. |
| 1312 EXPECT_CALL(policy_provider_, IsInitializationComplete(testing::_)) | 1312 EXPECT_CALL(policy_provider_, IsInitializationComplete(testing::_)) |
| 1313 .WillRepeatedly(testing::Return(true)); | 1313 .WillRepeatedly(testing::Return(true)); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 Http09WeirdPortEnabled) { | 1533 Http09WeirdPortEnabled) { |
| 1534 const char kHttp09Response[] = "JumboShrimp"; | 1534 const char kHttp09Response[] = "JumboShrimp"; |
| 1535 ASSERT_TRUE(embedded_test_server()->Start()); | 1535 ASSERT_TRUE(embedded_test_server()->Start()); |
| 1536 ui_test_utils::NavigateToURL( | 1536 ui_test_utils::NavigateToURL( |
| 1537 browser(), embedded_test_server()->GetURL(std::string("/echo-raw?") + | 1537 browser(), embedded_test_server()->GetURL(std::string("/echo-raw?") + |
| 1538 kHttp09Response)); | 1538 kHttp09Response)); |
| 1539 EXPECT_TRUE(IsDisplayingText(browser(), kHttp09Response)); | 1539 EXPECT_TRUE(IsDisplayingText(browser(), kHttp09Response)); |
| 1540 } | 1540 } |
| 1541 | 1541 |
| 1542 } // namespace | 1542 } // namespace |
| OLD | NEW |