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

Side by Side Diff: Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp

Issue 15927026: Enabled using viewport on desktop browsers behind experimental flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP Created 7 years, 4 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) 3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
4 * Copyright (C) 2012 Apple Inc. All Rights Reserved. 4 * Copyright (C) 2012 Apple Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 bindMethod("setIsolatedWorldSecurityOrigin", &TestRunner::setIsolatedWorldSe curityOrigin); 190 bindMethod("setIsolatedWorldSecurityOrigin", &TestRunner::setIsolatedWorldSe curityOrigin);
191 bindMethod("setIsolatedWorldContentSecurityPolicy", &TestRunner::setIsolated WorldContentSecurityPolicy); 191 bindMethod("setIsolatedWorldContentSecurityPolicy", &TestRunner::setIsolated WorldContentSecurityPolicy);
192 bindMethod("addOriginAccessWhitelistEntry", &TestRunner::addOriginAccessWhit elistEntry); 192 bindMethod("addOriginAccessWhitelistEntry", &TestRunner::addOriginAccessWhit elistEntry);
193 bindMethod("removeOriginAccessWhitelistEntry", &TestRunner::removeOriginAcce ssWhitelistEntry); 193 bindMethod("removeOriginAccessWhitelistEntry", &TestRunner::removeOriginAcce ssWhitelistEntry);
194 bindMethod("hasCustomPageSizeStyle", &TestRunner::hasCustomPageSizeStyle); 194 bindMethod("hasCustomPageSizeStyle", &TestRunner::hasCustomPageSizeStyle);
195 bindMethod("forceRedSelectionColors", &TestRunner::forceRedSelectionColors); 195 bindMethod("forceRedSelectionColors", &TestRunner::forceRedSelectionColors);
196 bindMethod("addUserStyleSheet", &TestRunner::addUserStyleSheet); 196 bindMethod("addUserStyleSheet", &TestRunner::addUserStyleSheet);
197 bindMethod("startSpeechInput", &TestRunner::startSpeechInput); 197 bindMethod("startSpeechInput", &TestRunner::startSpeechInput);
198 bindMethod("findString", &TestRunner::findString); 198 bindMethod("findString", &TestRunner::findString);
199 bindMethod("setValueForUser", &TestRunner::setValueForUser); 199 bindMethod("setValueForUser", &TestRunner::setValueForUser);
200 bindMethod("enableFixedLayoutMode", &TestRunner::enableFixedLayoutMode);
201 bindMethod("setFixedLayoutSize", &TestRunner::setFixedLayoutSize); 200 bindMethod("setFixedLayoutSize", &TestRunner::setFixedLayoutSize);
202 bindMethod("selectionAsMarkup", &TestRunner::selectionAsMarkup); 201 bindMethod("selectionAsMarkup", &TestRunner::selectionAsMarkup);
203 bindMethod("setTextSubpixelPositioning", &TestRunner::setTextSubpixelPositio ning); 202 bindMethod("setTextSubpixelPositioning", &TestRunner::setTextSubpixelPositio ning);
204 bindMethod("setPageVisibility", &TestRunner::setPageVisibility); 203 bindMethod("setPageVisibility", &TestRunner::setPageVisibility);
205 bindMethod("setTextDirection", &TestRunner::setTextDirection); 204 bindMethod("setTextDirection", &TestRunner::setTextDirection);
206 bindMethod("textSurroundingNode", &TestRunner::textSurroundingNode); 205 bindMethod("textSurroundingNode", &TestRunner::textSurroundingNode);
207 bindMethod("disableAutoResizeMode", &TestRunner::disableAutoResizeMode); 206 bindMethod("disableAutoResizeMode", &TestRunner::disableAutoResizeMode);
208 bindMethod("enableAutoResizeMode", &TestRunner::enableAutoResizeMode); 207 bindMethod("enableAutoResizeMode", &TestRunner::enableAutoResizeMode);
209 bindMethod("setMockDeviceMotion", &TestRunner::setMockDeviceMotion); 208 bindMethod("setMockDeviceMotion", &TestRunner::setMockDeviceMotion);
210 bindMethod("setMockDeviceOrientation", &TestRunner::setMockDeviceOrientation ); 209 bindMethod("setMockDeviceOrientation", &TestRunner::setMockDeviceOrientation );
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 if (!WebBindings::getElement(arguments[0].value.objectValue, &element)) 1337 if (!WebBindings::getElement(arguments[0].value.objectValue, &element))
1339 return; 1338 return;
1340 1339
1341 WebInputElement* input = toWebInputElement(&element); 1340 WebInputElement* input = toWebInputElement(&element);
1342 if (!input) 1341 if (!input)
1343 return; 1342 return;
1344 1343
1345 input->setValue(cppVariantToWebString(arguments[1]), true); 1344 input->setValue(cppVariantToWebString(arguments[1]), true);
1346 } 1345 }
1347 1346
1348 void TestRunner::enableFixedLayoutMode(const CppArgumentList& arguments, CppVari ant* result)
1349 {
1350 result->setNull();
1351 if (arguments.size() < 1 || !arguments[0].isBool())
1352 return;
1353 bool enableFixedLayout = arguments[0].toBoolean();
1354 m_webView->enableFixedLayoutMode(enableFixedLayout);
1355 }
1356
1357 void TestRunner::setFixedLayoutSize(const CppArgumentList& arguments, CppVariant * result) 1347 void TestRunner::setFixedLayoutSize(const CppArgumentList& arguments, CppVariant * result)
1358 { 1348 {
1359 result->setNull(); 1349 result->setNull();
1360 if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNum ber()) 1350 if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNum ber())
1361 return; 1351 return;
1362 int width = arguments[0].toInt32(); 1352 int width = arguments[0].toInt32();
1363 int height = arguments[1].toInt32(); 1353 int height = arguments[1].toInt32();
1364 m_webView->setFixedLayoutSize(WebSize(width, height)); 1354 m_webView->setFixedLayoutSize(WebSize(width, height));
1365 } 1355 }
1366 1356
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 result->setNull(); 2080 result->setNull();
2091 } 2081 }
2092 2082
2093 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp Variant* result) 2083 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp Variant* result)
2094 { 2084 {
2095 m_pointerLockPlannedResult = PointerLockWillFailSync; 2085 m_pointerLockPlannedResult = PointerLockWillFailSync;
2096 result->setNull(); 2086 result->setNull();
2097 } 2087 }
2098 2088
2099 } 2089 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698