OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 // Set <1 page scale so that the clip rect should be larger than | 2106 // Set <1 page scale so that the clip rect should be larger than |
2107 // the viewport size as passed into resize(). | 2107 // the viewport size as passed into resize(). |
2108 webViewHelper.webView()->setPageScaleFactor(0.5); | 2108 webViewHelper.webView()->setPageScaleFactor(0.5); |
2109 | 2109 |
2110 SkBitmap bitmap; | 2110 SkBitmap bitmap; |
2111 ASSERT_TRUE(bitmap.allocN32Pixels(200, 200)); | 2111 ASSERT_TRUE(bitmap.allocN32Pixels(200, 200)); |
2112 bitmap.eraseColor(0); | 2112 bitmap.eraseColor(0); |
2113 SkCanvas canvas(bitmap); | 2113 SkCanvas canvas(bitmap); |
2114 | 2114 |
2115 blink::GraphicsContext context(&canvas); | 2115 blink::GraphicsContext context(&canvas); |
2116 context.setTrackOpaqueRegion(true); | 2116 context.setRegionTrackingMode(GraphicsContext::RegionTrackingOpaque); |
2117 | 2117 |
2118 EXPECT_EQ_RECT(blink::IntRect(0, 0, 0, 0), context.opaqueRegion().asRect()); | 2118 EXPECT_EQ_RECT(blink::IntRect(0, 0, 0, 0), context.opaqueRegion().asRect()); |
2119 | 2119 |
2120 blink::FrameView* view = webViewHelper.webViewImpl()->mainFrameImpl()->frame
View(); | 2120 blink::FrameView* view = webViewHelper.webViewImpl()->mainFrameImpl()->frame
View(); |
2121 blink::IntRect paintRect(0, 0, 200, 200); | 2121 blink::IntRect paintRect(0, 0, 200, 200); |
2122 view->paint(&context, paintRect); | 2122 view->paint(&context, paintRect); |
2123 | 2123 |
2124 // FIXME: This test broke in release builds when changing the FixedLayoutTes
tWebViewClient | 2124 // FIXME: This test broke in release builds when changing the FixedLayoutTes
tWebViewClient |
2125 // to return a non-null layerTreeView, which is what all our shipping config
urations do, | 2125 // to return a non-null layerTreeView, which is what all our shipping config
urations do, |
2126 // so this is just exposing an existing bug. | 2126 // so this is just exposing an existing bug. |
(...skipping 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5922 | 5922 |
5923 client.reset(); | 5923 client.reset(); |
5924 // Try to load the request with cross origin access. Should succeed. | 5924 // Try to load the request with cross origin access. Should succeed. |
5925 options.crossOriginRequestPolicy = blink::AllowCrossOriginRequests; | 5925 options.crossOriginRequestPolicy = blink::AllowCrossOriginRequests; |
5926 blink::DocumentThreadableLoader::loadResourceSynchronously( | 5926 blink::DocumentThreadableLoader::loadResourceSynchronously( |
5927 *frame->document(), blink::ResourceRequest(resourceUrl), client, options
, resourceLoaderOptions); | 5927 *frame->document(), blink::ResourceRequest(resourceUrl), client, options
, resourceLoaderOptions); |
5928 EXPECT_FALSE(client.failed()); | 5928 EXPECT_FALSE(client.failed()); |
5929 } | 5929 } |
5930 | 5930 |
5931 } // namespace | 5931 } // namespace |
OLD | NEW |