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

Side by Side Diff: third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 GetWebView()->HandleInputEvent( 116 GetWebView()->HandleInputEvent(
117 GenerateEvent(WebInputEvent::kGestureScrollBegin)); 117 GenerateEvent(WebInputEvent::kGestureScrollBegin));
118 GetWebView()->HandleInputEvent( 118 GetWebView()->HandleInputEvent(
119 GenerateEvent(WebInputEvent::kGestureScrollUpdate, 0, delta_y)); 119 GenerateEvent(WebInputEvent::kGestureScrollUpdate, 0, delta_y));
120 GetWebView()->HandleInputEvent( 120 GetWebView()->HandleInputEvent(
121 GenerateEvent(WebInputEvent::kGestureScrollEnd)); 121 GenerateEvent(WebInputEvent::kGestureScrollEnd));
122 } 122 }
123 123
124 Element* GetElementById(const WebString& id) { 124 Element* GetElementById(const WebString& id) {
125 return static_cast<Element*>( 125 return static_cast<Element*>(
126 GetWebView()->MainFrame()->GetDocument().GetElementById(id)); 126 GetWebView()->MainFrameImpl()->GetDocument().GetElementById(id));
127 } 127 }
128 128
129 WebViewBase* GetWebView() const { return helper_.WebView(); } 129 WebViewBase* GetWebView() const { return helper_.WebView(); }
130 LocalFrame* GetFrame() const { 130 LocalFrame* GetFrame() const {
131 return helper_.WebView()->MainFrameImpl()->GetFrame(); 131 return helper_.WebView()->MainFrameImpl()->GetFrame();
132 } 132 }
133 VisualViewport& GetVisualViewport() const { 133 VisualViewport& GetVisualViewport() const {
134 return helper_.WebView()->GetPage()->GetVisualViewport(); 134 return helper_.WebView()->GetPage()->GetVisualViewport();
135 } 135 }
136 136
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 1071
1072 // Make sure we're not adding the browser controls height to the vh units as 1072 // Make sure we're not adding the browser controls height to the vh units as
1073 // when they're locked to hidden, the ICB fills the entire viewport already. 1073 // when they're locked to hidden, the ICB fills the entire viewport already.
1074 EXPECT_FLOAT_EQ(200.f, abs_pos->getBoundingClientRect()->height()); 1074 EXPECT_FLOAT_EQ(200.f, abs_pos->getBoundingClientRect()->height());
1075 EXPECT_FLOAT_EQ(200.f, fixed_pos->getBoundingClientRect()->height()); 1075 EXPECT_FLOAT_EQ(200.f, fixed_pos->getBoundingClientRect()->height());
1076 EXPECT_EQ(400, GetFrame()->View()->ViewportSizeForViewportUnits().Height()); 1076 EXPECT_EQ(400, GetFrame()->View()->ViewportSizeForViewportUnits().Height());
1077 } 1077 }
1078 } 1078 }
1079 1079
1080 } // namespace blink 1080 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/exported/WebAXObject.cpp ('k') | third_party/WebKit/Source/web/tests/TouchActionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698