OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/shell/renderer/test_runner/test_runner.h" | 5 #include "content/shell/renderer/test_runner/test_runner.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/public/test/layouttest_support.h" | 10 #include "content/public/test/layouttest_support.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 void ClearAllDatabases(); | 269 void ClearAllDatabases(); |
270 void SetDatabaseQuota(int quota); | 270 void SetDatabaseQuota(int quota); |
271 void SetAlwaysAcceptCookies(bool accept); | 271 void SetAlwaysAcceptCookies(bool accept); |
272 void SetWindowIsKey(bool value); | 272 void SetWindowIsKey(bool value); |
273 std::string PathToLocalResource(const std::string& path); | 273 std::string PathToLocalResource(const std::string& path); |
274 void SetBackingScaleFactor(double value, v8::Handle<v8::Function> callback); | 274 void SetBackingScaleFactor(double value, v8::Handle<v8::Function> callback); |
275 void SetColorProfile(const std::string& name, | 275 void SetColorProfile(const std::string& name, |
276 v8::Handle<v8::Function> callback); | 276 v8::Handle<v8::Function> callback); |
277 void SetPOSIXLocale(const std::string& locale); | 277 void SetPOSIXLocale(const std::string& locale); |
278 void SetMIDIAccessorResult(bool result); | 278 void SetMIDIAccessorResult(bool result); |
279 void SetMIDISysexPermission(bool value); | |
280 void GrantWebNotificationPermission(gin::Arguments* args); | 279 void GrantWebNotificationPermission(gin::Arguments* args); |
281 void ClearWebNotificationPermissions(); | 280 void ClearWebNotificationPermissions(); |
282 void SimulateWebNotificationClick(const std::string& title); | 281 void SimulateWebNotificationClick(const std::string& title); |
283 void AddMockSpeechRecognitionResult(const std::string& transcript, | 282 void AddMockSpeechRecognitionResult(const std::string& transcript, |
284 double confidence); | 283 double confidence); |
285 void SetMockSpeechRecognitionError(const std::string& error, | 284 void SetMockSpeechRecognitionError(const std::string& error, |
286 const std::string& message); | 285 const std::string& message); |
287 bool WasMockSpeechRecognitionAborted(); | 286 bool WasMockSpeechRecognitionAborted(); |
288 void AddMockCredentialManagerResponse(const std::string& id, | 287 void AddMockCredentialManagerResponse(const std::string& id, |
289 const std::string& name, | 288 const std::string& name, |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 &TestRunnerBindings::SetAlwaysAcceptCookies) | 515 &TestRunnerBindings::SetAlwaysAcceptCookies) |
517 .SetMethod("setWindowIsKey", &TestRunnerBindings::SetWindowIsKey) | 516 .SetMethod("setWindowIsKey", &TestRunnerBindings::SetWindowIsKey) |
518 .SetMethod("pathToLocalResource", | 517 .SetMethod("pathToLocalResource", |
519 &TestRunnerBindings::PathToLocalResource) | 518 &TestRunnerBindings::PathToLocalResource) |
520 .SetMethod("setBackingScaleFactor", | 519 .SetMethod("setBackingScaleFactor", |
521 &TestRunnerBindings::SetBackingScaleFactor) | 520 &TestRunnerBindings::SetBackingScaleFactor) |
522 .SetMethod("setColorProfile", &TestRunnerBindings::SetColorProfile) | 521 .SetMethod("setColorProfile", &TestRunnerBindings::SetColorProfile) |
523 .SetMethod("setPOSIXLocale", &TestRunnerBindings::SetPOSIXLocale) | 522 .SetMethod("setPOSIXLocale", &TestRunnerBindings::SetPOSIXLocale) |
524 .SetMethod("setMIDIAccessorResult", | 523 .SetMethod("setMIDIAccessorResult", |
525 &TestRunnerBindings::SetMIDIAccessorResult) | 524 &TestRunnerBindings::SetMIDIAccessorResult) |
526 .SetMethod("setMIDISysexPermission", | |
527 &TestRunnerBindings::SetMIDISysexPermission) | |
528 .SetMethod("grantWebNotificationPermission", | 525 .SetMethod("grantWebNotificationPermission", |
529 &TestRunnerBindings::GrantWebNotificationPermission) | 526 &TestRunnerBindings::GrantWebNotificationPermission) |
530 .SetMethod("clearWebNotificationPermissions", | 527 .SetMethod("clearWebNotificationPermissions", |
531 &TestRunnerBindings::ClearWebNotificationPermissions) | 528 &TestRunnerBindings::ClearWebNotificationPermissions) |
532 .SetMethod("simulateWebNotificationClick", | 529 .SetMethod("simulateWebNotificationClick", |
533 &TestRunnerBindings::SimulateWebNotificationClick) | 530 &TestRunnerBindings::SimulateWebNotificationClick) |
534 .SetMethod("addMockSpeechRecognitionResult", | 531 .SetMethod("addMockSpeechRecognitionResult", |
535 &TestRunnerBindings::AddMockSpeechRecognitionResult) | 532 &TestRunnerBindings::AddMockSpeechRecognitionResult) |
536 .SetMethod("setMockSpeechRecognitionError", | 533 .SetMethod("setMockSpeechRecognitionError", |
537 &TestRunnerBindings::SetMockSpeechRecognitionError) | 534 &TestRunnerBindings::SetMockSpeechRecognitionError) |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 void TestRunnerBindings::SetPOSIXLocale(const std::string& locale) { | 1313 void TestRunnerBindings::SetPOSIXLocale(const std::string& locale) { |
1317 if (runner_) | 1314 if (runner_) |
1318 runner_->SetPOSIXLocale(locale); | 1315 runner_->SetPOSIXLocale(locale); |
1319 } | 1316 } |
1320 | 1317 |
1321 void TestRunnerBindings::SetMIDIAccessorResult(bool result) { | 1318 void TestRunnerBindings::SetMIDIAccessorResult(bool result) { |
1322 if (runner_) | 1319 if (runner_) |
1323 runner_->SetMIDIAccessorResult(result); | 1320 runner_->SetMIDIAccessorResult(result); |
1324 } | 1321 } |
1325 | 1322 |
1326 void TestRunnerBindings::SetMIDISysexPermission(bool value) { | |
1327 } | |
1328 | |
1329 void TestRunnerBindings::GrantWebNotificationPermission(gin::Arguments* args) { | 1323 void TestRunnerBindings::GrantWebNotificationPermission(gin::Arguments* args) { |
1330 } | 1324 } |
1331 | 1325 |
1332 void TestRunnerBindings::ClearWebNotificationPermissions() { | 1326 void TestRunnerBindings::ClearWebNotificationPermissions() { |
1333 } | 1327 } |
1334 | 1328 |
1335 void TestRunnerBindings::SimulateWebNotificationClick( | 1329 void TestRunnerBindings::SimulateWebNotificationClick( |
1336 const std::string& title) { | 1330 const std::string& title) { |
1337 if (runner_) | 1331 if (runner_) |
1338 runner_->SimulateWebNotificationClick(title); | 1332 runner_->SimulateWebNotificationClick(title); |
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3007 } | 3001 } |
3008 | 3002 |
3009 void TestRunner::DidLosePointerLockInternal() { | 3003 void TestRunner::DidLosePointerLockInternal() { |
3010 bool was_locked = pointer_locked_; | 3004 bool was_locked = pointer_locked_; |
3011 pointer_locked_ = false; | 3005 pointer_locked_ = false; |
3012 if (was_locked) | 3006 if (was_locked) |
3013 web_view_->didLosePointerLock(); | 3007 web_view_->didLosePointerLock(); |
3014 } | 3008 } |
3015 | 3009 |
3016 } // namespace content | 3010 } // namespace content |
OLD | NEW |