| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "ash/aura/wm_window_aura.h" | 8 #include "ash/aura/wm_window_aura.h" |
| 9 #include "ash/common/accessibility_delegate.h" | 9 #include "ash/common/accessibility_delegate.h" |
| 10 #include "ash/common/accessibility_types.h" | 10 #include "ash/common/accessibility_types.h" |
| (...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1884 EXPECT_TRUE(GetWindowItemForWindow(grid_index, window1.get())->dimmed()); | 1884 EXPECT_TRUE(GetWindowItemForWindow(grid_index, window1.get())->dimmed()); |
| 1885 EXPECT_TRUE(GetWindowItemForWindow(grid_index, window2.get())->dimmed()); | 1885 EXPECT_TRUE(GetWindowItemForWindow(grid_index, window2.get())->dimmed()); |
| 1886 | 1886 |
| 1887 // All the items should match the empty string. The filter widget should also | 1887 // All the items should match the empty string. The filter widget should also |
| 1888 // disappear. | 1888 // disappear. |
| 1889 FilterItems(""); | 1889 FilterItems(""); |
| 1890 EXPECT_FALSE(showing_filter_widget()); | 1890 EXPECT_FALSE(showing_filter_widget()); |
| 1891 EXPECT_FALSE(GetWindowItemForWindow(grid_index, window0.get())->dimmed()); | 1891 EXPECT_FALSE(GetWindowItemForWindow(grid_index, window0.get())->dimmed()); |
| 1892 EXPECT_FALSE(GetWindowItemForWindow(grid_index, window1.get())->dimmed()); | 1892 EXPECT_FALSE(GetWindowItemForWindow(grid_index, window1.get())->dimmed()); |
| 1893 EXPECT_FALSE(GetWindowItemForWindow(grid_index, window2.get())->dimmed()); | 1893 EXPECT_FALSE(GetWindowItemForWindow(grid_index, window2.get())->dimmed()); |
| 1894 |
| 1895 FilterItems("Foo"); |
| 1896 |
| 1897 EXPECT_NE(1.0f, window0->layer()->GetTargetOpacity()); |
| 1898 EXPECT_NE(1.0f, window1->layer()->GetTargetOpacity()); |
| 1899 EXPECT_NE(1.0f, window2->layer()->GetTargetOpacity()); |
| 1900 |
| 1901 ToggleOverview(); |
| 1902 |
| 1903 EXPECT_EQ(1.0f, window0->layer()->GetTargetOpacity()); |
| 1904 EXPECT_EQ(1.0f, window1->layer()->GetTargetOpacity()); |
| 1905 EXPECT_EQ(1.0f, window2->layer()->GetTargetOpacity()); |
| 1894 } | 1906 } |
| 1895 | 1907 |
| 1896 // Tests selecting in the overview with dimmed and undimmed items. | 1908 // Tests selecting in the overview with dimmed and undimmed items. |
| 1897 TEST_F(WindowSelectorTest, TextFilteringSelection) { | 1909 TEST_F(WindowSelectorTest, TextFilteringSelection) { |
| 1898 gfx::Rect bounds(0, 0, 100, 100); | 1910 gfx::Rect bounds(0, 0, 100, 100); |
| 1899 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); | 1911 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); |
| 1900 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); | 1912 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| 1901 std::unique_ptr<aura::Window> window0(CreateWindow(bounds)); | 1913 std::unique_ptr<aura::Window> window0(CreateWindow(bounds)); |
| 1902 base::string16 window2_title = base::UTF8ToUTF16("Rock and roll"); | 1914 base::string16 window2_title = base::UTF8ToUTF16("Rock and roll"); |
| 1903 base::string16 window1_title = base::UTF8ToUTF16("Rock and"); | 1915 base::string16 window1_title = base::UTF8ToUTF16("Rock and"); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 2137 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
| 2126 ASSERT_TRUE(resizer.get()); | 2138 ASSERT_TRUE(resizer.get()); |
| 2127 gfx::Point location = resizer->GetInitialLocation(); | 2139 gfx::Point location = resizer->GetInitialLocation(); |
| 2128 location.Offset(20, 20); | 2140 location.Offset(20, 20); |
| 2129 resizer->Drag(location, 0); | 2141 resizer->Drag(location, 0); |
| 2130 ToggleOverview(); | 2142 ToggleOverview(); |
| 2131 resizer->RevertDrag(); | 2143 resizer->RevertDrag(); |
| 2132 } | 2144 } |
| 2133 | 2145 |
| 2134 } // namespace ash | 2146 } // namespace ash |
| OLD | NEW |