OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.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/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 } else { | 1408 } else { |
1409 app_browser = *it; | 1409 app_browser = *it; |
1410 } | 1410 } |
1411 } | 1411 } |
1412 ASSERT_TRUE(dev_tools_browser); | 1412 ASSERT_TRUE(dev_tools_browser); |
1413 ASSERT_TRUE(app_browser); | 1413 ASSERT_TRUE(app_browser); |
1414 ASSERT_TRUE(app_browser != browser()); | 1414 ASSERT_TRUE(app_browser != browser()); |
1415 | 1415 |
1416 EXPECT_FALSE( | 1416 EXPECT_FALSE( |
1417 dev_tools_browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)); | 1417 dev_tools_browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)); |
1418 EXPECT_FALSE( | 1418 |
| 1419 // App windows can show location bars, for example when they navigate away |
| 1420 // from their starting origin. |
| 1421 EXPECT_TRUE( |
1419 app_browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)); | 1422 app_browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)); |
1420 | 1423 |
1421 DevToolsWindowTesting::CloseDevToolsWindowSync(devtools_window); | 1424 DevToolsWindowTesting::CloseDevToolsWindowSync(devtools_window); |
1422 } | 1425 } |
1423 | 1426 |
1424 // Tests that the CLD (Compact Language Detection) works properly. | 1427 // Tests that the CLD (Compact Language Detection) works properly. |
1425 IN_PROC_BROWSER_TEST_F(BrowserTest, PageLanguageDetection) { | 1428 IN_PROC_BROWSER_TEST_F(BrowserTest, PageLanguageDetection) { |
1426 scoped_ptr<test::CldDataHarness> cld_data_harness = | 1429 scoped_ptr<test::CldDataHarness> cld_data_harness = |
1427 test::CldDataHarnessFactory::Get()->CreateCldDataHarness(); | 1430 test::CldDataHarnessFactory::Get()->CreateCldDataHarness(); |
1428 ASSERT_NO_FATAL_FAILURE(cld_data_harness->Init()); | 1431 ASSERT_NO_FATAL_FAILURE(cld_data_harness->Init()); |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2758 // Don't proceed and wait for interstitial to detach. This doesn't | 2761 // Don't proceed and wait for interstitial to detach. This doesn't |
2759 // destroy |contents|. | 2762 // destroy |contents|. |
2760 interstitial->DontProceed(); | 2763 interstitial->DontProceed(); |
2761 content::WaitForInterstitialDetach(web_contents); | 2764 content::WaitForInterstitialDetach(web_contents); |
2762 // interstitial is deleted now. | 2765 // interstitial is deleted now. |
2763 | 2766 |
2764 EXPECT_TRUE(chrome::CanDuplicateTab(browser())); | 2767 EXPECT_TRUE(chrome::CanDuplicateTab(browser())); |
2765 EXPECT_TRUE(chrome::CanDuplicateTabAt(browser(), 0)); | 2768 EXPECT_TRUE(chrome::CanDuplicateTabAt(browser(), 0)); |
2766 EXPECT_TRUE(chrome::CanDuplicateTabAt(browser(), 1)); | 2769 EXPECT_TRUE(chrome::CanDuplicateTabAt(browser(), 1)); |
2767 } | 2770 } |
OLD | NEW |