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

Side by Side Diff: ui/views/widget/widget_unittest.cc

Issue 375183002: Add app.window.alphaEnabled() and onAlphaEnabledChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 6 years, 5 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
« no previous file with comments | « ui/views/widget/widget.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 widget->IsMouseEventsEnabled(); 647 widget->IsMouseEventsEnabled();
648 widget->SetNativeWindowProperty("xx", widget); 648 widget->SetNativeWindowProperty("xx", widget);
649 widget->GetNativeWindowProperty("xx"); 649 widget->GetNativeWindowProperty("xx");
650 widget->GetFocusTraversable(); 650 widget->GetFocusTraversable();
651 widget->GetLayer(); 651 widget->GetLayer();
652 widget->ReorderNativeViews(); 652 widget->ReorderNativeViews();
653 widget->SetCapture(widget->GetRootView()); 653 widget->SetCapture(widget->GetRootView());
654 widget->ReleaseCapture(); 654 widget->ReleaseCapture();
655 widget->HasCapture(); 655 widget->HasCapture();
656 widget->GetWorkAreaBoundsInScreen(); 656 widget->GetWorkAreaBoundsInScreen();
657 widget->IsTranslucentWindowOpacitySupported();
657 } 658 }
658 659
659 private: 660 private:
660 DISALLOW_COPY_AND_ASSIGN(WidgetWithDestroyedNativeViewTest); 661 DISALLOW_COPY_AND_ASSIGN(WidgetWithDestroyedNativeViewTest);
661 }; 662 };
662 663
663 TEST_F(WidgetWithDestroyedNativeViewTest, Test) { 664 TEST_F(WidgetWithDestroyedNativeViewTest, Test) {
664 { 665 {
665 Widget widget; 666 Widget widget;
666 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); 667 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after
2591 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_PRESSED)); 2592 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_PRESSED));
2592 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_RELEASED)); 2593 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_RELEASED));
2593 EXPECT_EQ(1, view->GetEventCount(ui::ET_MOUSE_DRAGGED)); 2594 EXPECT_EQ(1, view->GetEventCount(ui::ET_MOUSE_DRAGGED));
2594 EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON, view->last_flags()); 2595 EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON, view->last_flags());
2595 2596
2596 widget->CloseNow(); 2597 widget->CloseNow();
2597 } 2598 }
2598 2599
2599 } // namespace test 2600 } // namespace test
2600 } // namespace views 2601 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698