| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/page_info/page_info_popup_view.h" | 5 #include "chrome/browser/ui/views/page_info/page_info_popup_view.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" | 9 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" |
| 10 #include "chrome/browser/ui/views/page_info/chosen_object_row.h" | 10 #include "chrome/browser/ui/views/page_info/chosen_object_row.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 const int kLabelIndex = 1; | 250 const int kLabelIndex = 1; |
| 251 views::Label* label = | 251 views::Label* label = |
| 252 static_cast<views::Label*>(object_view->child_at(kLabelIndex)); | 252 static_cast<views::Label*>(object_view->child_at(kLabelIndex)); |
| 253 EXPECT_EQ(base::ASCIIToUTF16("Gizmo"), label->text()); | 253 EXPECT_EQ(base::ASCIIToUTF16("Gizmo"), label->text()); |
| 254 | 254 |
| 255 const int kButtonIndex = 2; | 255 const int kButtonIndex = 2; |
| 256 views::Button* button = | 256 views::Button* button = |
| 257 static_cast<views::Button*>(object_view->child_at(kButtonIndex)); | 257 static_cast<views::Button*>(object_view->child_at(kButtonIndex)); |
| 258 | 258 |
| 259 const ui::MouseEvent event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), | 259 const ui::MouseEvent event( |
| 260 ui::EventTimeForNow(), 0, 0); | 260 ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), ui::EventTimeForNow(), |
| 261 0, 0, ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
| 261 views::ButtonListener* button_listener = | 262 views::ButtonListener* button_listener = |
| 262 static_cast<views::ButtonListener*>(object_view); | 263 static_cast<views::ButtonListener*>(object_view); |
| 263 button_listener->ButtonPressed(button, event); | 264 button_listener->ButtonPressed(button, event); |
| 264 api_->SetPermissionInfo(list); | 265 api_->SetPermissionInfo(list); |
| 265 EXPECT_EQ(kExpectedChildren, api_->permissions_view()->child_count()); | 266 EXPECT_EQ(kExpectedChildren, api_->permissions_view()->child_count()); |
| 266 EXPECT_FALSE(store->HasDevicePermission(origin, origin, device)); | 267 EXPECT_FALSE(store->HasDevicePermission(origin, origin, device)); |
| 267 } | 268 } |
| OLD | NEW |