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

Side by Side Diff: chrome/test/gpu/gpu_pixel_browsertest.cc

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | « chrome/test/gpu/gpu_feature_browsertest.cc ('k') | chrome/test/gpu/webgl_conformance_tests.cc » ('j') | 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 "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
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
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 }
OLDNEW
« no previous file with comments | « chrome/test/gpu/gpu_feature_browsertest.cc ('k') | chrome/test/gpu/webgl_conformance_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698