Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(878)

Unified Diff: chrome/browser/cocoa/view_id_util_browsertest.mm

Issue 3228003: Sidebar view, implementation for Mac. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/view_id_util_browsertest.mm
===================================================================
--- chrome/browser/cocoa/view_id_util_browsertest.mm (revision 57723)
+++ chrome/browser/cocoa/view_id_util_browsertest.mm (working copy)
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -10,6 +11,8 @@
#include "chrome/browser/cocoa/view_id_util.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/sidebar/sidebar_manager.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/in_process_browser_test.h"
@@ -18,7 +21,10 @@
// Basic sanity check of ViewID use on the mac.
class ViewIDTest : public InProcessBrowserTest {
public:
- ViewIDTest() : root_window_(nil) {}
+ ViewIDTest() : root_window_(nil) {
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableExperimentalExtensionApis);
+ }
void CheckViewID(ViewID view_id, bool should_have) {
if (!root_window_)
@@ -34,6 +40,13 @@
// VIEW_ID_FIND_IN_PAGE_TEXT_FIELD and VIEW_ID_FIND_IN_PAGE.
browser()->ShowFindBar();
+ // Make sure sidebar is created to test VIEW_ID_SIDE_BAR_CONTAINER.
+ const char sidebar_content_id[] = "test_content_id";
+ SidebarManager::GetInstance()->ShowSidebar(
+ browser()->GetSelectedTabContents(), sidebar_content_id);
+ SidebarManager::GetInstance()->ExpandSidebar(
+ browser()->GetSelectedTabContents(), sidebar_content_id);
+
// Make sure docked devtools is created to test VIEW_ID_DEV_TOOLS_DOCKED
browser()->profile()->GetPrefs()->SetBoolean(prefs::kDevToolsOpenDocked,
true);
@@ -57,7 +70,6 @@
if (i == VIEW_ID_STAR_BUTTON ||
i == VIEW_ID_AUTOCOMPLETE ||
i == VIEW_ID_CONTENTS_SPLIT ||
- i == VIEW_ID_SIDE_BAR_CONTAINER ||
i == VIEW_ID_SIDE_BAR_SPLIT) {
continue;
}
@@ -78,7 +90,7 @@
ASSERT_NO_FATAL_FAILURE(DoTest());
}
-IN_PROC_BROWSER_TEST_F(ViewIDTest, FAILS_Fullscreen) {
+IN_PROC_BROWSER_TEST_F(ViewIDTest, Fullscreen) {
browser()->window()->SetFullscreen(true);
ASSERT_NO_FATAL_FAILURE(DoTest());
}
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698