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 "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 second_profile_ = g_browser_process->profile_manager()->GetProfile( | 393 second_profile_ = g_browser_process->profile_manager()->GetProfile( |
394 second_profile_data_dir_.path()); | 394 second_profile_data_dir_.path()); |
395 if (!second_profile_) return false; | 395 if (!second_profile_) return false; |
396 | 396 |
397 second_browser_ = new Browser(Browser::CreateParams( | 397 second_browser_ = new Browser(Browser::CreateParams( |
398 second_profile_, browser()->host_desktop_type())); | 398 second_profile_, browser()->host_desktop_type())); |
399 if (!second_browser_) return false; | 399 if (!second_browser_) return false; |
400 | 400 |
401 chrome::AddSelectedTabWithURL(second_browser_, | 401 chrome::AddSelectedTabWithURL(second_browser_, |
402 GURL(url::kAboutBlankURL), | 402 GURL(url::kAboutBlankURL), |
403 content::PAGE_TRANSITION_AUTO_TOPLEVEL); | 403 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); |
404 content::WaitForLoadStop( | 404 content::WaitForLoadStop( |
405 second_browser_->tab_strip_model()->GetActiveWebContents()); | 405 second_browser_->tab_strip_model()->GetActiveWebContents()); |
406 second_browser_->window()->Show(); | 406 second_browser_->window()->Show(); |
407 | 407 |
408 return true; | 408 return true; |
409 } | 409 } |
410 | 410 |
411 Browser* second_browser() { return second_browser_; } | 411 Browser* second_browser() { return second_browser_; } |
412 | 412 |
413 // Server information and control. | 413 // Server information and control. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 Browser* incognito_browser = CreateIncognitoBrowser(); | 608 Browser* incognito_browser = CreateIncognitoBrowser(); |
609 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser)); | 609 ASSERT_TRUE(ForceSdchDictionaryLoad(incognito_browser)); |
610 | 610 |
611 // Data fetches on main browser should not be SDCH encoded. | 611 // Data fetches on main browser should not be SDCH encoded. |
612 bool sdch_encoding_used = true; | 612 bool sdch_encoding_used = true; |
613 ASSERT_TRUE(GetData(&sdch_encoding_used)); | 613 ASSERT_TRUE(GetData(&sdch_encoding_used)); |
614 EXPECT_FALSE(sdch_encoding_used); | 614 EXPECT_FALSE(sdch_encoding_used); |
615 } | 615 } |
616 | 616 |
617 } // namespace | 617 } // namespace |
OLD | NEW |