summaryrefslogtreecommitdiffstats
path: root/extensions/test
diff options
context:
space:
mode:
authortsergeant <tsergeant@chromium.org>2016-01-20 22:50:55 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-21 06:51:48 +0000
commitb30b1aaf04cb1cae5c455461c8c5c418dd7c2aea (patch)
treef4c83081cb42e29ff0397cda21c6597654e7ea4b /extensions/test
parentc858541bed56840fbab83ed5476652a00c2f8e90 (diff)
downloadchromium_src-b30b1aaf04cb1cae5c455461c8c5c418dd7c2aea.zip
chromium_src-b30b1aaf04cb1cae5c455461c8c5c418dd7c2aea.tar.gz
chromium_src-b30b1aaf04cb1cae5c455461c8c5c418dd7c2aea.tar.bz2
Revert of Implement webview.captureVisibleRegion() (patchset #9 id:160001 of https://codereview.chromium.org/1582053002/ )
Reason for revert: The test WebViewAPITest.TestCaptureVisibleRegion is failing on several windows bots: https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/45040 https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/42690 https://build.chromium.org/p/chromium.win/builders/Vista%20Tests%20%281%29/builds/64394 Original issue's description: > Implement webview.captureVisibleRegion() > > This CL implements webview.captureVisibleRegion(), an extension/apps > API to allow WebView users to capture screenshots of the contents > displayed in a WebView. The surfaces contents capture has been plumbed > via RenderWidgetHostViewChildFrame so this implementation should not > require changes when WebView switches to using OOPIF. > > As part of the implementation, there are two notable refactors: > > 1) CaptureWebContentsFunction has been refactored into > WebContentsCaptureClient to remove the extensions::AsyncExtensionFunction > dependence so that this code can be used by both tabs.captureVisibleTab > and webview.captureVisibleRegion, and > > 2) common code from DelegatedFrameHost has ben moved to > content/browser/compositor/surface_utils.* in order to avoid duplication > as both DelegatedFrameHost and RenderWidgetHostViewChildFrame now > use the code. > > BUG=326755 > > Committed: https://crrev.com/5b8cdcc82fc9da7bab15fd3dbf65df843dc73589 > Cr-Commit-Position: refs/heads/master@{#370565} TBR=rockot@chromium.org,creis@chromium.org,kenrb@chromium.org,nick@chromium.org,fsamuel@chromium.org,wjmaclean@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=326755 Review URL: https://codereview.chromium.org/1614703003 Cr-Commit-Position: refs/heads/master@{#370641}
Diffstat (limited to 'extensions/test')
-rw-r--r--extensions/test/data/web_view/apitest/main.js25
1 files changed, 1 insertions, 24 deletions
diff --git a/extensions/test/data/web_view/apitest/main.js b/extensions/test/data/web_view/apitest/main.js
index b203025..983212c 100644
--- a/extensions/test/data/web_view/apitest/main.js
+++ b/extensions/test/data/web_view/apitest/main.js
@@ -1685,28 +1685,6 @@ function testWebRequestAPIGoogleProperty() {
document.body.appendChild(webview);
}
-// This is a basic test to verify that image data is returned by
-// captureVisibleRegion().
-function testCaptureVisibleRegion() {
- var webview = document.createElement('webview');
- webview.setAttribute('src', 'data:text/html,webview test');
-
- webview.addEventListener('loadstop', function(e) {
- webview.captureVisibleRegion({}, function(imgdata) {
- if (chrome.runtime.lastError) {
- console.log('webview.apitest.testCaptureVisibleRegion: ' +
- chrome.runtime.lastError.message);
- embedder.test.fail();
- } else {
- embedder.test.assertTrue(
- imgdata.indexOf('data:image/jpeg;base64') == 0);
- embedder.test.succeed();
- }
- });
- });
- document.body.appendChild(webview);
-}
-
// Tests end.
embedder.test.testList = {
@@ -1774,8 +1752,7 @@ embedder.test.testList = {
'testWebRequestAPI': testWebRequestAPI,
'testWebRequestAPIWithHeaders': testWebRequestAPIWithHeaders,
'testWebRequestAPIExistence': testWebRequestAPIExistence,
- 'testWebRequestAPIGoogleProperty': testWebRequestAPIGoogleProperty,
- 'testCaptureVisibleRegion' : testCaptureVisibleRegion
+ 'testWebRequestAPIGoogleProperty': testWebRequestAPIGoogleProperty
};
onload = function() {