| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /* | 5 /* |
| 6 * Copyright (C) 2010 Google Inc. All rights reserved. | 6 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) | 7 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) |
| 8 * Copyright (C) 2012 Apple Inc. All Rights Reserved. | 8 * Copyright (C) 2012 Apple Inc. All Rights Reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1814 result->setNull(); | 1814 result->setNull(); |
| 1815 if (arguments.size() < 1 || !arguments[0].isBool()) | 1815 if (arguments.size() < 1 || !arguments[0].isBool()) |
| 1816 return; | 1816 return; |
| 1817 const vector<WebTestProxyBase*>& windowList = m_testInterfaces->windowList()
; | 1817 const vector<WebTestProxyBase*>& windowList = m_testInterfaces->windowList()
; |
| 1818 for (unsigned i = 0; i < windowList.size(); ++i) | 1818 for (unsigned i = 0; i < windowList.size(); ++i) |
| 1819 windowList.at(i)->midiClientMock()->setSysExPermission(arguments[0].toBo
olean()); | 1819 windowList.at(i)->midiClientMock()->setSysExPermission(arguments[0].toBo
olean()); |
| 1820 } | 1820 } |
| 1821 | 1821 |
| 1822 void TestRunner::grantWebNotificationPermission(const CppArgumentList& arguments
, CppVariant* result) | 1822 void TestRunner::grantWebNotificationPermission(const CppArgumentList& arguments
, CppVariant* result) |
| 1823 { | 1823 { |
| 1824 if (arguments.size() != 1 || !arguments[0].isString()) { | 1824 result->setNull(); |
| 1825 result->set(false); | 1825 if (arguments.size() < 1 || !arguments[0].isString()) |
| 1826 return; | 1826 return; |
| 1827 } | 1827 |
| 1828 notification_presenter_->GrantPermission(arguments[0].toString()); | 1828 bool permissionGranted = true; |
| 1829 result->set(true); | 1829 if (arguments.size() == 2 && arguments[1].isBool()) |
| 1830 permissionGranted = arguments[1].toBoolean(); |
| 1831 |
| 1832 notification_presenter_->GrantPermission(arguments[0].toString(), permission
Granted); |
| 1830 } | 1833 } |
| 1831 | 1834 |
| 1832 void TestRunner::simulateLegacyWebNotificationClick(const CppArgumentList& argum
ents, CppVariant* result) | 1835 void TestRunner::simulateLegacyWebNotificationClick(const CppArgumentList& argum
ents, CppVariant* result) |
| 1833 { | 1836 { |
| 1834 if (arguments.size() != 1 || !arguments[0].isString()) { | 1837 if (arguments.size() != 1 || !arguments[0].isString()) { |
| 1835 result->set(false); | 1838 result->set(false); |
| 1836 return; | 1839 return; |
| 1837 } | 1840 } |
| 1838 result->set(notification_presenter_->SimulateClick(arguments[0].toString()))
; | 1841 result->set(notification_presenter_->SimulateClick(arguments[0].toString()))
; |
| 1839 } | 1842 } |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2116 result->setNull(); | 2119 result->setNull(); |
| 2117 } | 2120 } |
| 2118 | 2121 |
| 2119 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) | 2122 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) |
| 2120 { | 2123 { |
| 2121 m_pointerLockPlannedResult = PointerLockWillFailSync; | 2124 m_pointerLockPlannedResult = PointerLockWillFailSync; |
| 2122 result->setNull(); | 2125 result->setNull(); |
| 2123 } | 2126 } |
| 2124 | 2127 |
| 2125 } | 2128 } |
| OLD | NEW |