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

Side by Side Diff: ppapi/tests/test_graphics_2d.cc

Issue 2501723003: Disable scrollbars on the root scroller when using visual viewport scrollbars. (Closed)
Patch Set: Fix (?) Graphics2D test Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/frame/FrameView.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/tests/test_graphics_2d.h" 5 #include "ppapi/tests/test_graphics_2d.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 // Squeeze from top until bottom half of plugin is out of screen. 678 // Squeeze from top until bottom half of plugin is out of screen.
679 ResetViewChangedState(); 679 ResetViewChangedState();
680 instance_->EvalScript( 680 instance_->EvalScript(
681 "var big = document.createElement('div');" 681 "var big = document.createElement('div');"
682 "var offset = " 682 "var offset = "
683 " window.innerHeight - plugin.offsetTop - plugin.offsetHeight / 2;" 683 " window.innerHeight - plugin.offsetTop - plugin.offsetHeight / 2;"
684 "big.setAttribute('id', 'big-div');" 684 "big.setAttribute('id', 'big-div');"
685 "big.setAttribute('style', 'height: ' + offset + '; width: 100%;');" 685 "big.setAttribute('style', 'height: ' + offset + '; width: 100%;');"
686 "document.body.insertBefore(big, document.body.firstChild);"); 686 "document.body.insertBefore(big, document.body.firstChild);");
687 ASSERT_TRUE(WaitUntilViewChanged()); 687 ASSERT_TRUE(WaitUntilViewChanged());
688 ASSERT_SUBTEST_SUCCESS(FlushAndWaitForDone(&dc));
688 689
689 // Allocate a red image chunk 690 // Allocate a red image chunk
690 pp::ImageData chunk(instance_, PP_IMAGEDATAFORMAT_RGBA_PREMUL, 691 pp::ImageData chunk(instance_, PP_IMAGEDATAFORMAT_RGBA_PREMUL,
691 pp::Size(w/8, h/8), true); 692 pp::Size(w/8, h/8), true);
692 ASSERT_FALSE(chunk.is_null()); 693 ASSERT_FALSE(chunk.is_null());
693 const uint32_t kRed = 0xff0000ff; 694 const uint32_t kRed = 0xff0000ff;
694 FillRectInImage(&chunk, pp::Rect(chunk.size()), kRed); 695 FillRectInImage(&chunk, pp::Rect(chunk.size()), kRed);
695 696
696 // Paint a invisable chunk, expecting Flush to invoke callback slowly. 697 // Paint a invisable chunk, expecting Flush to invoke callback slowly.
697 dc.PaintImageData(chunk, pp::Point(0, h*0.75)); 698 dc.PaintImageData(chunk, pp::Point(0, h*0.75));
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 pp::Graphics2D dc(instance_, pp::Size(w, h), false); 797 pp::Graphics2D dc(instance_, pp::Size(w, h), false);
797 ASSERT_FALSE(dc.is_null()); 798 ASSERT_FALSE(dc.is_null());
798 ASSERT_TRUE(instance_->BindGraphics(dc)); 799 ASSERT_TRUE(instance_->BindGraphics(dc));
799 800
800 ASSERT_TRUE(instance_->BindGraphics(pp::Graphics2D())); 801 ASSERT_TRUE(instance_->BindGraphics(pp::Graphics2D()));
801 ASSERT_TRUE(instance_->BindGraphics(pp::Graphics3D())); 802 ASSERT_TRUE(instance_->BindGraphics(pp::Graphics3D()));
802 803
803 PASS(); 804 PASS();
804 } 805 }
805 806
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698