| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 EXPECT_TRUE(new_browser->is_app()); | 765 EXPECT_TRUE(new_browser->is_app()); |
| 766 | 766 |
| 767 // The browser's app name should include the extension's id. | 767 // The browser's app name should include the extension's id. |
| 768 std::string app_name = new_browser->app_name_; | 768 std::string app_name = new_browser->app_name_; |
| 769 EXPECT_NE(app_name.find(extension_app->id()), std::string::npos) | 769 EXPECT_NE(app_name.find(extension_app->id()), std::string::npos) |
| 770 << "Name " << app_name << " should contain id "<< extension_app->id(); | 770 << "Name " << app_name << " should contain id "<< extension_app->id(); |
| 771 } | 771 } |
| 772 #endif // !defined(OS_MACOSX) | 772 #endif // !defined(OS_MACOSX) |
| 773 | 773 |
| 774 // Makes sure the browser doesn't crash when | 774 // Makes sure the browser doesn't crash when |
| 775 // set_maximized_state(MAXIMIZED_STATE_MAXIMIZED) has been invoked. | 775 // set_show_state(ui::SHOW_STATE_MAXIMIZED) has been invoked. |
| 776 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) { | 776 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) { |
| 777 // Can't test TYPE_PANEL as they are currently created differently (and can't | 777 // Can't test TYPE_PANEL as they are currently created differently (and can't |
| 778 // end up maximized). | 778 // end up maximized). |
| 779 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; | 779 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; |
| 780 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { | 780 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { |
| 781 Browser* max_browser = new Browser(types[i], browser()->profile()); | 781 Browser* max_browser = new Browser(types[i], browser()->profile()); |
| 782 max_browser->set_maximized_state(Browser::MAXIMIZED_STATE_MAXIMIZED); | 782 max_browser->set_show_state(ui::SHOW_STATE_MAXIMIZED); |
| 783 max_browser->InitBrowserWindow(); | 783 max_browser->InitBrowserWindow(); |
| 784 AddBlankTabAndShow(max_browser); | 784 AddBlankTabAndShow(max_browser); |
| 785 } | 785 } |
| 786 } | 786 } |
| 787 | 787 |
| 788 // TODO(ben): this test was never enabled. It has bit-rotted since being added. | 788 // TODO(ben): this test was never enabled. It has bit-rotted since being added. |
| 789 // It originally lived in browser_unittest.cc, but has been moved here to make | 789 // It originally lived in browser_unittest.cc, but has been moved here to make |
| 790 // room for real browser unit tests. | 790 // room for real browser unit tests. |
| 791 #if 0 | 791 #if 0 |
| 792 class BrowserTest2 : public InProcessBrowserTest { | 792 class BrowserTest2 : public InProcessBrowserTest { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 | 862 |
| 863 // The normal browser should now have four. | 863 // The normal browser should now have four. |
| 864 EXPECT_EQ(4, browser()->tab_count()); | 864 EXPECT_EQ(4, browser()->tab_count()); |
| 865 | 865 |
| 866 // Close the additional browsers. | 866 // Close the additional browsers. |
| 867 popup_browser->CloseAllTabs(); | 867 popup_browser->CloseAllTabs(); |
| 868 app_browser->CloseAllTabs(); | 868 app_browser->CloseAllTabs(); |
| 869 app_popup_browser->CloseAllTabs(); | 869 app_popup_browser->CloseAllTabs(); |
| 870 } | 870 } |
| 871 #endif | 871 #endif |
| OLD | NEW |