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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // TODO(kkania): Document how to add to/modify these tests. | 88 // TODO(kkania): Document how to add to/modify these tests. |
89 class GpuPixelBrowserTest : public InProcessBrowserTest { | 89 class GpuPixelBrowserTest : public InProcessBrowserTest { |
90 public: | 90 public: |
91 GpuPixelBrowserTest() | 91 GpuPixelBrowserTest() |
92 : ref_img_revision_(0), | 92 : ref_img_revision_(0), |
93 ref_img_revision_no_older_than_(0), | 93 ref_img_revision_no_older_than_(0), |
94 use_checked_in_ref_imgs_(false) { | 94 use_checked_in_ref_imgs_(false) { |
95 } | 95 } |
96 | 96 |
97 virtual void SetUpCommandLine(CommandLine* command_line) { | 97 virtual void SetUpCommandLine(CommandLine* command_line) { |
98 InProcessBrowserTest::SetUpCommandLine(command_line); | |
99 command_line->AppendSwitchASCII(switches::kTestGLLib, | 98 command_line->AppendSwitchASCII(switches::kTestGLLib, |
100 "libllvmpipe.so"); | 99 "libllvmpipe.so"); |
101 | |
102 // This enables DOM automation for tab contents. | |
103 EnableDOMAutomation(); | |
104 } | 100 } |
105 | 101 |
106 virtual void SetUpInProcessBrowserTestFixture() { | 102 virtual void SetUpInProcessBrowserTestFixture() { |
107 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 103 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
108 | 104 |
109 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); | 105 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); |
110 test_data_dir_ = test_data_dir_.AppendASCII("gpu"); | 106 test_data_dir_ = test_data_dir_.AppendASCII("gpu"); |
111 | 107 |
112 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 108 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
113 if (command_line->HasSwitch(kGeneratedDir)) | 109 if (command_line->HasSwitch(kGeneratedDir)) |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 IN_PROC_BROWSER_TEST_F(Canvas2DPixelTestSD, Canvas2DRedBoxSD) { | 506 IN_PROC_BROWSER_TEST_F(Canvas2DPixelTestSD, Canvas2DRedBoxSD) { |
511 // If test baseline needs to be updated after a given revision, update the | 507 // If test baseline needs to be updated after a given revision, update the |
512 // following number. If no revision requirement, then 0. | 508 // following number. If no revision requirement, then 0. |
513 const int64 ref_img_revision_update = 123489; | 509 const int64 ref_img_revision_update = 123489; |
514 | 510 |
515 gfx::Size container_size(400, 300); | 511 gfx::Size container_size(400, 300); |
516 FilePath url = | 512 FilePath url = |
517 test_data_dir().AppendASCII("pixel_canvas2d.html"); | 513 test_data_dir().AppendASCII("pixel_canvas2d.html"); |
518 RunPixelTest(container_size, url, ref_img_revision_update); | 514 RunPixelTest(container_size, url, ref_img_revision_update); |
519 } | 515 } |
OLD | NEW |