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

Side by Side Diff: components/test_runner/web_test_proxy.cc

Issue 1571833002: Add popup layout tests with device scale factor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « components/test_runner/web_test_delegate.h ('k') | content/public/renderer/render_view.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/test_runner/web_test_proxy.h" 5 #include "components/test_runner/web_test_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cctype> 10 #include <cctype>
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 base::Unretained(this), callback)); 666 base::Unretained(this), callback));
667 return; 667 return;
668 } 668 }
669 669
670 CaptureCallback* capture_callback = new CaptureCallback(base::Bind( 670 CaptureCallback* capture_callback = new CaptureCallback(base::Bind(
671 &WebTestProxyBase::DidCapturePixelsAsync, base::Unretained(this), 671 &WebTestProxyBase::DidCapturePixelsAsync, base::Unretained(this),
672 callback)); 672 callback));
673 web_widget_->compositeAndReadbackAsync(capture_callback); 673 web_widget_->compositeAndReadbackAsync(capture_callback);
674 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) { 674 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) {
675 capture_callback->set_wait_for_popup(true); 675 capture_callback->set_wait_for_popup(true);
676 capture_callback->set_popup_position(popup->positionRelativeToOwner()); 676 capture_callback->set_popup_position(
677 delegate_->ConvertDIPToNative(popup->positionRelativeToOwner()));
677 popup->compositeAndReadbackAsync(capture_callback); 678 popup->compositeAndReadbackAsync(capture_callback);
678 } 679 }
679 } 680 }
680 681
681 void WebTestProxyBase::DidCapturePixelsAsync( 682 void WebTestProxyBase::DidCapturePixelsAsync(
682 const base::Callback<void(const SkBitmap&)>& callback, 683 const base::Callback<void(const SkBitmap&)>& callback,
683 const SkBitmap& bitmap) { 684 const SkBitmap& bitmap) {
684 SkCanvas canvas(bitmap); 685 SkCanvas canvas(bitmap);
685 DrawSelectionRect(&canvas); 686 DrawSelectionRect(&canvas);
686 if (!callback.is_null()) 687 if (!callback.is_null())
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 callback->onError(blink::WebSetSinkIdError::NotAuthorized); 1425 callback->onError(blink::WebSetSinkIdError::NotAuthorized);
1425 else 1426 else
1426 callback->onError(blink::WebSetSinkIdError::NotFound); 1427 callback->onError(blink::WebSetSinkIdError::NotFound);
1427 } 1428 }
1428 1429
1429 blink::WebString WebTestProxyBase::acceptLanguages() { 1430 blink::WebString WebTestProxyBase::acceptLanguages() {
1430 return blink::WebString::fromUTF8(accept_languages_); 1431 return blink::WebString::fromUTF8(accept_languages_);
1431 } 1432 }
1432 1433
1433 } // namespace test_runner 1434 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/web_test_delegate.h ('k') | content/public/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698