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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/apps/app_browsertest_util.h" | 10 #include "chrome/browser/apps/app_browsertest_util.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 | 380 |
381 SetCustomLauncherPageEnabled(false); | 381 SetCustomLauncherPageEnabled(false); |
382 EXPECT_FALSE(model->custom_launcher_page_enabled()); | 382 EXPECT_FALSE(model->custom_launcher_page_enabled()); |
383 EXPECT_FALSE(custom_page_view->visible()); | 383 EXPECT_FALSE(custom_page_view->visible()); |
384 | 384 |
385 SetCustomLauncherPageEnabled(true); | 385 SetCustomLauncherPageEnabled(true); |
386 EXPECT_TRUE(model->custom_launcher_page_enabled()); | 386 EXPECT_TRUE(model->custom_launcher_page_enabled()); |
387 EXPECT_TRUE(custom_page_view->visible()); | 387 EXPECT_TRUE(custom_page_view->visible()); |
388 } | 388 } |
389 | 389 |
390 // Currently this fails on ChromeOS | 390 // Currently this is flaky. |
391 // Disabled test http://crbug.com/463456 | 391 // Disabled test http://crbug.com/463456 |
392 #if defined(OS_CHROMEOS) | |
393 #define MAYBE_LauncherPageFocusTraversal DISABLED_LauncherPageFocusTraversal | |
394 #else | |
395 #define MAYBE_LauncherPageFocusTraversal LauncherPageFocusTraversal | |
396 #endif | |
397 | |
398 IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, | 392 IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, |
399 MAYBE_LauncherPageFocusTraversal) { | 393 DISABLED_LauncherPageFocusTraversal) { |
400 LoadAndLaunchPlatformApp(kCustomLauncherPagePath, "Launched"); | 394 LoadAndLaunchPlatformApp(kCustomLauncherPagePath, "Launched"); |
401 app_list::AppListView* app_list_view = GetAppListView(); | 395 app_list::AppListView* app_list_view = GetAppListView(); |
402 app_list::ContentsView* contents_view = | 396 app_list::ContentsView* contents_view = |
403 app_list_view->app_list_main_view()->contents_view(); | 397 app_list_view->app_list_main_view()->contents_view(); |
404 app_list::SearchBoxView* search_box_view = | 398 app_list::SearchBoxView* search_box_view = |
405 app_list_view->app_list_main_view()->search_box_view(); | 399 app_list_view->app_list_main_view()->search_box_view(); |
406 | 400 |
407 ASSERT_TRUE( | 401 ASSERT_TRUE( |
408 contents_view->IsStateActive(app_list::AppListModel::STATE_START)); | 402 contents_view->IsStateActive(app_list::AppListModel::STATE_START)); |
409 EXPECT_EQ(app_list_view->GetFocusManager()->GetFocusedView(), | 403 EXPECT_EQ(app_list_view->GetFocusManager()->GetFocusedView(), |
(...skipping 17 matching lines...) Expand all Loading... |
427 search_box_view->search_box()); | 421 search_box_view->search_box()); |
428 } | 422 } |
429 { | 423 { |
430 ExtensionTestMessageListener listener("textfieldBlurred", false); | 424 ExtensionTestMessageListener listener("textfieldBlurred", false); |
431 app_list_view->GetFocusManager()->AdvanceFocus(false); | 425 app_list_view->GetFocusManager()->AdvanceFocus(false); |
432 listener.WaitUntilSatisfied(); | 426 listener.WaitUntilSatisfied(); |
433 EXPECT_EQ(app_list_view->GetFocusManager()->GetFocusedView(), | 427 EXPECT_EQ(app_list_view->GetFocusManager()->GetFocusedView(), |
434 search_box_view->search_box()); | 428 search_box_view->search_box()); |
435 } | 429 } |
436 } | 430 } |
OLD | NEW |