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

Side by Side Diff: Source/testing/runner/TestRunner.cpp

Issue 22852029: Add testRunner.cancelAllActiveNotifications to close all active notifications. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/testing/runner/TestRunner.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 bindMethod("setPOSIXLocale", &TestRunner::setPOSIXLocale); 277 bindMethod("setPOSIXLocale", &TestRunner::setPOSIXLocale);
278 bindMethod("numberOfPendingGeolocationPermissionRequests", &TestRunner:: num berOfPendingGeolocationPermissionRequests); 278 bindMethod("numberOfPendingGeolocationPermissionRequests", &TestRunner:: num berOfPendingGeolocationPermissionRequests);
279 bindMethod("setGeolocationPermission", &TestRunner::setGeolocationPermission ); 279 bindMethod("setGeolocationPermission", &TestRunner::setGeolocationPermission );
280 bindMethod("setMockGeolocationPositionUnavailableError", &TestRunner::setMoc kGeolocationPositionUnavailableError); 280 bindMethod("setMockGeolocationPositionUnavailableError", &TestRunner::setMoc kGeolocationPositionUnavailableError);
281 bindMethod("setMockGeolocationPosition", &TestRunner::setMockGeolocationPosi tion); 281 bindMethod("setMockGeolocationPosition", &TestRunner::setMockGeolocationPosi tion);
282 bindMethod("setMIDIAccessorResult", &TestRunner::setMIDIAccessorResult); 282 bindMethod("setMIDIAccessorResult", &TestRunner::setMIDIAccessorResult);
283 bindMethod("setMIDISysExPermission", &TestRunner::setMIDISysExPermission); 283 bindMethod("setMIDISysExPermission", &TestRunner::setMIDISysExPermission);
284 #if ENABLE_NOTIFICATIONS 284 #if ENABLE_NOTIFICATIONS
285 bindMethod("grantWebNotificationPermission", &TestRunner::grantWebNotificati onPermission); 285 bindMethod("grantWebNotificationPermission", &TestRunner::grantWebNotificati onPermission);
286 bindMethod("simulateLegacyWebNotificationClick", &TestRunner::simulateLegacy WebNotificationClick); 286 bindMethod("simulateLegacyWebNotificationClick", &TestRunner::simulateLegacy WebNotificationClick);
287 bindMethod("cancelAllActiveNotifications", &TestRunner::cancelAllActiveNotif ications);
287 #endif 288 #endif
288 bindMethod("addMockSpeechInputResult", &TestRunner::addMockSpeechInputResult ); 289 bindMethod("addMockSpeechInputResult", &TestRunner::addMockSpeechInputResult );
289 bindMethod("setMockSpeechInputDumpRect", &TestRunner::setMockSpeechInputDump Rect); 290 bindMethod("setMockSpeechInputDumpRect", &TestRunner::setMockSpeechInputDump Rect);
290 bindMethod("addMockSpeechRecognitionResult", &TestRunner::addMockSpeechRecog nitionResult); 291 bindMethod("addMockSpeechRecognitionResult", &TestRunner::addMockSpeechRecog nitionResult);
291 bindMethod("setMockSpeechRecognitionError", &TestRunner::setMockSpeechRecogn itionError); 292 bindMethod("setMockSpeechRecognitionError", &TestRunner::setMockSpeechRecogn itionError);
292 bindMethod("wasMockSpeechRecognitionAborted", &TestRunner::wasMockSpeechReco gnitionAborted); 293 bindMethod("wasMockSpeechRecognitionAborted", &TestRunner::wasMockSpeechReco gnitionAborted);
293 bindMethod("display", &TestRunner::display); 294 bindMethod("display", &TestRunner::display);
294 bindMethod("displayInvalidatedRegion", &TestRunner::displayInvalidatedRegion ); 295 bindMethod("displayInvalidatedRegion", &TestRunner::displayInvalidatedRegion );
295 bindMethod("isChooserShown", &TestRunner::isChooserShown); 296 bindMethod("isChooserShown", &TestRunner::isChooserShown);
296 297
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 } 1860 }
1860 1861
1861 void TestRunner::simulateLegacyWebNotificationClick(const CppArgumentList& argum ents, CppVariant* result) 1862 void TestRunner::simulateLegacyWebNotificationClick(const CppArgumentList& argum ents, CppVariant* result)
1862 { 1863 {
1863 if (arguments.size() != 1 || !arguments[0].isString()) { 1864 if (arguments.size() != 1 || !arguments[0].isString()) {
1864 result->set(false); 1865 result->set(false);
1865 return; 1866 return;
1866 } 1867 }
1867 result->set(m_notificationPresenter->simulateClick(WebString::fromUTF8(argum ents[0].toString()))); 1868 result->set(m_notificationPresenter->simulateClick(WebString::fromUTF8(argum ents[0].toString())));
1868 } 1869 }
1870
1871 void TestRunner::cancelAllActiveNotifications(const CppArgumentList& arguments, CppVariant* result)
1872 {
1873 m_notificationPresenter->cancelAllActiveNotifications();
1874 result->set(true);
1875 }
1869 #endif 1876 #endif
1870 1877
1871 void TestRunner::addMockSpeechInputResult(const CppArgumentList& arguments, CppV ariant* result) 1878 void TestRunner::addMockSpeechInputResult(const CppArgumentList& arguments, CppV ariant* result)
1872 { 1879 {
1873 result->setNull(); 1880 result->setNull();
1874 if (arguments.size() < 3 || !arguments[0].isString() || !arguments[1].isNumb er() || !arguments[2].isString()) 1881 if (arguments.size() < 3 || !arguments[0].isString() || !arguments[1].isNumb er() || !arguments[2].isString())
1875 return; 1882 return;
1876 1883
1877 #if ENABLE_INPUT_SPEECH 1884 #if ENABLE_INPUT_SPEECH
1878 m_proxy->speechInputControllerMock()->addMockRecognitionResult(WebString::fr omUTF8(arguments[0].toString()), arguments[1].toDouble(), WebString::fromUTF8(ar guments[2].toString())); 1885 m_proxy->speechInputControllerMock()->addMockRecognitionResult(WebString::fr omUTF8(arguments[0].toString()), arguments[1].toDouble(), WebString::fromUTF8(ar guments[2].toString()));
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 result->setNull(); 2143 result->setNull();
2137 } 2144 }
2138 2145
2139 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp Variant* result) 2146 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp Variant* result)
2140 { 2147 {
2141 m_pointerLockPlannedResult = PointerLockWillFailSync; 2148 m_pointerLockPlannedResult = PointerLockWillFailSync;
2142 result->setNull(); 2149 result->setNull();
2143 } 2150 }
2144 2151
2145 } 2152 }
OLDNEW
« no previous file with comments | « Source/testing/runner/TestRunner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698