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

Unified Diff: chrome/browser/printing/printing_layout_uitest.cc

Issue 149181: Move Emf class to the printing library. Also creates a platform agnostic Nat... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/printing/printed_page.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/printing_layout_uitest.cc
===================================================================
--- chrome/browser/printing/printing_layout_uitest.cc (revision 19913)
+++ chrome/browser/printing/printing_layout_uitest.cc (working copy)
@@ -11,13 +11,13 @@
#include "base/simple_thread.h"
#include "base/win_util.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/gfx/emf.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "chrome/browser/printing/printing_test.h"
#include "net/url_request/url_request_unittest.h"
+#include "printing/native_metafile.h"
namespace {
@@ -37,7 +37,7 @@
if (LowerCaseEqualsASCII(ext, "png")) {
LoadPng(data);
} else if (LowerCaseEqualsASCII(ext, "emf")) {
- LoadEmf(data);
+ LoadMetafile(data);
} else {
EXPECT_TRUE(false);
}
@@ -149,11 +149,11 @@
row_length_ = size_.width() * sizeof(uint32);
}
- void LoadEmf(const std::string& data) {
+ void LoadMetafile(const std::string& data) {
ASSERT_FALSE(data.empty());
- gfx::Emf emf;
- emf.CreateFromData(data.data(), data.size());
- gfx::Rect rect(emf.GetBounds());
+ printing::NativeMetafile metafile;
+ metafile.CreateFromData(data.data(), data.size());
+ gfx::Rect rect(metafile.GetBounds());
// Create a temporary HDC and bitmap to retrieve the renderered data.
HDC hdc = CreateCompatibleDC(NULL);
BITMAPV4HEADER hdr;
@@ -170,7 +170,7 @@
EXPECT_TRUE(bitmap);
EXPECT_TRUE(SelectObject(hdc, bitmap));
skia::PlatformDevice::InitializeDC(hdc);
- EXPECT_TRUE(emf.Playback(hdc, NULL));
+ EXPECT_TRUE(metafile.Playback(hdc, NULL));
row_length_ = size_.width() * sizeof(uint32);
size_t bytes = row_length_ * size_.height();
ASSERT_TRUE(bytes);
@@ -200,7 +200,7 @@
public:
PrintingLayoutTest() {
emf_path_ = browser_directory_.ToWStringHack();
- file_util::AppendToPath(&emf_path_, L"emf_dumps");
+ file_util::AppendToPath(&emf_path_, L"metafile_dumps");
launch_arguments_.AppendSwitchWithValue(L"debug-print",
L'"' + emf_path_ + L'"');
show_window_ = true;
« no previous file with comments | « chrome/browser/printing/printed_page.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698