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

Side by Side Diff: views/controls/table/table_view_unittest.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <atlbase.h> // NOLINT 8 #include <atlbase.h> // NOLINT
9 #include <atlwin.h> // NOLINT 9 #include <atlwin.h> // NOLINT
10 #endif 10 #endif
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 columns[0].id = 0; 189 columns[0].id = 0;
190 columns[1].id = 1; 190 columns[1].id = 1;
191 table_ = new TableView(model_.get(), columns, views::ICON_AND_TEXT, 191 table_ = new TableView(model_.get(), columns, views::ICON_AND_TEXT,
192 false, false, false); 192 false, false, false);
193 window_ = 193 window_ =
194 views::Window::CreateChromeWindow(NULL, gfx::Rect(100, 100, 512, 512), 194 views::Window::CreateChromeWindow(NULL, gfx::Rect(100, 100, 512, 512),
195 this); 195 this);
196 } 196 }
197 197
198 void TableViewTest::TearDown() { 198 void TableViewTest::TearDown() {
199 window_->CloseWindow(); 199 window_->Close();
200 // Temporary workaround to avoid leak of RootView::pending_paint_task_. 200 // Temporary workaround to avoid leak of RootView::pending_paint_task_.
201 message_loop_.RunAllPending(); 201 message_loop_.RunAllPending();
202 OleUninitialize(); 202 OleUninitialize();
203 } 203 }
204 204
205 void TableViewTest::VerifyViewOrder(int first, ...) { 205 void TableViewTest::VerifyViewOrder(int first, ...) {
206 va_list marker; 206 va_list marker;
207 va_start(marker, first); 207 va_start(marker, first);
208 int value = first; 208 int value = first;
209 int index = 0; 209 int index = 0;
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 columns[1].id = 1; 511 columns[1].id = 1;
512 table_ = new views::TableView2(model_.get(), columns, GetTableType(), 512 table_ = new views::TableView2(model_.get(), columns, GetTableType(),
513 views::TableView2::NONE); 513 views::TableView2::NONE);
514 window_ = views::Window::CreateChromeWindow(NULL, 514 window_ = views::Window::CreateChromeWindow(NULL,
515 gfx::Rect(100, 100, 512, 512), 515 gfx::Rect(100, 100, 512, 512),
516 this); 516 this);
517 window_->Show(); 517 window_->Show();
518 } 518 }
519 519
520 void TableView2Test::TearDown() { 520 void TableView2Test::TearDown() {
521 window_->CloseWindow(); 521 window_->Close();
522 // Temporary workaround to avoid leak of RootView::pending_paint_task_. 522 // Temporary workaround to avoid leak of RootView::pending_paint_task_.
523 message_loop_.RunAllPending(); 523 message_loop_.RunAllPending();
524 #if defined(OS_WIN) 524 #if defined(OS_WIN)
525 OleUninitialize(); 525 OleUninitialize();
526 #endif 526 #endif
527 } 527 }
528 528
529 TestTableModel* TableView2Test::CreateModel() { 529 TestTableModel* TableView2Test::CreateModel() {
530 return new TestTableModel(); 530 return new TestTableModel();
531 } 531 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 table_->FocusRow(2); 632 table_->FocusRow(2);
633 EXPECT_EQ(2, table_->GetFirstFocusedRow()); 633 EXPECT_EQ(2, table_->GetFirstFocusedRow());
634 634
635 table_->ClearRowFocus(); 635 table_->ClearRowFocus();
636 EXPECT_EQ(-1, table_->GetFirstSelectedRow()); 636 EXPECT_EQ(-1, table_->GetFirstSelectedRow());
637 } 637 }
638 #endif 638 #endif
639 639
640 } // namespace views 640 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane_unittest.cc ('k') | views/controls/textfield/native_textfield_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698