| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 .Times(AnyNumber()); | 417 .Times(AnyNumber()); |
| 418 | 418 |
| 419 ProfileOAuth2TokenService* token_service = | 419 ProfileOAuth2TokenService* token_service = |
| 420 ProfileOAuth2TokenServiceFactory::GetForProfile(browser()->profile()); | 420 ProfileOAuth2TokenServiceFactory::GetForProfile(browser()->profile()); |
| 421 | 421 |
| 422 token_service->UpdateCredentials("user@host.com", "MyFakeToken"); | 422 token_service->UpdateCredentials("user@host.com", "MyFakeToken"); |
| 423 | 423 |
| 424 AddLibrary(base::FilePath(FILE_PATH_LITERAL("local_discovery_ui_test.js"))); | 424 AddLibrary(base::FilePath(FILE_PATH_LITERAL("local_discovery_ui_test.js"))); |
| 425 } | 425 } |
| 426 | 426 |
| 427 virtual void SetUpCommandLine(CommandLine* command_line) override { | 427 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
| 428 #if defined(OS_CHROMEOS) | 428 #if defined(OS_CHROMEOS) |
| 429 // On chromeos, don't sign in with the stub-user automatically. Use the | 429 // On chromeos, don't sign in with the stub-user automatically. Use the |
| 430 // kLoginUser instead. | 430 // kLoginUser instead. |
| 431 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, | 431 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, |
| 432 kSampleUser); | 432 kSampleUser); |
| 433 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, | 433 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, |
| 434 chrome::kTestUserProfileDir); | 434 chrome::kTestUserProfileDir); |
| 435 #endif | 435 #endif |
| 436 WebUIBrowserTest::SetUpCommandLine(command_line); | 436 WebUIBrowserTest::SetUpCommandLine(command_line); |
| 437 } | 437 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 kAnnouncePacketRegistered, sizeof(kAnnouncePacketRegistered)); | 566 kAnnouncePacketRegistered, sizeof(kAnnouncePacketRegistered)); |
| 567 | 567 |
| 568 base::MessageLoop::current()->RunUntilIdle(); | 568 base::MessageLoop::current()->RunUntilIdle(); |
| 569 | 569 |
| 570 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("expectRegisterDone")); | 570 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("expectRegisterDone")); |
| 571 } | 571 } |
| 572 | 572 |
| 573 } // namespace | 573 } // namespace |
| 574 | 574 |
| 575 } // namespace local_discovery | 575 } // namespace local_discovery |
| OLD | NEW |