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

Side by Side Diff: chrome/browser/chromeos/arc/arc_settings_service_browsertest.cc

Issue 2384333003: Fixed nullptr default network crash. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/arc/arc_settings_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 expected_wifi_proxy_config->SetString("mode", 341 expected_wifi_proxy_config->SetString("mode",
342 ProxyPrefs::kFixedServersProxyModeName); 342 ProxyPrefs::kFixedServersProxyModeName);
343 expected_wifi_proxy_config->SetString("host", "wifi/proxy"); 343 expected_wifi_proxy_config->SetString("host", "wifi/proxy");
344 expected_wifi_proxy_config->SetInteger("port", 8080); 344 expected_wifi_proxy_config->SetInteger("port", 8080);
345 345
346 EXPECT_EQ(CountProxyBroadcasts(fake_intent_helper_instance_->broadcasts(), 346 EXPECT_EQ(CountProxyBroadcasts(fake_intent_helper_instance_->broadcasts(),
347 expected_wifi_proxy_config.get()), 347 expected_wifi_proxy_config.get()),
348 1); 348 1);
349 } 349 }
350 350
351 IN_PROC_BROWSER_TEST_F(ArcSettingsServiceTest, NoNetworkConnectedTest) {
352 // Disconnect all networks.
353 fake_intent_helper_instance_->clear_broadcasts();
354 DisconnectNetworkService(kDefaultServicePath);
355 DisconnectNetworkService(kWifiServicePath);
356 RunUntilIdle();
357
358 EXPECT_EQ(
359 CountProxyBroadcasts(fake_intent_helper_instance_->broadcasts(), nullptr),
360 0);
361 }
362
351 } // namespace arc 363 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_settings_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698