| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model.h" | 8 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 9 #include "chrome/browser/download/download_shelf.h" | 9 #include "chrome/browser/download/download_shelf.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/sidebar/sidebar_manager.h" | 12 #include "chrome/browser/sidebar/sidebar_manager.h" |
| 13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/browser_window.h" | 14 #include "chrome/browser/ui/browser_window.h" |
| 15 #include "chrome/browser/ui/cocoa/view_id_util.h" | 15 #include "chrome/browser/ui/cocoa/view_id_util.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 19 #include "chrome/test/in_process_browser_test.h" | 19 #include "chrome/test/base/in_process_browser_test.h" |
| 20 #include "chrome/test/ui_test_utils.h" | 20 #include "chrome/test/base/ui_test_utils.h" |
| 21 | 21 |
| 22 // Basic sanity check of ViewID use on the mac. | 22 // Basic sanity check of ViewID use on the mac. |
| 23 class ViewIDTest : public InProcessBrowserTest { | 23 class ViewIDTest : public InProcessBrowserTest { |
| 24 public: | 24 public: |
| 25 ViewIDTest() : root_window_(nil) { | 25 ViewIDTest() : root_window_(nil) { |
| 26 CommandLine::ForCurrentProcess()->AppendSwitch( | 26 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 27 switches::kEnableExperimentalExtensionApis); | 27 switches::kEnableExperimentalExtensionApis); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void CheckViewID(ViewID view_id, bool should_have) { | 30 void CheckViewID(ViewID view_id, bool should_have) { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), true); | 113 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), true); |
| 114 // VIEW_ID_TAB_LAST should always be available. | 114 // VIEW_ID_TAB_LAST should always be available. |
| 115 CheckViewID(VIEW_ID_TAB_LAST, true); | 115 CheckViewID(VIEW_ID_TAB_LAST, true); |
| 116 } | 116 } |
| 117 | 117 |
| 118 // Open the 11th tab. | 118 // Open the 11th tab. |
| 119 browser()->OpenURL(GURL(chrome::kAboutBlankURL), GURL(), | 119 browser()->OpenURL(GURL(chrome::kAboutBlankURL), GURL(), |
| 120 NEW_BACKGROUND_TAB, PageTransition::TYPED); | 120 NEW_BACKGROUND_TAB, PageTransition::TYPED); |
| 121 CheckViewID(VIEW_ID_TAB_LAST, true); | 121 CheckViewID(VIEW_ID_TAB_LAST, true); |
| 122 } | 122 } |
| OLD | NEW |