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

Side by Side Diff: webkit/tools/test_shell/test_shell.cc

Issue 14110: Move the "platform" wrappers in skia/ext to the skia namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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 | « webkit/tools/test_shell/mac/webwidget_host.mm ('k') | webkit/tools/test_shell/webwidget_host.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "webkit/tools/test_shell/test_shell.h" 5 #include "webkit/tools/test_shell/test_shell.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug_on_start.h" 8 #include "base/debug_on_start.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 // All fatal log messages (e.g. DCHECK failures) imply unit test failures 164 // All fatal log messages (e.g. DCHECK failures) imply unit test failures
165 static void UnitTestAssertHandler(const std::string& str) { 165 static void UnitTestAssertHandler(const std::string& str) {
166 FAIL() << str; 166 FAIL() << str;
167 } 167 }
168 168
169 // static 169 // static
170 std::string TestShell::DumpImage(WebFrame* web_frame, 170 std::string TestShell::DumpImage(WebFrame* web_frame,
171 const std::wstring& file_name) { 171 const std::wstring& file_name) {
172 scoped_ptr<gfx::BitmapPlatformDevice> device; 172 scoped_ptr<skia::BitmapPlatformDevice> device;
173 if (!web_frame->CaptureImage(&device, true)) 173 if (!web_frame->CaptureImage(&device, true))
174 return std::string(); 174 return std::string();
175 175
176 const SkBitmap& src_bmp = device->accessBitmap(false); 176 const SkBitmap& src_bmp = device->accessBitmap(false);
177 177
178 // Encode image. 178 // Encode image.
179 std::vector<unsigned char> png; 179 std::vector<unsigned char> png;
180 SkAutoLockPixels src_bmp_lock(src_bmp); 180 SkAutoLockPixels src_bmp_lock(src_bmp);
181 PNGEncoder::ColorFormat color_format = 181 PNGEncoder::ColorFormat color_format =
182 #if defined(OS_WIN) || defined(OS_LINUX) 182 #if defined(OS_WIN) || defined(OS_LINUX)
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 568
569 uint64 VisitedLinkHash(const char* canonical_url, size_t length) { 569 uint64 VisitedLinkHash(const char* canonical_url, size_t length) {
570 return 0; 570 return 0;
571 } 571 }
572 572
573 bool IsLinkVisited(uint64 link_hash) { 573 bool IsLinkVisited(uint64 link_hash) {
574 return false; 574 return false;
575 } 575 }
576 576
577 } // namespace webkit_glue 577 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mac/webwidget_host.mm ('k') | webkit/tools/test_shell/webwidget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698