diff --git a/src/phantom.cpp b/src/phantom.cpp index 37aac33b..16e3bd04 100644 --- a/src/phantom.cpp +++ b/src/phantom.cpp @@ -251,11 +251,6 @@ void Phantom::setLibraryPath(const QString &libraryPath) m_page->setLibraryPath(libraryPath); } -QString Phantom::scriptName() const -{ - return QFileInfo(m_config.scriptFile()).fileName(); -} - QVariantMap Phantom::version() const { QVariantMap result; diff --git a/src/phantom.h b/src/phantom.h index fd892437..5b7a962c 100644 --- a/src/phantom.h +++ b/src/phantom.h @@ -50,7 +50,6 @@ class Phantom : public QObject Q_PROPERTY(QVariantMap defaultPageSettings READ defaultPageSettings) Q_PROPERTY(QString libraryPath READ libraryPath WRITE setLibraryPath) Q_PROPERTY(QString outputEncoding READ outputEncoding WRITE setOutputEncoding) - Q_PROPERTY(QString scriptName READ scriptName) Q_PROPERTY(QVariantMap version READ version) Q_PROPERTY(QObject *page READ page) Q_PROPERTY(bool cookiesEnabled READ areCookiesEnabled WRITE setCookiesEnabled) @@ -77,8 +76,6 @@ public: QString libraryPath() const; void setLibraryPath(const QString &libraryPath); - QString scriptName() const; - QVariantMap version() const; QObject *page() const; diff --git a/test/phantom-spec.js b/test/phantom-spec.js index a03294d1..2430c0a4 100644 --- a/test/phantom-spec.js +++ b/test/phantom-spec.js @@ -15,18 +15,6 @@ describe("phantom global object", function() { 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() { expect(phantom.hasOwnProperty('outputEncoding')).toBeTruthy(); });