| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_browsertest.h" | 7 #include "chrome/browser/extensions/extension_browsertest.h" |
| 8 #include "chrome/browser/themes/theme_properties.h" | 8 #include "chrome/browser/themes/theme_properties.h" |
| 9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 10 #include "ui/base/theme_provider.h" | 10 #include "ui/base/theme_provider.h" |
| 11 | 11 |
| 12 using BrowserNonClientFrameViewBrowserTest = ExtensionBrowserTest; | 12 using BrowserNonClientFrameViewBrowserTest = ExtensionBrowserTest; |
| 13 | 13 |
| 14 // Test is Flaky on Windows see crbug.com/600201. | 14 // Test is Flaky on Windows see crbug.com/600201. |
| 15 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
| 16 #define MAYBE_InactiveSeparatorColor FLAKY_InactiveSeparatorColor | 16 #define MAYBE_InactiveSeparatorColor DISABLED_InactiveSeparatorColor |
| 17 #else | 17 #else |
| 18 #define MAYBE_InactiveSeparatorColor InactiveSeparatorColor | 18 #define MAYBE_InactiveSeparatorColor InactiveSeparatorColor |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 // Tests that the color returned by | 21 // Tests that the color returned by |
| 22 // BrowserNonClientFrameView::GetToolbarTopSeparatorColor() tracks the window | 22 // BrowserNonClientFrameView::GetToolbarTopSeparatorColor() tracks the window |
| 23 // actiavtion state. | 23 // actiavtion state. |
| 24 IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest, | 24 IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest, |
| 25 MAYBE_InactiveSeparatorColor) { | 25 MAYBE_InactiveSeparatorColor) { |
| 26 // In the default theme, the active and inactive separator colors may be the | 26 // In the default theme, the active and inactive separator colors may be the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 45 EXPECT_EQ(theme_active_color, frame_active_color); | 45 EXPECT_EQ(theme_active_color, frame_active_color); |
| 46 | 46 |
| 47 // Check that the separator color is the inactive color when the window is | 47 // Check that the separator color is the inactive color when the window is |
| 48 // inactive. | 48 // inactive. |
| 49 browser_view->Deactivate(); | 49 browser_view->Deactivate(); |
| 50 EXPECT_FALSE(browser_view->IsActive()); | 50 EXPECT_FALSE(browser_view->IsActive()); |
| 51 const SkColor frame_inactive_color = | 51 const SkColor frame_inactive_color = |
| 52 frame_view->GetToolbarTopSeparatorColor(); | 52 frame_view->GetToolbarTopSeparatorColor(); |
| 53 EXPECT_EQ(theme_inactive_color, frame_inactive_color); | 53 EXPECT_EQ(theme_inactive_color, frame_inactive_color); |
| 54 } | 54 } |
| OLD | NEW |