| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/chromeos/status/data_promo_notification.h" | 5 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" | 10 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const char kCellularServicePath[] = "/service/cellular1"; | 29 const char kCellularServicePath[] = "/service/cellular1"; |
| 30 const char kNotificationId[] = "chrome://settings/internet/data_saver"; | 30 const char kNotificationId[] = "chrome://settings/internet/data_saver"; |
| 31 const char kTestUserName[] = "test-user@example.com"; | 31 const char kTestUserName[] = "test-user@example.com"; |
| 32 | 32 |
| 33 class NetworkConnectTestDelegate : public ui::NetworkConnect::Delegate { | 33 class NetworkConnectTestDelegate : public ui::NetworkConnect::Delegate { |
| 34 public: | 34 public: |
| 35 NetworkConnectTestDelegate() {} | 35 NetworkConnectTestDelegate() {} |
| 36 ~NetworkConnectTestDelegate() override {} | 36 ~NetworkConnectTestDelegate() override {} |
| 37 | 37 |
| 38 void ShowNetworkConfigure(const std::string& network_id) override {} | 38 void ShowNetworkConfigure(const std::string& network_id) override {} |
| 39 void ShowNetworkSettingsForGuid(const std::string& network_id) override {} | 39 void ShowNetworkSettings(const std::string& network_id) override {} |
| 40 bool ShowEnrollNetwork(const std::string& network_id) override { | 40 bool ShowEnrollNetwork(const std::string& network_id) override { |
| 41 return false; | 41 return false; |
| 42 } | 42 } |
| 43 void ShowMobileSimDialog() override {} | 43 void ShowMobileSimDialog() override {} |
| 44 void ShowMobileSetupDialog(const std::string& service_path) override {} | 44 void ShowMobileSetupDialog(const std::string& network_id) override {} |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 DISALLOW_COPY_AND_ASSIGN(NetworkConnectTestDelegate); | 47 DISALLOW_COPY_AND_ASSIGN(NetworkConnectTestDelegate); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace | 50 } // namespace |
| 51 | 51 |
| 52 namespace chromeos { | 52 namespace chromeos { |
| 53 namespace test { | 53 namespace test { |
| 54 | 54 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 ui::NetworkConnect::Get()->ConnectToNetwork(kCellularServicePath); | 156 ui::NetworkConnect::Get()->ConnectToNetwork(kCellularServicePath); |
| 157 base::RunLoop().RunUntilIdle(); | 157 base::RunLoop().RunUntilIdle(); |
| 158 // Connecting to cellular network (which here makes it the default network) | 158 // Connecting to cellular network (which here makes it the default network) |
| 159 // should trigger the Data Saver notification. | 159 // should trigger the Data Saver notification. |
| 160 EXPECT_TRUE(message_center->FindVisibleNotificationById(kNotificationId)); | 160 EXPECT_TRUE(message_center->FindVisibleNotificationById(kNotificationId)); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace test | 163 } // namespace test |
| 164 } // namespace chromeos | 164 } // namespace chromeos |
| OLD | NEW |