diff options
author | zhaoqin@google.com <zhaoqin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 18:39:35 +0000 |
---|---|---|
committer | zhaoqin@google.com <zhaoqin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 18:39:35 +0000 |
commit | e213c757f9c1b4e2ad27b0580eb76ed5bb18363c (patch) | |
tree | 0943b95184b8deeae86350ebd7e3eedef057bd90 /content | |
parent | 516dce21e267a98a9994c1a7e5085d506c846b39 (diff) | |
download | chromium_src-e213c757f9c1b4e2ad27b0580eb76ed5bb18363c.zip chromium_src-e213c757f9c1b4e2ad27b0580eb76ed5bb18363c.tar.gz chromium_src-e213c757f9c1b4e2ad27b0580eb76ed5bb18363c.tar.bz2 |
fixed issue 368400 GDI USAGE ERROR from PluginTest.CreateInstanceInPaint
- restore default brush before EndPaint
R=jam@chromium.org, jcivelli@chromium.org
BUG=368400
TEST=manual
Review URL: https://codereview.chromium.org/262683002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/test/plugin/plugin_windowed_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content/test/plugin/plugin_windowed_test.cc b/content/test/plugin/plugin_windowed_test.cc index c0d6630..546ad21 100644 --- a/content/test/plugin/plugin_windowed_test.cc +++ b/content/test/plugin/plugin_windowed_test.cc @@ -130,10 +130,11 @@ LRESULT CALLBACK WindowedPluginTest::WindowProc( PAINTSTRUCT ps; HDC hdc = BeginPaint(window, &ps); HBRUSH brush = CreateSolidBrush(RGB(255, 0, 0)); - SelectObject(hdc, brush); + HGDIOBJ orig = SelectObject(hdc, brush); RECT r; GetClientRect(window, &r); Rectangle(hdc, 0, 0, r.right, r.bottom); + SelectObject(hdc, orig); // restore DeleteObject(brush); EndPaint(window, &ps); } |