| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } | 271 } |
| 272 | 272 |
| 273 } // namespace | 273 } // namespace |
| 274 | 274 |
| 275 class WidgetTestInteractive : public WidgetTest { | 275 class WidgetTestInteractive : public WidgetTest { |
| 276 public: | 276 public: |
| 277 WidgetTestInteractive() {} | 277 WidgetTestInteractive() {} |
| 278 ~WidgetTestInteractive() override {} | 278 ~WidgetTestInteractive() override {} |
| 279 | 279 |
| 280 void SetUp() override { | 280 void SetUp() override { |
| 281 // On mus these tests run as part of views::ViewTestSuite which already does | 281 // On mus these tests run as part of views::ViewsTestSuite which already |
| 282 // this initialization. | 282 // does this initialization. |
| 283 if (!IsMus()) { | 283 if (!IsMus()) { |
| 284 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 284 gfx::GLSurfaceTestSupport::InitializeOneOff(); |
| 285 ui::RegisterPathProvider(); | 285 ui::RegisterPathProvider(); |
| 286 base::FilePath ui_test_pak_path; | 286 base::FilePath ui_test_pak_path; |
| 287 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 287 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
| 288 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 288 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
| 289 } | 289 } |
| 290 WidgetTest::SetUp(); | 290 WidgetTest::SetUp(); |
| 291 } | 291 } |
| 292 | 292 |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 } // namespace | 1300 } // namespace |
| 1301 | 1301 |
| 1302 class WidgetCaptureTest : public ViewsTestBase { | 1302 class WidgetCaptureTest : public ViewsTestBase { |
| 1303 public: | 1303 public: |
| 1304 WidgetCaptureTest() { | 1304 WidgetCaptureTest() { |
| 1305 } | 1305 } |
| 1306 | 1306 |
| 1307 ~WidgetCaptureTest() override {} | 1307 ~WidgetCaptureTest() override {} |
| 1308 | 1308 |
| 1309 void SetUp() override { | 1309 void SetUp() override { |
| 1310 // On mus these tests run as part of views::ViewTestSuite which already does | 1310 // On mus these tests run as part of views::ViewsTestSuite which already |
| 1311 // this initialization. | 1311 // does this initialization. |
| 1312 if (!IsMus()) { | 1312 if (!IsMus()) { |
| 1313 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 1313 gfx::GLSurfaceTestSupport::InitializeOneOff(); |
| 1314 ui::RegisterPathProvider(); | 1314 ui::RegisterPathProvider(); |
| 1315 base::FilePath ui_test_pak_path; | 1315 base::FilePath ui_test_pak_path; |
| 1316 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 1316 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
| 1317 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 1317 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
| 1318 } | 1318 } |
| 1319 ViewsTestBase::SetUp(); | 1319 ViewsTestBase::SetUp(); |
| 1320 } | 1320 } |
| 1321 | 1321 |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1800 | 1800 |
| 1801 ui::KeyEvent key_event2(key_event); | 1801 ui::KeyEvent key_event2(key_event); |
| 1802 widget->OnKeyEvent(&key_event2); | 1802 widget->OnKeyEvent(&key_event2); |
| 1803 EXPECT_FALSE(key_event2.stopped_propagation()); | 1803 EXPECT_FALSE(key_event2.stopped_propagation()); |
| 1804 | 1804 |
| 1805 widget->CloseNow(); | 1805 widget->CloseNow(); |
| 1806 } | 1806 } |
| 1807 | 1807 |
| 1808 } // namespace test | 1808 } // namespace test |
| 1809 } // namespace views | 1809 } // namespace views |
| OLD | NEW |