mirror of https://github.com/vitalif/phantomjs
Remove the deprecated phantom.scriptName.
The use of phantom.scriptName has been deprecated since System#args was introduce (version 1.5, March 2012). Any old scripts need to migrate to System#args. https://github.com/ariya/phantomjs/issues/125292.0
parent
6c6059fd91
commit
3274001e07
|
@ -251,11 +251,6 @@ void Phantom::setLibraryPath(const QString &libraryPath)
|
||||||
m_page->setLibraryPath(libraryPath);
|
m_page->setLibraryPath(libraryPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Phantom::scriptName() const
|
|
||||||
{
|
|
||||||
return QFileInfo(m_config.scriptFile()).fileName();
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariantMap Phantom::version() const
|
QVariantMap Phantom::version() const
|
||||||
{
|
{
|
||||||
QVariantMap result;
|
QVariantMap result;
|
||||||
|
|
|
@ -50,7 +50,6 @@ class Phantom : public QObject
|
||||||
Q_PROPERTY(QVariantMap defaultPageSettings READ defaultPageSettings)
|
Q_PROPERTY(QVariantMap defaultPageSettings READ defaultPageSettings)
|
||||||
Q_PROPERTY(QString libraryPath READ libraryPath WRITE setLibraryPath)
|
Q_PROPERTY(QString libraryPath READ libraryPath WRITE setLibraryPath)
|
||||||
Q_PROPERTY(QString outputEncoding READ outputEncoding WRITE setOutputEncoding)
|
Q_PROPERTY(QString outputEncoding READ outputEncoding WRITE setOutputEncoding)
|
||||||
Q_PROPERTY(QString scriptName READ scriptName)
|
|
||||||
Q_PROPERTY(QVariantMap version READ version)
|
Q_PROPERTY(QVariantMap version READ version)
|
||||||
Q_PROPERTY(QObject *page READ page)
|
Q_PROPERTY(QObject *page READ page)
|
||||||
Q_PROPERTY(bool cookiesEnabled READ areCookiesEnabled WRITE setCookiesEnabled)
|
Q_PROPERTY(bool cookiesEnabled READ areCookiesEnabled WRITE setCookiesEnabled)
|
||||||
|
@ -77,8 +76,6 @@ public:
|
||||||
QString libraryPath() const;
|
QString libraryPath() const;
|
||||||
void setLibraryPath(const QString &libraryPath);
|
void setLibraryPath(const QString &libraryPath);
|
||||||
|
|
||||||
QString scriptName() const;
|
|
||||||
|
|
||||||
QVariantMap version() const;
|
QVariantMap version() const;
|
||||||
|
|
||||||
QObject *page() const;
|
QObject *page() const;
|
||||||
|
|
|
@ -15,18 +15,6 @@ describe("phantom global object", function() {
|
||||||
expect(phantom.libraryPath.length).toNotEqual(0);
|
expect(phantom.libraryPath.length).toNotEqual(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should have scriptName property", function() {
|
|
||||||
expect(phantom.hasOwnProperty('scriptName')).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should have scriptName as a string", function() {
|
|
||||||
expect(typeof phantom.scriptName).toEqual('string');
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should not have an empty scriptName", function() {
|
|
||||||
expect(phantom.scriptName.length).toNotEqual(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should have outputEncoding property", function() {
|
it("should have outputEncoding property", function() {
|
||||||
expect(phantom.hasOwnProperty('outputEncoding')).toBeTruthy();
|
expect(phantom.hasOwnProperty('outputEncoding')).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue