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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 // Create a second browser based on a second profile to work within | 429 // Create a second browser based on a second profile to work within |
430 // multi-profile. | 430 // multi-profile. |
431 bool SetupSecondBrowser() { | 431 bool SetupSecondBrowser() { |
432 base::FilePath user_data_dir; | 432 base::FilePath user_data_dir; |
433 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); | 433 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
434 | 434 |
435 if (!second_profile_data_dir_.CreateUniqueTempDirUnderPath(user_data_dir)) | 435 if (!second_profile_data_dir_.CreateUniqueTempDirUnderPath(user_data_dir)) |
436 return false; | 436 return false; |
437 | 437 |
438 second_profile_ = g_browser_process->profile_manager()->GetProfile( | 438 second_profile_ = g_browser_process->profile_manager()->GetProfile( |
439 second_profile_data_dir_.path()); | 439 second_profile_data_dir_.GetPath()); |
440 if (!second_profile_) return false; | 440 if (!second_profile_) return false; |
441 | 441 |
442 second_browser_ = new Browser(Browser::CreateParams(second_profile_)); | 442 second_browser_ = new Browser(Browser::CreateParams(second_profile_)); |
443 if (!second_browser_) return false; | 443 if (!second_browser_) return false; |
444 | 444 |
445 chrome::AddSelectedTabWithURL(second_browser_, | 445 chrome::AddSelectedTabWithURL(second_browser_, |
446 GURL(url::kAboutBlankURL), | 446 GURL(url::kAboutBlankURL), |
447 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); | 447 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); |
448 content::WaitForLoadStop( | 448 content::WaitForLoadStop( |
449 second_browser_->tab_strip_model()->GetActiveWebContents()); | 449 second_browser_->tab_strip_model()->GetActiveWebContents()); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 ASSERT_TRUE(SetupIncognitoBrowser()); | 710 ASSERT_TRUE(SetupIncognitoBrowser()); |
711 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser())); | 711 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser())); |
712 | 712 |
713 // Data fetches on main browser should not be SDCH encoded. | 713 // Data fetches on main browser should not be SDCH encoded. |
714 bool sdch_encoding_used = true; | 714 bool sdch_encoding_used = true; |
715 ASSERT_TRUE(GetData(&sdch_encoding_used)); | 715 ASSERT_TRUE(GetData(&sdch_encoding_used)); |
716 EXPECT_FALSE(sdch_encoding_used); | 716 EXPECT_FALSE(sdch_encoding_used); |
717 } | 717 } |
718 | 718 |
719 } // namespace | 719 } // namespace |
OLD | NEW |