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

Side by Side Diff: content/test/layout_browsertest.cc

Issue 16285005: Don't track whether a resize ack is pending during layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 6 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 | « content/renderer/render_widget.cc ('k') | content/test/layouttest_support.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 "content/test/layout_browsertest.h" 5 #include "content/test/layout_browsertest.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/scoped_temp_dir.h" 12 #include "base/files/scoped_temp_dir.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/rand_util.h" 14 #include "base/rand_util.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/stringprintf.h" 17 #include "base/stringprintf.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "content/browser/web_contents/web_contents_impl.h" 19 #include "content/browser/web_contents/web_contents_impl.h"
20 #include "content/public/common/content_paths.h" 20 #include "content/public/common/content_paths.h"
21 #include "content/public/test/browser_test_utils.h" 21 #include "content/public/test/browser_test_utils.h"
22 #include "content/public/test/layouttest_support.h"
22 #include "content/shell/common/shell_switches.h" 23 #include "content/shell/common/shell_switches.h"
23 #include "content/shell/shell.h" 24 #include "content/shell/shell.h"
24 #include "content/shell/webkit_test_controller.h" 25 #include "content/shell/webkit_test_controller.h"
25 #include "content/test/content_browser_test_utils.h" 26 #include "content/test/content_browser_test_utils.h"
26 #include "content/test/layout_test_http_server.h" 27 #include "content/test/layout_test_http_server.h"
27 #include "net/base/net_util.h" 28 #include "net/base/net_util.h"
28 29
29 #if defined(OS_WIN) 30 #if defined(OS_WIN)
30 static const char kPlatformName[] = "chromium-win"; 31 static const char kPlatformName[] = "chromium-win";
31 #elif defined(OS_MACOSX) 32 #elif defined(OS_MACOSX)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 : test_parent_dir_(test_parent_dir), test_case_dir_(test_case_dir), 72 : test_parent_dir_(test_parent_dir), test_case_dir_(test_case_dir),
72 port_(port) { 73 port_(port) {
73 } 74 }
74 75
75 InProcessBrowserLayoutTest::~InProcessBrowserLayoutTest() { 76 InProcessBrowserLayoutTest::~InProcessBrowserLayoutTest() {
76 if (test_http_server_) 77 if (test_http_server_)
77 CHECK(test_http_server_->Stop()); 78 CHECK(test_http_server_->Stop());
78 } 79 }
79 80
80 void InProcessBrowserLayoutTest::SetUpInProcessBrowserTestFixture() { 81 void InProcessBrowserLayoutTest::SetUpInProcessBrowserTestFixture() {
82 EnableBrowserLayoutTestMode();
83
81 base::FilePath src_dir; 84 base::FilePath src_dir;
82 ASSERT_TRUE(PathService::Get(DIR_LAYOUT_TESTS, &src_dir)); 85 ASSERT_TRUE(PathService::Get(DIR_LAYOUT_TESTS, &src_dir));
83 base::FilePath absolute_parent_dir = src_dir.Append(test_parent_dir_); 86 base::FilePath absolute_parent_dir = src_dir.Append(test_parent_dir_);
84 ASSERT_TRUE(file_util::DirectoryExists(absolute_parent_dir)); 87 ASSERT_TRUE(file_util::DirectoryExists(absolute_parent_dir));
85 layout_test_dir_ = absolute_parent_dir.Append(test_case_dir_); 88 layout_test_dir_ = absolute_parent_dir.Append(test_case_dir_);
86 ASSERT_TRUE(file_util::DirectoryExists(layout_test_dir_)); 89 ASSERT_TRUE(file_util::DirectoryExists(layout_test_dir_));
87 90
88 // Gets the file path to rebased expected result directory for the current 91 // Gets the file path to rebased expected result directory for the current
89 // platform. 92 // platform.
90 // $LayoutTestRoot/platform/chromium_***/... 93 // $LayoutTestRoot/platform/chromium_***/...
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 expected.size())); 208 expected.size()));
206 EXPECT_NE(-1, file_util::WriteFile(actual_filename, 209 EXPECT_NE(-1, file_util::WriteFile(actual_filename,
207 actual.c_str(), 210 actual.c_str(),
208 actual.size())); 211 actual.size()));
209 return base::StringPrintf("Wrote %"PRFilePath" %"PRFilePath, 212 return base::StringPrintf("Wrote %"PRFilePath" %"PRFilePath,
210 expected_filename.value().c_str(), 213 expected_filename.value().c_str(),
211 actual_filename.value().c_str()); 214 actual_filename.value().c_str());
212 } 215 }
213 216
214 } // namespace content 217 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698