OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // For WinDDK ATL compatibility, these ATL headers must come first. | 5 // For WinDDK ATL compatibility, these ATL headers must come first. |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include <atlbase.h> // NOLINT | 9 #include <atlbase.h> // NOLINT |
10 #include <atlwin.h> // NOLINT | 10 #include <atlwin.h> // NOLINT |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 }; | 179 }; |
180 | 180 |
181 void TableViewTest::SetUp() { | 181 void TableViewTest::SetUp() { |
182 model_.reset(CreateModel()); | 182 model_.reset(CreateModel()); |
183 std::vector<ui::TableColumn> columns; | 183 std::vector<ui::TableColumn> columns; |
184 columns.resize(2); | 184 columns.resize(2); |
185 columns[0].id = 0; | 185 columns[0].id = 0; |
186 columns[1].id = 1; | 186 columns[1].id = 1; |
187 table_ = new TableView(model_.get(), columns, views::ICON_AND_TEXT, | 187 table_ = new TableView(model_.get(), columns, views::ICON_AND_TEXT, |
188 false, false, false); | 188 false, false, false); |
189 window_ = views::Widget::CreateWindowWithBounds( | 189 window_ = views::Widget::CreateWindowWithContextAndBounds( |
190 this, | 190 this, GetWidget()->GetNativeWindow(), gfx::Rect(100, 100, 512, 512)); |
191 gfx::Rect(100, 100, 512, 512)); | |
192 } | 191 } |
193 | 192 |
194 void TableViewTest::TearDown() { | 193 void TableViewTest::TearDown() { |
195 window_->Close(); | 194 window_->Close(); |
196 // Temporary workaround to avoid leak of RootView::pending_paint_task_. | 195 // Temporary workaround to avoid leak of RootView::pending_paint_task_. |
197 message_loop_.RunUntilIdle(); | 196 message_loop_.RunUntilIdle(); |
198 } | 197 } |
199 | 198 |
200 void TableViewTest::VerifyViewOrder(int first, ...) { | 199 void TableViewTest::VerifyViewOrder(int first, ...) { |
201 va_list marker; | 200 va_list marker; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 VerifySelectedRows(2, 0, -1); | 453 VerifySelectedRows(2, 0, -1); |
455 } | 454 } |
456 | 455 |
457 // Crashing: http://crbug.com/45015 | 456 // Crashing: http://crbug.com/45015 |
458 TEST_F(NullModelTableViewTest, DISABLED_NullModel) { | 457 TEST_F(NullModelTableViewTest, DISABLED_NullModel) { |
459 // There's nothing explicit to test. If there is a bug in TableView relating | 458 // There's nothing explicit to test. If there is a bug in TableView relating |
460 // to a NULL model we'll crash. | 459 // to a NULL model we'll crash. |
461 } | 460 } |
462 | 461 |
463 } // namespace views | 462 } // namespace views |
OLD | NEW |