OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/dom/ClientRect.h" | 5 #include "core/dom/ClientRect.h" |
6 #include "core/frame/BrowserControls.h" | 6 #include "core/frame/BrowserControls.h" |
7 #include "core/frame/FrameHost.h" | 7 #include "core/frame/FrameHost.h" |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/RootFrameViewport.h" | 9 #include "core/frame/RootFrameViewport.h" |
10 #include "core/frame/VisualViewport.h" | 10 #include "core/frame/VisualViewport.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 settings->setAcceleratedCompositingEnabled(true); | 74 settings->setAcceleratedCompositingEnabled(true); |
75 settings->setPreferCompositingToLCDTextEnabled(true); | 75 settings->setPreferCompositingToLCDTextEnabled(true); |
76 // Android settings. | 76 // Android settings. |
77 settings->setViewportEnabled(true); | 77 settings->setViewportEnabled(true); |
78 settings->setViewportMetaEnabled(true); | 78 settings->setViewportMetaEnabled(true); |
79 settings->setShrinksViewportContentToFit(true); | 79 settings->setShrinksViewportContentToFit(true); |
80 settings->setMainFrameResizesAreOrientationChanges(true); | 80 settings->setMainFrameResizesAreOrientationChanges(true); |
81 } | 81 } |
82 | 82 |
83 void registerMockedHttpURLLoad(const std::string& fileName) { | 83 void registerMockedHttpURLLoad(const std::string& fileName) { |
84 URLTestHelpers::registerMockedURLFromBaseURL( | 84 URLTestHelpers::registerMockedURLLoadFromBase( |
85 WebString::fromUTF8(m_baseURL.c_str()), | 85 WebString::fromUTF8(m_baseURL.c_str()), testing::webTestDataPath(), |
Takashi Toyoshima
2017/01/26 10:57:58
removing c_str
| |
86 WebString::fromUTF8(fileName.c_str())); | 86 WebString::fromUTF8(fileName.c_str())); |
87 } | 87 } |
88 | 88 |
89 void executeScript(const WebString& code) { | 89 void executeScript(const WebString& code) { |
90 executeScript(code, *mainWebFrame()); | 90 executeScript(code, *mainWebFrame()); |
91 } | 91 } |
92 | 92 |
93 void executeScript(const WebString& code, WebLocalFrame& frame) { | 93 void executeScript(const WebString& code, WebLocalFrame& frame) { |
94 frame.executeScript(WebScriptSource(code)); | 94 frame.executeScript(WebScriptSource(code)); |
95 frame.view()->updateAllLifecyclePhases(); | 95 frame.view()->updateAllLifecyclePhases(); |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1312 // FrameView without a layout. | 1312 // FrameView without a layout. |
1313 iframe->remove(); | 1313 iframe->remove(); |
1314 | 1314 |
1315 EXPECT_EQ(mainFrameView()->layoutViewportScrollableArea(), | 1315 EXPECT_EQ(mainFrameView()->layoutViewportScrollableArea(), |
1316 &mainFrameView()->getRootFrameViewport()->layoutViewport()); | 1316 &mainFrameView()->getRootFrameViewport()->layoutViewport()); |
1317 } | 1317 } |
1318 | 1318 |
1319 } // namespace | 1319 } // namespace |
1320 | 1320 |
1321 } // namespace blink | 1321 } // namespace blink |
OLD | NEW |