OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 fake_url_fetcher_creator_.callback()) { | 343 fake_url_fetcher_creator_.callback()) { |
344 } | 344 } |
345 virtual ~LocalDiscoveryUITest() { | 345 virtual ~LocalDiscoveryUITest() { |
346 } | 346 } |
347 | 347 |
348 virtual void SetUpOnMainThread() OVERRIDE { | 348 virtual void SetUpOnMainThread() OVERRIDE { |
349 WebUIBrowserTest::SetUpOnMainThread(); | 349 WebUIBrowserTest::SetUpOnMainThread(); |
350 | 350 |
351 test_service_discovery_client_ = new TestServiceDiscoveryClient(); | 351 test_service_discovery_client_ = new TestServiceDiscoveryClient(); |
352 test_service_discovery_client_->Start(); | 352 test_service_discovery_client_->Start(); |
353 EXPECT_CALL(*test_service_discovery_client_, OnSendTo( | 353 EXPECT_CALL( |
354 std::string((const char*)kQueryData, | 354 *test_service_discovery_client_.get(), |
355 sizeof(kQueryData)))) | 355 OnSendTo(std::string((const char*)kQueryData, sizeof(kQueryData)))) |
356 .Times(AtLeast(2)) | 356 .Times(AtLeast(2)) |
357 .WillOnce(InvokeWithoutArgs(&condition_devices_listed_, | 357 .WillOnce(InvokeWithoutArgs(&condition_devices_listed_, |
358 &TestMessageLoopCondition::Signal)) | 358 &TestMessageLoopCondition::Signal)) |
359 .WillRepeatedly(Return()); | 359 .WillRepeatedly(Return()); |
360 | 360 |
361 SigninManagerBase* signin_manager = | 361 SigninManagerBase* signin_manager = |
362 SigninManagerFactory::GetForProfile(browser()->profile()); | 362 SigninManagerFactory::GetForProfile(browser()->profile()); |
363 | 363 |
364 #if defined(OS_CHROMEOS) | 364 #if defined(OS_CHROMEOS) |
365 // Chrome OS initializes prefs::kGoogleServicesUsername to "stub user" so | 365 // Chrome OS initializes prefs::kGoogleServicesUsername to "stub user" so |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 kAnnouncePacketRegistered, sizeof(kAnnouncePacketRegistered)); | 562 kAnnouncePacketRegistered, sizeof(kAnnouncePacketRegistered)); |
563 | 563 |
564 base::MessageLoop::current()->RunUntilIdle(); | 564 base::MessageLoop::current()->RunUntilIdle(); |
565 | 565 |
566 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("expectRegisterDone")); | 566 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("expectRegisterDone")); |
567 } | 567 } |
568 | 568 |
569 } // namespace | 569 } // namespace |
570 | 570 |
571 } // namespace local_discovery | 571 } // namespace local_discovery |
OLD | NEW |