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

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

Issue 1541713002: Revert of Support device scale factor test with popups in LayoutTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 <cctype> 7 #include <cctype>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 base::Unretained(this), callback)); 663 base::Unretained(this), callback));
664 return; 664 return;
665 } 665 }
666 666
667 CaptureCallback* capture_callback = new CaptureCallback(base::Bind( 667 CaptureCallback* capture_callback = new CaptureCallback(base::Bind(
668 &WebTestProxyBase::DidCapturePixelsAsync, base::Unretained(this), 668 &WebTestProxyBase::DidCapturePixelsAsync, base::Unretained(this),
669 callback)); 669 callback));
670 web_widget_->compositeAndReadbackAsync(capture_callback); 670 web_widget_->compositeAndReadbackAsync(capture_callback);
671 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) { 671 if (blink::WebPagePopup* popup = web_widget_->pagePopup()) {
672 capture_callback->set_wait_for_popup(true); 672 capture_callback->set_wait_for_popup(true);
673 capture_callback->set_popup_position( 673 capture_callback->set_popup_position(popup->positionRelativeToOwner());
674 delegate_->ConvertDIPToNative(popup->positionRelativeToOwner()));
675 popup->compositeAndReadbackAsync(capture_callback); 674 popup->compositeAndReadbackAsync(capture_callback);
676 } 675 }
677 } 676 }
678 677
679 void WebTestProxyBase::DidCapturePixelsAsync( 678 void WebTestProxyBase::DidCapturePixelsAsync(
680 const base::Callback<void(const SkBitmap&)>& callback, 679 const base::Callback<void(const SkBitmap&)>& callback,
681 const SkBitmap& bitmap) { 680 const SkBitmap& bitmap) {
682 SkCanvas canvas(bitmap); 681 SkCanvas canvas(bitmap);
683 DrawSelectionRect(&canvas); 682 DrawSelectionRect(&canvas);
684 if (!callback.is_null()) 683 if (!callback.is_null())
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 callback->onError(blink::WebSetSinkIdError::NotAuthorized); 1421 callback->onError(blink::WebSetSinkIdError::NotAuthorized);
1423 else 1422 else
1424 callback->onError(blink::WebSetSinkIdError::NotFound); 1423 callback->onError(blink::WebSetSinkIdError::NotFound);
1425 } 1424 }
1426 1425
1427 blink::WebString WebTestProxyBase::acceptLanguages() { 1426 blink::WebString WebTestProxyBase::acceptLanguages() {
1428 return blink::WebString::fromUTF8(accept_languages_); 1427 return blink::WebString::fromUTF8(accept_languages_);
1429 } 1428 }
1430 1429
1431 } // namespace test_runner 1430 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/web_test_delegate.h ('k') | content/shell/browser/blink_test_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698