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

Side by Side Diff: chrome/test/data/nacl/ppapi/ppp_instance/ppapi_ppp_instance.cc

Issue 2127213002: Avoid lossy effects of rounding by using contentBoxRect directly for plugin bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/test/data/nacl/ppapi_test_lib/get_browser_interface.h" 10 #include "chrome/test/data/nacl/ppapi_test_lib/get_browser_interface.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 printf("--- PPP_Instance::DidChangeView\n"); 42 printf("--- PPP_Instance::DidChangeView\n");
43 EXPECT(instance == pp_instance()); 43 EXPECT(instance == pp_instance());
44 44
45 PP_Rect clip; 45 PP_Rect clip;
46 PPBView()->GetClipRect(view, &clip); 46 PPBView()->GetClipRect(view, &clip);
47 EXPECT(clip.point.x == 0 && clip.point.y == 0); 47 EXPECT(clip.point.x == 0 && clip.point.y == 0);
48 48
49 // These are based on embed dimensions. 49 // These are based on embed dimensions.
50 PP_Rect position; 50 PP_Rect position;
51 PPBView()->GetRect(view, &position); 51 PPBView()->GetRect(view, &position);
52 fprintf(stderr, "clip.size.height: %d\n", clip.size.height);
53 EXPECT(position.size.width == 15 && clip.size.width == 15); 52 EXPECT(position.size.width == 15 && clip.size.width == 15);
54 EXPECT(position.size.height == 20 && clip.size.height == 21); 53 EXPECT(position.size.height == 20 && clip.size.height == 20);
55 54
56 TEST_PASSED; 55 TEST_PASSED;
57 } 56 }
58 57
59 void DidChangeFocus(PP_Instance instance, 58 void DidChangeFocus(PP_Instance instance,
60 PP_Bool has_focus) { 59 PP_Bool has_focus) {
61 printf("--- PPP_Instance::DidChangeFocus has_focus=%d\n", has_focus); 60 printf("--- PPP_Instance::DidChangeFocus has_focus=%d\n", has_focus);
62 // There should be no focus on load, so this will trigger when we gain it 61 // There should be no focus on load, so this will trigger when we gain it
63 // and then release it and so on. 62 // and then release it and so on.
64 static bool expected_has_focus = true; 63 static bool expected_has_focus = true;
(...skipping 23 matching lines...) Expand all
88 } // namespace 87 } // namespace
89 88
90 89
91 void SetupTests() { 90 void SetupTests() {
92 // Each PPP_Instance function called by the browser acts as a test. 91 // Each PPP_Instance function called by the browser acts as a test.
93 } 92 }
94 93
95 void SetupPluginInterfaces() { 94 void SetupPluginInterfaces() {
96 RegisterPluginInterface(PPP_INSTANCE_INTERFACE, &ppp_instance_interface); 95 RegisterPluginInterface(PPP_INSTANCE_INTERFACE, &ppp_instance_interface);
97 } 96 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698