OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // End-to-end SDCH tests. Uses the embedded test server to return SDCH | 5 // End-to-end SDCH tests. Uses the embedded test server to return SDCH |
6 // results | 6 // results |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <utility> | 10 #include <utility> |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 base::FilePath user_data_dir; | 434 base::FilePath user_data_dir; |
435 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); | 435 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
436 | 436 |
437 if (!second_profile_data_dir_.CreateUniqueTempDirUnderPath(user_data_dir)) | 437 if (!second_profile_data_dir_.CreateUniqueTempDirUnderPath(user_data_dir)) |
438 return false; | 438 return false; |
439 | 439 |
440 second_profile_ = g_browser_process->profile_manager()->GetProfile( | 440 second_profile_ = g_browser_process->profile_manager()->GetProfile( |
441 second_profile_data_dir_.GetPath()); | 441 second_profile_data_dir_.GetPath()); |
442 if (!second_profile_) return false; | 442 if (!second_profile_) return false; |
443 | 443 |
444 second_browser_ = new Browser(Browser::CreateParams(second_profile_)); | 444 second_browser_ = new Browser(Browser::CreateParams(second_profile_, true)); |
445 if (!second_browser_) return false; | 445 if (!second_browser_) return false; |
446 | 446 |
447 chrome::AddSelectedTabWithURL(second_browser_, | 447 chrome::AddSelectedTabWithURL(second_browser_, |
448 GURL(url::kAboutBlankURL), | 448 GURL(url::kAboutBlankURL), |
449 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); | 449 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); |
450 content::WaitForLoadStop( | 450 content::WaitForLoadStop( |
451 second_browser_->tab_strip_model()->GetActiveWebContents()); | 451 second_browser_->tab_strip_model()->GetActiveWebContents()); |
452 second_browser_->window()->Show(); | 452 second_browser_->window()->Show(); |
453 | 453 |
454 content::BrowserThread::PostTask( | 454 content::BrowserThread::PostTask( |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 ASSERT_TRUE(SetupIncognitoBrowser()); | 712 ASSERT_TRUE(SetupIncognitoBrowser()); |
713 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser())); | 713 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser())); |
714 | 714 |
715 // Data fetches on main browser should not be SDCH encoded. | 715 // Data fetches on main browser should not be SDCH encoded. |
716 bool sdch_encoding_used = true; | 716 bool sdch_encoding_used = true; |
717 ASSERT_TRUE(GetData(&sdch_encoding_used)); | 717 ASSERT_TRUE(GetData(&sdch_encoding_used)); |
718 EXPECT_FALSE(sdch_encoding_used); | 718 EXPECT_FALSE(sdch_encoding_used); |
719 } | 719 } |
720 | 720 |
721 } // namespace | 721 } // namespace |
OLD | NEW |