From 4f87c915c307745ffe7ea136007dd0eb2c3e676b Mon Sep 17 00:00:00 2001 From: Monica Chew Date: Mon, 27 May 2013 18:33:39 -0700 Subject: [PATCH 01/23] Move execution from nsExternalAppHandler to nsDownload (b=858234, r=paolo) --- .../downloads/nsDownloadManager.cpp | 18 +- .../components/downloads/nsDownloadManager.h | 5 + .../components/downloads/nsDownloadProxy.h | 11 + .../downloads/nsIDownloadManager.idl | 8 +- .../tests/browser/common/mockTransfer.js | 3 +- uriloader/base/nsITransfer.idl | 10 +- .../exthandler/nsExternalHelperAppService.cpp | 400 ++++++------------ .../exthandler/nsExternalHelperAppService.h | 48 +-- .../nsIExternalHelperAppService.idl | 16 +- 9 files changed, 204 insertions(+), 315 deletions(-) diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp index 32c537552cf..f7e3fabdfd7 100644 --- a/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp @@ -2524,6 +2524,13 @@ nsDownload::~nsDownload() { } +NS_IMETHODIMP nsDownload::SetSha256Hash(const nsACString& aHash) { + MOZ_ASSERT(NS_IsMainThread(), "Must call SetSha256Hash on main thread"); + // This will be used later to query the application reputation service. + mHash = aHash; + return NS_OK; +} + #ifdef MOZ_ENABLE_GIO static void gio_set_metadata_done(GObject *source_obj, GAsyncResult *res, gpointer user_data) { @@ -2586,7 +2593,6 @@ nsDownload::SetState(DownloadState aState) #endif case nsIDownloadManager::DOWNLOAD_FINISHED: { - // Do what exthandler would have done if necessary nsresult rv = ExecuteDesiredAction(); if (NS_FAILED(rv)) { // We've failed to execute the desired action. As a result, we should @@ -2928,6 +2934,8 @@ nsDownload::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus) { + MOZ_ASSERT(NS_IsMainThread(), "Must call OnStateChange in main thread"); + // We don't want to lose access to our member variables nsRefPtr kungFuDeathGrip = this; @@ -3187,10 +3195,12 @@ nsDownload::Finalize() nsresult nsDownload::ExecuteDesiredAction() { - // If we have a temp file and we have resumed, we have to do what the - // external helper app service would have done. - if (!mTempFile || !WasResumed()) + // nsExternalHelperAppHandler is the only caller of AddDownload that sets a + // tempfile parameter. In this case, execute the desired action according to + // the saved mime info. + if (!mTempFile) { return NS_OK; + } // We need to bail if for some reason the temp file got removed bool fileExists; diff --git a/toolkit/components/downloads/nsDownloadManager.h b/toolkit/components/downloads/nsDownloadManager.h index 6d7f737e593..6597416be9c 100644 --- a/toolkit/components/downloads/nsDownloadManager.h +++ b/toolkit/components/downloads/nsDownloadManager.h @@ -421,6 +421,11 @@ private: enum AutoResume { DONT_RESUME, AUTO_RESUME }; AutoResume mAutoResume; + /** + * Stores the SHA-256 hash associated with the downloaded file. + */ + nsAutoCString mHash; + friend class nsDownloadManager; }; diff --git a/toolkit/components/downloads/nsDownloadProxy.h b/toolkit/components/downloads/nsDownloadProxy.h index 8dcfecd7020..cea82d514ff 100644 --- a/toolkit/components/downloads/nsDownloadProxy.h +++ b/toolkit/components/downloads/nsDownloadProxy.h @@ -16,6 +16,11 @@ #define PREF_BDM_SHOWWHENSTARTING "browser.download.manager.showWhenStarting" #define PREF_BDM_FOCUSWHENSTARTING "browser.download.manager.focusWhenStarting" +// This class only exists because nsDownload cannot inherit from nsITransfer +// directly. The reason for this is that nsDownloadManager (incorrectly) keeps +// an nsCOMArray of nsDownloads, and nsCOMArray is only intended for use with +// abstract classes. Using a concrete class that multiply inherits from classes +// deriving from nsISupports will throw ambiguous base class errors. class nsDownloadProxy : public nsITransfer { public: @@ -143,6 +148,12 @@ public: return mInner->OnSecurityChange(aWebProgress, aRequest, aState); } + NS_IMETHODIMP SetSha256Hash(const nsACString& aHash) + { + NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED); + return mInner->SetSha256Hash(aHash); + } + private: nsCOMPtr mInner; }; diff --git a/toolkit/components/downloads/nsIDownloadManager.idl b/toolkit/components/downloads/nsIDownloadManager.idl index 3bfcca88dc9..d7eba894086 100644 --- a/toolkit/components/downloads/nsIDownloadManager.idl +++ b/toolkit/components/downloads/nsIDownloadManager.idl @@ -114,8 +114,12 @@ interface nsIDownloadManager : nsISupports { * @param aTempFile The location of a temporary file; i.e. a file in which * the received data will be stored, but which is not * equal to the target file. (will be moved to the real - * target by the caller, when the download is finished) - * May be null. + * target by the DownloadManager, when the download is + * finished). This will be null for all callers except for + * nsExternalHelperAppHandler. Addons should generally pass + * null for aTempFile. This will be moved to the real target + * by the download manager when the download is finished, + * and the action indicated by aMIMEInfo will be executed. * * @param aCancelable An object that can be used to abort the download. * Must not be null. diff --git a/toolkit/content/tests/browser/common/mockTransfer.js b/toolkit/content/tests/browser/common/mockTransfer.js index 3189abc836d..c0add0f248a 100644 --- a/toolkit/content/tests/browser/common/mockTransfer.js +++ b/toolkit/content/tests/browser/common/mockTransfer.js @@ -52,7 +52,8 @@ MockTransfer.prototype = { onRefreshAttempted: function () {}, /* nsITransfer */ - init: function () {} + init: function() {}, + setSha256Hash: function() {} }; // Create an instance of a MockObjectRegisterer whose methods can be used to diff --git a/uriloader/base/nsITransfer.idl b/uriloader/base/nsITransfer.idl index 51bdaa953c3..e1db1c0af89 100644 --- a/uriloader/base/nsITransfer.idl +++ b/uriloader/base/nsITransfer.idl @@ -10,7 +10,7 @@ interface nsICancelable; interface nsIMIMEInfo; interface nsIFile; -[scriptable, uuid(08b0b78c-6d7d-4d97-86c9-be5a695813c9)] +[scriptable, uuid(b1c81100-9d66-11e2-9e96-0800200c9a66)] interface nsITransfer : nsIWebProgressListener2 { /** @@ -57,6 +57,14 @@ interface nsITransfer : nsIWebProgressListener2 { in nsIFile aTempFile, in nsICancelable aCancelable, in boolean aIsPrivate); + + /* + * Used to notify the transfer object of the hash of the downloaded file. + * Must be called on the main thread, only after the download has finished + * successfully. + * @param aHash The SHA-256 hash in raw bytes of the downloaded file. + */ + void setSha256Hash(in ACString aHash); }; %{C++ diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index dac4c4618f4..f0a384ed26c 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -141,8 +141,8 @@ PRLogModuleInfo* nsExternalHelperAppService::mLog = nullptr; // of PR_LOG_DEBUG (4), and we want less detailed output here // Using 3 instead of PR_LOG_WARN because we don't output warnings #undef LOG -#define LOG(args) PR_LOG(mLog, 3, args) -#define LOG_ENABLED() PR_LOG_TEST(mLog, 3) +#define LOG(args) PR_LOG(nsExternalHelperAppService::mLog, 3, args) +#define LOG_ENABLED() PR_LOG_TEST(nsExternalHelperAppService::mLog, 3) static const char NEVER_ASK_FOR_SAVE_TO_DISK_PREF[] = "browser.helperApps.neverAsk.saveToDisk"; @@ -1111,14 +1111,13 @@ nsExternalAppHandler::nsExternalAppHandler(nsIMIMEInfo * aMIMEInfo, , mForceSave(aForceSave) , mCanceled(false) , mShouldCloseWindow(false) -, mReceivedDispositionInfo(false) , mStopRequestIssued(false) -, mProgressListenerInitialized(false) , mReason(aReason) , mContentLength(-1) , mProgress(0) , mSaver(nullptr) -, mKeepRequestAlive(false) +, mDialogProgressListener(nullptr) +, mTransfer(nullptr) , mRequest(nullptr) , mExtProtSvc(aExtProtSvc) { @@ -1144,7 +1143,7 @@ nsExternalAppHandler::nsExternalAppHandler(nsIMIMEInfo * aMIMEInfo, mSuggestedFileName.ReplaceChar(unsafeBidiCharacters[i], '_'); mTempFileExtension.ReplaceChar(unsafeBidiCharacters[i], '_'); } - + // Make sure extension is correct. EnsureSuggestedFileName(); @@ -1157,25 +1156,10 @@ nsExternalAppHandler::~nsExternalAppHandler() } NS_IMETHODIMP nsExternalAppHandler::SetWebProgressListener(nsIWebProgressListener2 * aWebProgressListener) -{ - // this call back means we've successfully brought up the - // progress window so set the appropriate flag, even though - // aWebProgressListener might be null - - if (mReceivedDispositionInfo) - mProgressListenerInitialized = true; - - // Go ahead and register the progress listener.... - mWebProgressListener = aWebProgressListener; - - // while we were bringing up the progress dialog, we actually finished processing the - // url. If that's the case then mStopRequestIssued will be true. We need to execute the - // operation since we are actually done now. - if (mStopRequestIssued && aWebProgressListener) - { - return ExecuteDesiredAction(); - } - +{ + // This is always called by nsHelperDlg.js. Go ahead and register the + // progress listener. At this point, we don't have mTransfer. + mDialogProgressListener = aWebProgressListener; return NS_OK; } @@ -1213,13 +1197,6 @@ NS_IMETHODIMP nsExternalAppHandler::GetContentLength(int64_t *aContentLength) return NS_OK; } -NS_IMETHODIMP nsExternalAppHandler::CloseProgressWindow() -{ - // release extra state... - mWebProgressListener = nullptr; - return NS_OK; -} - void nsExternalAppHandler::RetargetLoadNotifications(nsIRequest *request) { // we are going to run the downloading of the helper app in our own little docloader / load group context. @@ -1400,6 +1377,10 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel * aChannel) return rv; } + rv = mSaver->EnableSha256(); + NS_ENSURE_SUCCESS(rv, rv); + LOG(("Enabled hashing")); + rv = mSaver->SetTarget(mTempFile, false); NS_ENSURE_SUCCESS(rv, rv); @@ -1594,25 +1575,18 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest *request, nsISuppo if (alwaysAsk) { - // do this first! make sure we don't try to take an action until the user tells us what they want to do - // with it... - mReceivedDispositionInfo = false; - mKeepRequestAlive = true; - // invoke the dialog!!!!! use mWindowContext as the window context parameter for the dialog request mDialog = do_CreateInstance( NS_HELPERAPPLAUNCHERDLG_CONTRACTID, &rv ); NS_ENSURE_SUCCESS(rv, rv); // this will create a reference cycle (the dialog holds a reference to us as - // nsIHelperAppLauncher), which will be broken in Cancel or - // CreateProgressListener. + // nsIHelperAppLauncher), which will be broken in Cancel or CreateTransfer. rv = mDialog->Show( this, mWindowContext, mReason ); // what do we do if the dialog failed? I guess we should call Cancel and abort the load.... } else { - mReceivedDispositionInfo = true; // no need to wait for a response from the user // We need to do the save/open immediately, then. #ifdef XP_WIN @@ -1657,8 +1631,8 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest *request, nsISuppo return NS_OK; } -// Convert error info into proper message text and send OnStatusChange notification -// to the web progress listener. +// Convert error info into proper message text and send OnStatusChange +// notification to the dialog progress listener or nsITransfer implementation. void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequest *aRequest, const nsAFlatString &path) { nsAutoString msgId; @@ -1724,7 +1698,7 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ } PR_LOG(nsExternalHelperAppService::mLog, PR_LOG_ERROR, ("Error: %s, type=%i, listener=0x%p, rv=0x%08X\n", - NS_LossyConvertUTF16toASCII(msgId).get(), type, mWebProgressListener.get(), rv)); + NS_LossyConvertUTF16toASCII(msgId).get(), type, mDialogProgressListener.get(), rv)); PR_LOG(nsExternalHelperAppService::mLog, PR_LOG_ERROR, (" path='%s'\n", NS_ConvertUTF16toUTF8(path).get())); @@ -1740,10 +1714,12 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ const PRUnichar *strings[] = { path.get() }; if(NS_SUCCEEDED(bundle->FormatStringFromName(msgId.get(), strings, 1, getter_Copies(msgText)))) { - if (mWebProgressListener) + if (mDialogProgressListener) { // We have a listener, let it handle the error. - mWebProgressListener->OnStatusChange(nullptr, (type == kReadError) ? aRequest : nullptr, rv, msgText); + mDialogProgressListener->OnStatusChange(nullptr, (type == kReadError) ? aRequest : nullptr, rv, msgText); + } else if (mTransfer) { + mTransfer->OnStatusChange(nullptr, (type == kReadError) ? aRequest : nullptr, rv, msgText); } else if (XRE_GetProcessType() == GeckoProcessType_Default) { @@ -1784,11 +1760,10 @@ nsExternalAppHandler::OnDataAvailable(nsIRequest *request, nsISupports * aCtxt, if (NS_SUCCEEDED(rv)) { // Send progress notification. - if (mWebProgressListener) - { - mWebProgressListener->OnProgressChange64(nullptr, request, mProgress, - mContentLength, mProgress, - mContentLength); + if (mTransfer) { + mTransfer->OnProgressChange64(nullptr, request, mProgress, + mContentLength, mProgress, + mContentLength); } } else @@ -1806,14 +1781,11 @@ nsExternalAppHandler::OnDataAvailable(nsIRequest *request, nsISupports * aCtxt, return rv; } -NS_IMETHODIMP nsExternalAppHandler::OnStopRequest(nsIRequest *request, nsISupports *aCtxt, +NS_IMETHODIMP nsExternalAppHandler::OnStopRequest(nsIRequest *request, nsISupports *aCtxt, nsresult aStatus) { mStopRequestIssued = true; - if (!mKeepRequestAlive) - mRequest = nullptr; - // Cancel if the request did not complete successfully. if (!mCanceled && NS_FAILED(aStatus)) { @@ -1844,12 +1816,15 @@ NS_IMETHODIMP nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver *aSaver, nsresult aStatus) { - // Free the reference that the saver keeps on us. - mSaver = nullptr; - if (mCanceled) return NS_OK; + // Save the hash + nsresult rv = mSaver->GetSha256Hash(mHash); + // Free the reference that the saver keeps on us, even if we couldn't get the + // hash. + mSaver = nullptr; + if (NS_FAILED(aStatus)) { nsAutoString path; mTempFile->GetPath(path); @@ -1859,55 +1834,46 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver *aSaver, return NS_OK; } - // Do what the user asked for - ExecuteDesiredAction(); - - // This nsITransfer object holds a reference to us (we are its observer), so - // we need to release the reference to break a reference cycle (and therefore - // to prevent leaking) - mWebProgressListener = nullptr; + // Notify the transfer object that we are done if the user has chosen an + // action. If the user hasn't chosen an action and InitializeDownload hasn't + // been called, the progress listener (nsITransfer) will be notified in + // CreateTransfer. + if (mTransfer) { + rv = NotifyTransfer(); + NS_ENSURE_SUCCESS(rv, rv); + } return NS_OK; } -nsresult nsExternalAppHandler::ExecuteDesiredAction() +nsresult nsExternalAppHandler::NotifyTransfer() { - nsresult rv = NS_OK; - if (mProgressListenerInitialized && !mCanceled) - { - rv = MoveFile(mFinalFileDestination); - if (NS_SUCCEEDED(rv)) - { - nsHandlerInfoAction action = nsIMIMEInfo::saveToDisk; - mMimeInfo->GetPreferredAction(&action); - if (action == nsIMIMEInfo::useHelperApp || - action == nsIMIMEInfo::useSystemDefault) - { - rv = OpenWithApplication(); - } - else if(action == nsIMIMEInfo::saveToDisk) - { - mExtProtSvc->FixFilePermissions(mFinalFileDestination); - } - } + MOZ_ASSERT(NS_IsMainThread(), "Must notify on main thread"); + MOZ_ASSERT(!mCanceled, "Can't notify if canceled or action " + "hasn't been chosen"); + MOZ_ASSERT(mTransfer, "We must have an nsITransfer"); - // Notify dialog that download is complete. - // By waiting till this point, it ensures that the progress dialog doesn't indicate - // success until we're really done. - if(mWebProgressListener) - { - if (!mCanceled) - { - mWebProgressListener->OnProgressChange64(nullptr, nullptr, mProgress, mContentLength, mProgress, mContentLength); - } - mWebProgressListener->OnStateChange(nullptr, nullptr, - nsIWebProgressListener::STATE_STOP | - nsIWebProgressListener::STATE_IS_REQUEST | - nsIWebProgressListener::STATE_IS_NETWORK, NS_OK); - } - } + LOG(("Notifying progress listener")); - return rv; + nsresult rv = mTransfer->SetSha256Hash(mHash); + NS_ENSURE_SUCCESS(rv, rv); + + rv = mTransfer->OnProgressChange64(nullptr, nullptr, mProgress, + mContentLength, mProgress, mContentLength); + NS_ENSURE_SUCCESS(rv, rv); + + rv = mTransfer->OnStateChange(nullptr, nullptr, + nsIWebProgressListener::STATE_STOP | + nsIWebProgressListener::STATE_IS_REQUEST | + nsIWebProgressListener::STATE_IS_NETWORK, NS_OK); + NS_ENSURE_SUCCESS(rv, rv); + + // This nsITransfer object holds a reference to us (we are its observer), so + // we need to release the reference to break a reference cycle (and therefore + // to prevent leaking) + mTransfer = nullptr; + + return NS_OK; } NS_IMETHODIMP nsExternalAppHandler::GetMIMEInfo(nsIMIMEInfo ** aMIMEInfo) @@ -1937,14 +1903,14 @@ nsresult nsExternalAppHandler::InitializeDownload(nsITransfer* aTransfer) nsCOMPtr target; rv = NS_NewFileURI(getter_AddRefs(target), mFinalFileDestination); - if (NS_FAILED(rv)) return rv; + NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr channel = do_QueryInterface(mRequest); rv = aTransfer->Init(mSourceUrl, target, EmptyString(), mMimeInfo, mTimeDownloadStarted, mTempFile, this, channel && NS_UsePrivateBrowsing(channel)); - if (NS_FAILED(rv)) return rv; + NS_ENSURE_SUCCESS(rv, rv); // Now let's add the download to history nsCOMPtr dh(do_GetService(NS_DOWNLOADHISTORY_CONTRACTID)); @@ -1963,31 +1929,38 @@ nsresult nsExternalAppHandler::InitializeDownload(nsITransfer* aTransfer) return rv; } -nsresult nsExternalAppHandler::CreateProgressListener() +nsresult nsExternalAppHandler::CreateTransfer() { - // we are back from the helper app dialog (where the user chooses to save or open), but we aren't - // done processing the load. in this case, throw up a progress dialog so the user can see what's going on... + // We are back from the helper app dialog (where the user chooses to save or + // open), but we aren't done processing the load. in this case, throw up a + // progress dialog so the user can see what's going on. // Also, release our reference to mDialog. We don't need it anymore, and we // need to break the reference cycle. mDialog = nullptr; + if (!mDialogProgressListener) { + NS_WARNING("The dialog should nullify the dialog progress listener"); + } nsresult rv; - - nsCOMPtr tr = do_CreateInstance(NS_TRANSFER_CONTRACTID, &rv); - if (NS_SUCCEEDED(rv)) - InitializeDownload(tr); - if (tr) - tr->OnStateChange(nullptr, mRequest, nsIWebProgressListener::STATE_START | - nsIWebProgressListener::STATE_IS_REQUEST | - nsIWebProgressListener::STATE_IS_NETWORK, NS_OK); + // We must be able to create an nsITransfer object. If not, it doesn't matter + // much that we can't launch the helper application or save to disk. + mTransfer = do_CreateInstance(NS_TRANSFER_CONTRACTID, &rv); + NS_ENSURE_SUCCESS(rv, rv); + rv = InitializeDownload(mTransfer); + NS_ENSURE_SUCCESS(rv, rv); - // note we might not have a listener here if the QI() failed, or if - // there is no nsITransfer object, but we still call - // SetWebProgressListener() to make sure our progress state is sane - // NOTE: This will set up a reference cycle (this nsITransfer has us set up as - // its observer). This cycle will be broken in Cancel, CloseProgressWindow or - // OnStopRequest. - SetWebProgressListener(tr); + rv = mTransfer->OnStateChange(nullptr, mRequest, + nsIWebProgressListener::STATE_START | + nsIWebProgressListener::STATE_IS_REQUEST | + nsIWebProgressListener::STATE_IS_NETWORK, NS_OK); + NS_ENSURE_SUCCESS(rv, rv); + + // While we were bringing up the progress dialog, we actually finished + // processing the url. If that's the case then mStopRequestIssued will be + // true and OnSaveComplete has been called. + if (mStopRequestIssued && !mSaver) { + return NotifyTransfer(); + } mRequest = nullptr; @@ -2049,68 +2022,9 @@ void nsExternalAppHandler::RequestSaveDestination(const nsAFlatString &aDefaultF } } -nsresult nsExternalAppHandler::MoveFile(nsIFile * aNewFileLocation) -{ - nsresult rv = NS_OK; - NS_ASSERTION(mStopRequestIssued, "uhoh, how did we get here if we aren't done getting data?"); - - // if the on stop request was actually issued then it's now time to actually perform the file move.... - if (mStopRequestIssued && aNewFileLocation) - { - // Unfortunately, MoveTo will fail if a file already exists at the user specified location.... - // but the user has told us, this is where they want the file! (when we threw up the save to file dialog, - // it told them the file already exists and do they wish to over write it. So it should be okay to delete - // fileToUse if it already exists. - bool equalToTempFile = false; - bool filetoUseAlreadyExists = false; - aNewFileLocation->Equals(mTempFile, &equalToTempFile); - aNewFileLocation->Exists(&filetoUseAlreadyExists); - if (filetoUseAlreadyExists && !equalToTempFile) - aNewFileLocation->Remove(false); - - // extract the new leaf name from the file location - nsAutoString fileName; - aNewFileLocation->GetLeafName(fileName); - nsCOMPtr directoryLocation; - rv = aNewFileLocation->GetParent(getter_AddRefs(directoryLocation)); - if (directoryLocation) - { - rv = mTempFile->MoveTo(directoryLocation, fileName); - } - if (NS_FAILED(rv)) - { - // Send error notification. - nsAutoString path; - aNewFileLocation->GetPath(path); - SendStatusChange(kWriteError, rv, nullptr, path); - Cancel(rv); // Cancel (and clean up temp file). - } -#if defined(XP_OS2) - else - { - // tag the file with its source URI - nsCOMPtr localFileOS2 = do_QueryInterface(aNewFileLocation); - if (localFileOS2) - { - nsAutoCString url; - mSourceUrl->GetSpec(url); - localFileOS2->SetFileSource(url); - } - } -#endif - } - - return rv; -} - // SaveToDisk should only be called by the helper app dialog which allows -// the user to say launch with application or save to disk. It doesn't actually -// perform the save, it just prompts for the destination file name. The actual save -// won't happen until we are done downloading the content and are sure we've -// shown a progress dialog. This was done to simplify the -// logic that was showing up in this method. Internal callers who actually want -// to preform the save should call ::MoveFile - +// the user to say launch with application or save to disk. It doesn't actually +// perform the save, it just prompts for the destination file name. NS_IMETHODIMP nsExternalAppHandler::SaveToDisk(nsIFile * aNewFileLocation, bool aRememberThisPreference) { if (mCanceled) @@ -2118,9 +2032,6 @@ NS_IMETHODIMP nsExternalAppHandler::SaveToDisk(nsIFile * aNewFileLocation, bool mMimeInfo->SetPreferredAction(nsIMIMEInfo::saveToDisk); - // The helper app dialog has told us what to do. - mReceivedDispositionInfo = true; - if (!aNewFileLocation) { if (mSuggestedFileName.IsEmpty()) RequestSaveDestination(mTempLeafName, mTempFileExtension); @@ -2143,6 +2054,9 @@ NS_IMETHODIMP nsExternalAppHandler::SaveToDisk(nsIFile * aNewFileLocation, bool } nsresult nsExternalAppHandler::ContinueSave(nsIFile * aNewFileLocation) { + if (mCanceled) + return NS_OK; + NS_PRECONDITION(aNewFileLocation, "Must be called with a non-null file"); nsresult rv = NS_OK; @@ -2150,9 +2064,10 @@ nsresult nsExternalAppHandler::ContinueSave(nsIFile * aNewFileLocation) mFinalFileDestination = do_QueryInterface(fileToUse); // Move what we have in the final directory, but append .part - // to it, to indicate that it's unfinished. - // do not do that if we're already done - if (mFinalFileDestination && !mStopRequestIssued) + // to it, to indicate that it's unfinished. Do not call SetTarget on the + // saver if we are done (Finish has been called) but OnSaverComplete has not + // been called. + if (mFinalFileDestination && mSaver && !mStopRequestIssued) { nsCOMPtr movedFile; mFinalFileDestination->Clone(getter_AddRefs(movedFile)); @@ -2163,97 +2078,36 @@ nsresult nsExternalAppHandler::ContinueSave(nsIFile * aNewFileLocation) name.AppendLiteral(".part"); movedFile->SetLeafName(name); - if (mSaver) - { - rv = mSaver->SetTarget(movedFile, true); - if (NS_FAILED(rv)) { - nsAutoString path; - mTempFile->GetPath(path); - SendStatusChange(kWriteError, rv, nullptr, path); - Cancel(rv); - return NS_OK; - } + rv = mSaver->SetTarget(movedFile, true); + if (NS_FAILED(rv)) { + nsAutoString path; + mTempFile->GetPath(path); + SendStatusChange(kWriteError, rv, nullptr, path); + Cancel(rv); + return NS_OK; } mTempFile = movedFile; } } - if (!mProgressListenerInitialized) - CreateProgressListener(); + // The helper app dialog has told us what to do and we have a final file + // destination. + CreateTransfer(); // now that the user has chosen the file location to save to, it's okay to fire the refresh tag // if there is one. We don't want to do this before the save as dialog goes away because this dialog // is modal and we do bad things if you try to load a web page in the underlying window while a modal - // dialog is still up. + // dialog is still up. ProcessAnyRefreshTags(); return NS_OK; } -nsresult nsExternalAppHandler::OpenWithApplication() -{ - nsresult rv = NS_OK; - if (mCanceled) - return NS_OK; - - // we only should have gotten here if the on stop request had been fired already. - - NS_ASSERTION(mStopRequestIssued, "uhoh, how did we get here if we aren't done getting data?"); - // if a stop request was already issued then proceed with launching the application. - if (mStopRequestIssued) - { - - // Note for the default value: - // Mac users have been very verbal about temp files being deleted on - // app exit - they don't like it - but we'll continue to do this on - // other platforms for now. - bool deleteTempFileOnExit = - Preferences::GetBool("browser.helperApps.deleteTempFileOnExit", -#if !defined(XP_MACOSX) - true); -#else - false); -#endif - - // See whether the channel has been opened in private browsing mode - NS_ASSERTION(mRequest, "This should never be called with a null request"); - nsCOMPtr channel = do_QueryInterface(mRequest); - bool inPrivateBrowsing = channel && NS_UsePrivateBrowsing(channel); - - // make the tmp file readonly so users won't edit it and lose the changes - // only if we're going to delete the file - if (deleteTempFileOnExit || inPrivateBrowsing) - mFinalFileDestination->SetPermissions(0400); - - rv = mMimeInfo->LaunchWithFile(mFinalFileDestination); - if (NS_FAILED(rv)) - { - // Send error notification. - nsAutoString path; - mFinalFileDestination->GetPath(path); - SendStatusChange(kLaunchError, rv, nullptr, path); - Cancel(rv); // Cancel, and clean up temp file. - } - // Always schedule files to be deleted at the end of the private browsing - // mode, regardless of the value of the pref. - else if (deleteTempFileOnExit) { - mExtProtSvc->DeleteTemporaryFileOnExit(mFinalFileDestination); - } - else if (inPrivateBrowsing) { - mExtProtSvc->DeleteTemporaryPrivateFileWhenPossible(mFinalFileDestination); - } - } - - return rv; -} - -// LaunchWithApplication should only be called by the helper app dialog which allows -// the user to say launch with application or save to disk. It doesn't actually -// perform launch with application. That won't happen until we are done downloading -// the content and are sure we've shown a progress dialog. This was done to simplify the -// logic that was showing up in this method. +// LaunchWithApplication should only be called by the helper app dialog which +// allows the user to say launch with application or save to disk. It doesn't +// actually perform launch with application. NS_IMETHODIMP nsExternalAppHandler::LaunchWithApplication(nsIFile * aApplication, bool aRememberThisPreference) { if (mCanceled) @@ -2262,7 +2116,6 @@ NS_IMETHODIMP nsExternalAppHandler::LaunchWithApplication(nsIFile * aApplication // user has chosen to launch using an application, fire any refresh tags now... ProcessAnyRefreshTags(); - mReceivedDispositionInfo = true; if (mMimeInfo && aApplication) { PlatformLocalHandlerApp_t *handlerApp = new PlatformLocalHandlerApp_t(EmptyString(), aApplication); @@ -2292,12 +2145,13 @@ NS_IMETHODIMP nsExternalAppHandler::LaunchWithApplication(nsIFile * aApplication return rv; } - // Now that the user has elected to launch the downloaded file with a helper app, we're justified in - // removing the 'salted' name. We'll rename to what was specified in mSuggestedFileName after the - // download is done prior to launching the helper app. So that any existing file of that name won't - // be overwritten we call CreateUnique() before calling MoveFile(). Also note that we use the same - // directory as originally downloaded to so that MoveFile() just does an in place rename. - + // Now that the user has elected to launch the downloaded file with a helper + // app, we're justified in removing the 'salted' name. We'll rename to what + // was specified in mSuggestedFileName after the download is done prior to + // launching the helper app. So that any existing file of that name won't be + // overwritten we call CreateUnique(). Also note that we use the same + // directory as originally downloaded so nsDownload can rename in place + // later. nsCOMPtr fileToUse; (void) GetDownloadDirectory(getter_AddRefs(fileToUse)); @@ -2318,8 +2172,7 @@ NS_IMETHODIMP nsExternalAppHandler::LaunchWithApplication(nsIFile * aApplication { mFinalFileDestination = do_QueryInterface(fileToUse); // launch the progress window now that the user has picked the desired action. - if (!mProgressListenerInitialized) - CreateProgressListener(); + CreateTransfer(); } else { @@ -2340,8 +2193,10 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) // XXX should not ignore the reason mCanceled = true; - if (mSaver) + if (mSaver) { mSaver->Finish(aReason); + mSaver = nullptr; + } // Break our reference cycle with the helper app dialog (set up in // OnStartRequest) @@ -2351,7 +2206,8 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) // Release the listener, to break the reference cycle with it (we are the // observer of the listener). - mWebProgressListener = nullptr; + mDialogProgressListener = nullptr; + mTransfer = nullptr; return NS_OK; } diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h index dce286d5222..415c8820502 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.h +++ b/uriloader/exthandler/nsExternalHelperAppService.h @@ -282,12 +282,9 @@ protected: bool mShouldCloseWindow; /** - * have we received information from the user about how they want to - * dispose of this content + * True if a stop request has been issued. */ - bool mReceivedDispositionInfo; bool mStopRequestIssued; - bool mProgressListenerInitialized; bool mIsFileChannel; @@ -323,6 +320,11 @@ protected: */ nsCOMPtr mSaver; + /** + * Stores the SHA-256 hash associated with the file that we downloaded. + */ + nsAutoCString mHash; + /** * Creates the temporary file for the download and an output stream for it. * Upon successful return, both mTempFile and mSaver will be valid. @@ -336,12 +338,10 @@ protected: */ void RetargetLoadNotifications(nsIRequest *request); /** - * If the user tells us how they want to dispose of the content and - * we still haven't finished downloading while they were deciding, - * then create a progress listener of some kind so they know - * what's going on... + * Once the user tells us how they want to dispose of the content + * create an nsITransfer so they know what's going on... */ - nsresult CreateProgressListener(); + nsresult CreateTransfer(); /* @@ -380,23 +380,11 @@ protected: */ void ProcessAnyRefreshTags(); - /** - * An internal method used to actually move the temp file to the final - * destination once we done receiving data AND have showed the progress dialog - */ - nsresult MoveFile(nsIFile * aNewFileLocation); /** - * An internal method used to actually launch a helper app given the temp file - * once we are done receiving data AND have showed the progress dialog. - * Uses the application specified in the mime info. + * Notify our nsITransfer object that we are done with the download. */ - nsresult OpenWithApplication(); - - /** - * Helper routine which peaks at the mime action specified by mMimeInfo - * and calls either MoveFile or OpenWithApplication - */ - nsresult ExecuteDesiredAction(); + nsresult NotifyTransfer(); + /** * Helper routine that searches a pref string for a given mime type */ @@ -427,7 +415,17 @@ protected: */ nsresult MaybeCloseWindow(); - nsCOMPtr mWebProgressListener; + /** + * Set in nsHelperDlgApp.js. This is always null after the user has chosen an + * action. + */ + nsCOMPtr mDialogProgressListener; + /** + * Set once the user has chosen an action. This is null after the download + * has been canceled or completes. + */ + nsCOMPtr mTransfer; + nsCOMPtr mOriginalChannel; /**< in the case of a redirect, this will be the pre-redirect channel. */ nsCOMPtr mDialog; diff --git a/uriloader/exthandler/nsIExternalHelperAppService.idl b/uriloader/exthandler/nsIExternalHelperAppService.idl index 6d2146c4688..624a75b06f4 100644 --- a/uriloader/exthandler/nsIExternalHelperAppService.idl +++ b/uriloader/exthandler/nsIExternalHelperAppService.idl @@ -96,14 +96,16 @@ interface nsIHelperAppLauncher : nsICancelable readonly attribute AString suggestedFileName; /** - * Called when we want to just save the content to a particular file. - * NOTE: This will release the reference to the nsIHelperAppLauncherDialog. - * @param aNewFileLocation Location where the content should be saved + * Saves the final destination of the file. Does not actually perform the + * save. + * NOTE: This will release the reference to the + * nsIHelperAppLauncherDialog. */ void saveToDisk(in nsIFile aNewFileLocation, in boolean aRememberThisPreference); /** - * Use aApplication to launch with this content. + * Remembers that aApplication should be used to launch this content. Does + * not actually launch the application. * NOTE: This will release the reference to the nsIHelperAppLauncherDialog. * @param aApplication nsIFile corresponding to the location of the application to use. * @param aRememberThisPreference TRUE if we should remember this choice. @@ -125,12 +127,6 @@ interface nsIHelperAppLauncher : nsICancelable */ void setWebProgressListener(in nsIWebProgressListener2 aWebProgressListener); - /** - * when the stand alone progress window actually closes, it calls this method - * so we can release any local state... - */ - void closeProgressWindow(); - /** * The file we are saving to */ From 76625edbd24fb8b4c1801b9c08ed1c62e020578f Mon Sep 17 00:00:00 2001 From: Axel Hecht Date: Tue, 4 Jun 2013 19:02:52 +0200 Subject: [PATCH 02/23] bug 878568, localize a11y strings on android, r=marco.zehe --- mobile/android/locales/jar.mn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mobile/android/locales/jar.mn b/mobile/android/locales/jar.mn index 9d65478ad0b..9ebbb7eb144 100644 --- a/mobile/android/locales/jar.mn +++ b/mobile/android/locales/jar.mn @@ -61,6 +61,8 @@ relativesrcdir toolkit/locales: relativesrcdir dom/locales: locale/@AB_CD@/browser/overrides/charsetTitles.properties (%chrome/charsetTitles.properties) locale/@AB_CD@/browser/overrides/global.dtd (%chrome/global.dtd) + locale/@AB_CD@/browser/overrides/AccessFu.properties (%chrome/accessibility/AccessFu.properties) % override chrome://global/locale/charsetTitles.properties chrome://browser/locale/overrides/charsetTitles.properties % override chrome://global/locale/global.dtd chrome://browser/locale/overrides/global.dtd +% override chrome://global/locale/AccessFu.properties chrome://browser/locale/overrides/AccessFu.properties From bbc7f8908d6f86eeddc94fa65059067b9fa57f34 Mon Sep 17 00:00:00 2001 From: Jonathan Griffin Date: Tue, 4 Jun 2013 10:01:46 -0700 Subject: [PATCH 03/23] Bug 873538 - Pass -marionette when launching Firefox, r=dburns --- testing/marionette/client/marionette/geckoinstance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/marionette/client/marionette/geckoinstance.py b/testing/marionette/client/marionette/geckoinstance.py index 00accf5def8..407970ea7c2 100644 --- a/testing/marionette/client/marionette/geckoinstance.py +++ b/testing/marionette/client/marionette/geckoinstance.py @@ -38,7 +38,7 @@ class GeckoInstance(object): self.runner = runner_class.create( binary=self.bin, profile_args=profile_args, - cmdargs=['-no-remote'], + cmdargs=['-no-remote', '-marionette'], kp_kwargs={ 'processOutputLine': [NullOutput()], 'logfile': self.gecko_log}) From 605334575c43be8741d98854c1c4bf0eba7b86f2 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Tue, 4 Jun 2013 10:30:11 -0700 Subject: [PATCH 04/23] Bug 877862 - Propagate exceptions from PrepareForWrapping. r=mrbkap --- js/xpconnect/wrappers/WrapperFactory.cpp | 38 ++++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/js/xpconnect/wrappers/WrapperFactory.cpp b/js/xpconnect/wrappers/WrapperFactory.cpp index 83a84d8c41a..87c982b2026 100644 --- a/js/xpconnect/wrappers/WrapperFactory.cpp +++ b/js/xpconnect/wrappers/WrapperFactory.cpp @@ -297,26 +297,26 @@ WrapperFactory::PrepareForWrapping(JSContext *cx, HandleObject scope, nsXPConnect::XPConnect()->WrapNativeToJSVal(cx, wrapScope, wn->Native(), nullptr, &NS_GET_IID(nsISupports), false, v.address(), getter_AddRefs(holder)); - if (NS_SUCCEEDED(rv)) { - obj = JSVAL_TO_OBJECT(v); - NS_ASSERTION(IS_WN_WRAPPER(obj), "bad object"); + NS_ENSURE_SUCCESS(rv, nullptr); - // Because the underlying native didn't have a PreCreate hook, we had - // to a new (or possibly pre-existing) XPCWN in our compartment. - // This could be a problem for chrome code that passes XPCOM objects - // across compartments, because the effects of QI would disappear across - // compartments. - // - // So whenever we pull an XPCWN across compartments in this manner, we - // give the destination object the union of the two native sets. We try - // to do this cleverly in the common case to avoid too much overhead. - XPCWrappedNative *newwn = static_cast(xpc_GetJSPrivate(obj)); - XPCNativeSet *unionSet = XPCNativeSet::GetNewOrUsed(ccx, newwn->GetSet(), - wn->GetSet(), false); - if (!unionSet) - return nullptr; - newwn->SetSet(unionSet); - } + obj = JSVAL_TO_OBJECT(v); + NS_ASSERTION(IS_WN_WRAPPER(obj), "bad object"); + + // Because the underlying native didn't have a PreCreate hook, we had + // to a new (or possibly pre-existing) XPCWN in our compartment. + // This could be a problem for chrome code that passes XPCOM objects + // across compartments, because the effects of QI would disappear across + // compartments. + // + // So whenever we pull an XPCWN across compartments in this manner, we + // give the destination object the union of the two native sets. We try + // to do this cleverly in the common case to avoid too much overhead. + XPCWrappedNative *newwn = static_cast(xpc_GetJSPrivate(obj)); + XPCNativeSet *unionSet = XPCNativeSet::GetNewOrUsed(ccx, newwn->GetSet(), + wn->GetSet(), false); + if (!unionSet) + return nullptr; + newwn->SetSet(unionSet); return DoubleWrap(cx, obj, flags); } From ab3d041aa6d285204712da36411b57c2b8d5984a Mon Sep 17 00:00:00 2001 From: Malini Das Date: Tue, 4 Jun 2013 13:47:53 -0400 Subject: [PATCH 05/23] Bug 878910 - fix touchlists for 'touchend' and 'touchcancel', r=jgriffin --- testing/marionette/marionette-listener.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/marionette/marionette-listener.js b/testing/marionette/marionette-listener.js index 9b1852e2040..310c504bfe5 100644 --- a/testing/marionette/marionette-listener.js +++ b/testing/marionette/marionette-listener.js @@ -894,11 +894,11 @@ function emitMultiEvents(type, touch, touches) { let win = doc.defaultView; // touches that are in the same document let documentTouches = doc.createTouchList(touches.filter(function(t) { - return t.target.ownerDocument === doc; + return ((t.target.ownerDocument === doc) && (type != 'touchcancel')); })); // touches on the same target let targetTouches = doc.createTouchList(touches.filter(function(t) { - return t.target === target; + return ((t.target === target) && ((type != 'touchcancel') || (type != 'touchend'))); })); // Create changed touches let changedTouches = doc.createTouchList(touch); From 3423a421827dfee81c4f1b9e2423eb8dcbed9d4a Mon Sep 17 00:00:00 2001 From: Jeff Hammel Date: Tue, 4 Jun 2013 10:52:58 -0700 Subject: [PATCH 06/23] Bug 877733 - bump mozinfo, mozprocess, mozdevice, mozinstall version and mirror to m-c;r=jmaher --HG-- extra : rebase_source : d8a76eed73309af2bbd696544e667ae104bf22a8 --- testing/mozbase/generate_diff.py | 9 ++- testing/mozbase/mozcrash/setup.py | 2 +- testing/mozbase/mozinfo/README.md | 62 ------------------- testing/mozbase/mozinfo/mozinfo/__init__.py | 49 +++++++++++++++ testing/mozbase/mozinfo/mozinfo/mozinfo.py | 46 +++++++------- testing/mozbase/mozinfo/setup.py | 17 ++--- testing/mozbase/mozinstall/README.md | 60 ------------------ testing/mozbase/mozinstall/setup.py | 13 ++-- testing/mozbase/mozprocess/setup.py | 2 +- .../mozprocess/tests/iniparser/Makefile | 2 +- testing/mozbase/mozprocess/tests/manifest.ini | 2 +- 11 files changed, 92 insertions(+), 172 deletions(-) delete mode 100644 testing/mozbase/mozinfo/README.md delete mode 100644 testing/mozbase/mozinstall/README.md diff --git a/testing/mozbase/generate_diff.py b/testing/mozbase/generate_diff.py index e986f79d0a2..3020d9a93df 100755 --- a/testing/mozbase/generate_diff.py +++ b/testing/mozbase/generate_diff.py @@ -147,7 +147,9 @@ def parse_versions(*args): return retval def version_tag(directory, version): - return '%s-%s' % (directory, version) + """return a version tag string given the directory name of the package""" + package = current_package_info[directory]['name'] + return '%s-%s' % (package, version) def setup(**kwargs): """monkey-patch function for setuptools.setup""" @@ -321,7 +323,7 @@ def main(args=sys.argv[1:]): tag = version_tag(directory, version) if tag not in _tags: - error("Tag for '%s' -- %s -- not in tags") + error("Tag for '%s' -- %s -- not in tags:\n%s" % (directory, version, '\n'.join(sorted(_tags)))) # ensure that the versions to mirror are compatible with what is in m-c old_package_info = current_package_info.copy() @@ -376,7 +378,8 @@ def main(args=sys.argv[1:]): finally: # cleanup - revert(hg_root, untracked) + if options.check: + revert(hg_root, untracked) shutil.rmtree(tempdir) print "Diff at %s" % output diff --git a/testing/mozbase/mozcrash/setup.py b/testing/mozbase/mozcrash/setup.py index 0b20106d0e5..d4a674e160e 100644 --- a/testing/mozbase/mozcrash/setup.py +++ b/testing/mozbase/mozcrash/setup.py @@ -4,7 +4,7 @@ from setuptools import setup -PACKAGE_VERSION = '0.6' +PACKAGE_VERSION = '0.7' # dependencies deps = ['mozfile >= 0.3', diff --git a/testing/mozbase/mozinfo/README.md b/testing/mozbase/mozinfo/README.md deleted file mode 100644 index ab3803521d7..00000000000 --- a/testing/mozbase/mozinfo/README.md +++ /dev/null @@ -1,62 +0,0 @@ -Throughout [mozmill](https://developer.mozilla.org/en/Mozmill) -and other Mozilla python code, checking the underlying -platform is done in many different ways. The various checks needed -lead to a lot of copy+pasting, leaving the reader to wonder....is this -specific check necessary for (e.g.) an operating system? Because -information is not consolidated, checks are not done consistently, nor -is it defined what we are checking for. - -[MozInfo](https://github.com/mozilla/mozbase/tree/master/mozinfo) -proposes to solve this problem. MozInfo is a bridge interface, -making the underlying (complex) plethora of OS and architecture -combinations conform to a subset of values of relavence to -Mozilla software. The current implementation exposes relavent key, -values: `os`, `version`, `bits`, and `processor`. Additionally, the -service pack in use is available on the windows platform. - - -# API Usage - -MozInfo is a python package. Downloading the software and running -`python setup.py develop` will allow you to do `import mozinfo` -from python. -[mozinfo.py](https://github.com/mozilla/mozbase/blob/master/mozinfo/mozinfo.py) -is the only file contained is this package, -so if you need a single-file solution, you can just download or call -this file through the web. - -The top level attributes (`os`, `version`, `bits`, `processor`) are -available as module globals: - - if mozinfo.os == 'win': ... - -In addition, mozinfo exports a dictionary, `mozinfo.info`, that -contain these values. mozinfo also exports: - -- `choices`: a dictionary of possible values for os, bits, and - processor -- `main`: the console_script entry point for mozinfo -- `unknown`: a singleton denoting a value that cannot be determined - -`unknown` has the string representation `"UNKNOWN"`. unknown will evaluate -as `False` in python: - - if not mozinfo.os: ... # unknown! - - -# Command Line Usage - -MozInfo comes with a command line, `mozinfo` which may be used to -diagnose one's current system. - -Example output: - - os: linux - version: Ubuntu 10.10 - bits: 32 - processor: x86 - -Three of these fields, os, bits, and processor, have a finite set of -choices. You may display the value of these choices using -`mozinfo --os`, `mozinfo --bits`, and `mozinfo --processor`. -`mozinfo --help` documents command-line usage. diff --git a/testing/mozbase/mozinfo/mozinfo/__init__.py b/testing/mozbase/mozinfo/mozinfo/__init__.py index 8549fba3146..8d293c128ee 100644 --- a/testing/mozbase/mozinfo/mozinfo/__init__.py +++ b/testing/mozbase/mozinfo/mozinfo/__init__.py @@ -2,4 +2,53 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. +""" +interface to transform introspected system information to a format palatable to +Mozilla + +Module variables: + +.. attribute:: bits + + 32 or 64 + +.. attribute:: isBsd + + Returns ``True`` if the operating system is BSD + +.. attribute:: isLinux + + Returns ``True`` if the operating system is Linux + +.. attribute:: isMac + + Returns ``True`` if the operating system is Mac + +.. attribute:: isWin + + Returns ``True`` if the operating system is Windows + +.. attribute:: os + + Operating system [``'win'``, ``'mac'``, ``'linux'``, ...] + +.. attribute:: processor + + Processor architecture [``'x86'``, ``'x86_64'``, ``'ppc'``, ...] + +.. attribute:: version + + Operating system version string. For windows, the service pack information is also included + +.. attribute:: info + + Returns information identifying the current system. + + * :attr:`bits` + * :attr:`os` + * :attr:`processor` + * :attr:`version` + +""" + from mozinfo import * diff --git a/testing/mozbase/mozinfo/mozinfo/mozinfo.py b/testing/mozbase/mozinfo/mozinfo/mozinfo.py index 87402f1c0e1..e77cebfb652 100755 --- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py +++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py @@ -4,19 +4,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. -""" -file for interface to transform introspected system information to a format -pallatable to Mozilla - -Information: -- os : what operating system ['win', 'mac', 'linux', ...] -- bits : 32 or 64 -- processor : processor architecture ['x86', 'x86_64', 'ppc', ...] -- version : operating system version string - -For windows, the service pack information is also included -""" - # TODO: it might be a good idea of adding a system name (e.g. 'Ubuntu' for # linux) to the information; I certainly wouldn't want anyone parsing this # information and having behaviour depend on it @@ -26,6 +13,13 @@ import platform import re import sys +try: + import json +except ImportError: + import simplejson as json + +import mozfile + # keep a copy of the os module since updating globals overrides this _os = os @@ -58,7 +52,10 @@ if system in ["Microsoft", "Windows"]: service_pack = os.sys.getwindowsversion()[4] info['service_pack'] = service_pack elif system == "Linux": - (distro, version, codename) = platform.dist() + if hasattr(platform, "linux_distribution"): + (distro, version, codename) = platform.linux_distribution() + else: + (distro, version, codename) = platform.dist() version = "%s %s" % (distro, version) if not processor: processor = machine @@ -111,7 +108,15 @@ def sanitize(info): # method for updating information def update(new_info): - """update the info""" + """Update the info. + new_info can either be a dict or a path/url + to a json file containing a dict.""" + + if isinstance(new_info, basestring): + f = mozfile.load(new_info) + new_info = json.loads(f.read()) + f.close() + info.update(new_info) sanitize(info) globals().update(info) @@ -144,21 +149,12 @@ def main(args=None): # args are JSON blobs to override info if args: - try: - from json import loads - except ImportError: - try: - from simplejson import loads - except ImportError: - def loads(string): - """*really* simple json; will not work with unicode""" - return eval(string, {'true': True, 'false': False, 'null': None}) for arg in args: if _os.path.exists(arg): string = file(arg).read() else: string = arg - update(loads(string)) + update(json.loads(string)) # print out choices if requested flag = False diff --git a/testing/mozbase/mozinfo/setup.py b/testing/mozbase/mozinfo/setup.py index 16ae2913d5c..0080ee059a7 100644 --- a/testing/mozbase/mozinfo/setup.py +++ b/testing/mozbase/mozinfo/setup.py @@ -2,21 +2,12 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. - -import os from setuptools import setup -PACKAGE_VERSION = '0.4' - -# get documentation from the README -try: - here = os.path.dirname(os.path.abspath(__file__)) - description = file(os.path.join(here, 'README.md')).read() -except (OSError, IOError): - description = '' +PACKAGE_VERSION = '0.5' # dependencies -deps = [] +deps = ['mozfile >= 0.6'] try: import json except ImportError: @@ -24,8 +15,8 @@ except ImportError: setup(name='mozinfo', version=PACKAGE_VERSION, - description="file for interface to transform introspected system information to a format pallatable to Mozilla", - long_description=description, + description="Library to get system information for use in Mozilla testing", + long_description="see http://mozbase.readthedocs.org", classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='mozilla', author='Mozilla Automation and Testing Team', diff --git a/testing/mozbase/mozinstall/README.md b/testing/mozbase/mozinstall/README.md deleted file mode 100644 index bc034c6a1a1..00000000000 --- a/testing/mozbase/mozinstall/README.md +++ /dev/null @@ -1,60 +0,0 @@ -[Mozinstall](https://github.com/mozilla/mozbase/tree/master/mozinstall) is a -python package for installing and uninstalling Mozilla applications on -various platforms. - -For example, depending on the platform, Firefox can be distributed as a -zip, tar.bz2, exe, or dmg file or cloned from a repository. Mozinstall takes -the hassle out of extracting and/or running these files and for convenience -returns the full path to the install directory. In the case that mozinstall -is invoked from the command line, the binary path will be printed to stdout. - -To remove an installed application the uninstaller can be used. It requires -the installation path of the application and will remove all the installed -files. On Windows the uninstaller will be tried first. - -# Usage -Mozinstall can be used as API or via the CLI commands. - -## API -An application can be installed by running the commands below. The install -method will return the installation path of the application. - - import mozinstall - path = mozinstall.install(%installer%, %install_folder%) - -To retrieve the real binary call get_binary with the path and -the application name as arguments: - - mozinstall.get_binary(path, 'firefox') - -If the application is not needed anymore the uninstaller will remove all -traces from the system: - - mozinstall.uninstall(path) - -## CLI -The installer can also be used as a command line tool: - - $ mozinstall -d firefox %installer% - -Whereby the directory option is optional and will default to the current -working directory. If the installation was successful the path to the -binary will be printed to stdout. - -Also the uninstaller can be called via the command line: - - $ mozuninstall %install_path% - -# Error Handling - -Mozinstall throws different types of exceptions: - -- mozinstall.InstallError is thrown when the installation fails for any reason. A traceback is provided. -- mozinstall.InvalidBinary is thrown when the binary cannot be found. -- mozinstall.InvalidSource is thrown when the source is not a recognized file type (zip, exe, tar.bz2, tar.gz, dmg). - - -# Dependencies - -Mozinstall depends on the [mozinfo](https://github.com/mozilla/mozbase/tree/master/mozinfo) -package which is also found in the mozbase repository. diff --git a/testing/mozbase/mozinstall/setup.py b/testing/mozbase/mozinstall/setup.py index 13fa8c5b167..9c14f033c7f 100644 --- a/testing/mozbase/mozinstall/setup.py +++ b/testing/mozbase/mozinstall/setup.py @@ -11,17 +11,16 @@ try: except IOError: description = None -PACKAGE_VERSION = '1.4' +PACKAGE_VERSION = '1.6' -deps = ['mozinfo == 0.4', +deps = ['mozinfo >= 0.4', 'mozfile' ] setup(name='mozInstall', version=PACKAGE_VERSION, - description="This is a utility package for installing and uninstalling " - "Mozilla applications on various platforms.", - long_description=description, + description="package for installing and uninstalling Mozilla applications", + long_description="see http://mozbase.readthedocs.org/", # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=['Environment :: Console', 'Intended Audience :: Developers', @@ -40,10 +39,14 @@ setup(name='mozInstall', include_package_data=True, zip_safe=False, install_requires=deps, + # we have to generate two more executables for those systems that cannot run as Administrator + # and the filename containing "install" triggers the UAC entry_points=""" # -*- Entry points: -*- [console_scripts] mozinstall = mozinstall:install_cli mozuninstall = mozinstall:uninstall_cli + moz_add_to_system = mozinstall:install_cli + moz_remove_from_system = mozinstall:uninstall_cli """, ) diff --git a/testing/mozbase/mozprocess/setup.py b/testing/mozbase/mozprocess/setup.py index 83de82b0ed4..e284fa154ad 100644 --- a/testing/mozbase/mozprocess/setup.py +++ b/testing/mozbase/mozprocess/setup.py @@ -4,7 +4,7 @@ from setuptools import setup -PACKAGE_VERSION = '0.10' +PACKAGE_VERSION = '0.11' setup(name='mozprocess', version=PACKAGE_VERSION, diff --git a/testing/mozbase/mozprocess/tests/iniparser/Makefile b/testing/mozbase/mozprocess/tests/iniparser/Makefile index a6b443c8cfd..48c86f9d6af 100644 --- a/testing/mozbase/mozprocess/tests/iniparser/Makefile +++ b/testing/mozbase/mozprocess/tests/iniparser/Makefile @@ -27,7 +27,7 @@ ifeq ($(UNAME), Darwin) AR = ar ARFLAGS = rcv SHLD = libtool - CFLAGS = -v -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fPIC -Wall -ansi -pedantic + CFLAGS = -v -arch i386 -fPIC -Wall -ansi -pedantic LDFLAGS = -arch_only i386 endif ifeq ($(WIN32), 1) diff --git a/testing/mozbase/mozprocess/tests/manifest.ini b/testing/mozbase/mozprocess/tests/manifest.ini index 3fdadf47567..1a086edeb96 100644 --- a/testing/mozbase/mozprocess/tests/manifest.ini +++ b/testing/mozbase/mozprocess/tests/manifest.ini @@ -2,4 +2,4 @@ # see https://bugzilla.mozilla.org/show_bug.cgi?id=790765#c51 [test_mozprocess.py] -skip-if = os == 'win' \ No newline at end of file +disabled = bug 877864 From d835916c14da37b3860c9649ab83eb83aa171047 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Mon, 3 Jun 2013 15:17:42 -0700 Subject: [PATCH 07/23] Bug 496923 - Allow update-test262.sh to copy directly from a test262 working directory, when (even local) cloning would be too slow. r=terrence --HG-- extra : rebase_source : be0f8b238ad16e990d44167739e9b8793baca6de --- js/src/tests/update-test262.sh | 58 ++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/js/src/tests/update-test262.sh b/js/src/tests/update-test262.sh index 23fa0af047a..03466e34ba7 100755 --- a/js/src/tests/update-test262.sh +++ b/js/src/tests/update-test262.sh @@ -9,26 +9,50 @@ set -e # Updates the jstests copy of the test cases of Test262, the conformance test # suite for ECMA-262 and ECMA-402, ECMAScript and its Internationalization API. -if [ $# -lt 1 ]; then - echo "Usage: update-test262.sh " - exit 1 -fi - -# Mercurial doesn't have a way to download just a part of a repository, or to -# just get the working copy - we have to clone the entire thing. We use a -# temporary test262 directory for that. -unique_dir=`mktemp -d /tmp/test262.XXXX` || exit 1 -tmp_dir=${unique_dir}/test262 - -# Remove the temporary test262 directory on exit. -function cleanupTempFiles() +function usage() { - rm -rf ${unique_dir} + echo "Usage: update-test262.sh [clone | copy]" + echo "" + echo "The URL will most commonly be http://hg.ecmascript.org/tests/test262/ " + echo "but may also be a local clone. Don't use a local clone when generating" + echo "the final import patch"\!" test262/HG-INFO will record the wrong URL" + echo "if you do so. Local cloning is only useful when editing this script to" + echo "import a larger test262 subset." + echo "" + echo "If a local clone is specified, the optional clone/copy argument will" + echo "either clone into a temporary directory, or directly copy from the" + echo "clone's checkout. 'clone' semantics are the default." + exit 1 } -trap cleanupTempFiles EXIT -echo "Feel free to get some coffee - this could take a few minutes..." -hg clone $1 ${tmp_dir} +if [ $# -lt 1 ]; then + usage +elif [ $# -eq 1 -o "$2" == "clone" ]; then + # Beware! 'copy' support requires that the clone performed here *never* be + # altered. If it were altered, those changes wouldn't appear in the final + # set of changes as determined by the 'copy' path below. + + # Mercurial doesn't have a way to download just a part of a repository, or to + # just get the working copy - we have to clone the entire thing. We use a + # temporary test262 directory for that. + unique_dir=`mktemp -d /tmp/test262.XXXX` || exit 1 + tmp_dir=${unique_dir}/test262 + + # Remove the temporary test262 directory on exit. + function cleanupTempFiles() + { + rm -rf ${unique_dir} + } + trap cleanupTempFiles EXIT + + echo "Feel free to get some coffee - this could take a few minutes..." + hg clone $1 ${tmp_dir} +elif [ "$2" == "copy" ]; then + echo "Copying directly from $1; be sure this repository is updated to tip"\! + tmp_dir="$1" +else + usage +fi # Now to the actual test262 directory. js_src_tests_dir=`dirname $0` From e0dadc6bf64f420d6ceedfc969d6449a545e5ec7 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Tue, 4 Jun 2013 10:43:42 -0700 Subject: [PATCH 08/23] Bug 496923 - Make the test262-importing script import tests from ch10/, and skip the tests that we don't currently pass (6 for test harness shortcomings, 2 for actual bugs). r=terrence --HG-- extra : rebase_source : 92c4b241bb0ad55f5de7077cca5c4cf75fbecfe1 --- js/src/tests/jstests.list | 23 +++++++++++++++++++++++ js/src/tests/update-test262.sh | 6 ++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/js/src/tests/jstests.list b/js/src/tests/jstests.list index c673c67023f..a858d000bf1 100644 --- a/js/src/tests/jstests.list +++ b/js/src/tests/jstests.list @@ -3,9 +3,32 @@ skip-if(!this.hasOwnProperty("Intl")) include test262/intl402/jstests.list # Intl is not enabled in all builds +################################################## +# Test262 tests skipped due to SpiderMonkey bugs # +################################################## + +skip script test262/ch10/10.4/10.4.3/10.4.3-1-104.js # bug 603201 +skip script test262/ch10/10.4/10.4.3/10.4.3-1-106.js # bug 603201 + skip script test262/intl402/ch10/10.1/10.1.1_a.js # bug 854320 skip script test262/intl402/ch10/10.1/10.1.1_13.js # bug 853704 skip script test262/intl402/ch10/10.1/10.1.1_19_c.js # bug 853704 skip script test262/intl402/ch11/11.1/11.1.1_a.js # bug 854320 skip script test262/intl402/ch11/11.3/11.3.2_TRP.js # bug 853706 skip script test262/intl402/ch12/12.1/12.1.1_a.js # bug 854320 + +####################################################################### +# Tests disabled due to jstest limitations wrt imported test262 tests # +####################################################################### + +# These tests are disabled because jstest doesn't understand @negative (without +# a pattern) yet. + +# These tests are disabled because jstest doesn't understand @negative with a +# pattern yet. +skip script test262/ch10/10.1/10.1.1/10.1.1-2gs.js +skip script test262/ch10/10.1/10.1.1/10.1.1-5gs.js +skip script test262/ch10/10.1/10.1.1/10.1.1-8gs.js +skip script test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js +skip script test262/ch10/10.5/10.5-1gs.js +skip script test262/ch10/10.6/10.6-2gs.js diff --git a/js/src/tests/update-test262.sh b/js/src/tests/update-test262.sh index 03466e34ba7..75ba1a48b66 100755 --- a/js/src/tests/update-test262.sh +++ b/js/src/tests/update-test262.sh @@ -80,6 +80,7 @@ cp ${tmp_dir}/LICENSE ${test262_dir} # ...we instead individually import folders whose tests we pass. (Well, mostly # pass -- see the comment at the end of this script.) cp -r ${tmp_dir}/test/suite/ch06 ${test262_dir}/ch06 +cp -r ${tmp_dir}/test/suite/ch10 ${test262_dir}/ch10 # The test402 tests are in test/suite/intl402/. For now there are no # "bestPractice" tests to omit. The remaining tests are in chNN directories, @@ -91,6 +92,7 @@ mkdir ${test262_dir}/intl402 cp -r ${tmp_dir}/test/suite/intl402/ch* ${test262_dir}/intl402 # Copy over harness supporting files needed by the test402 tests. +cp ${tmp_dir}/test/harness/sta.js ${js_src_tests_dir}/supporting/ cp ${tmp_dir}/test/harness/testBuiltInObject.js ${js_src_tests_dir}/supporting/ cp ${tmp_dir}/test/harness/testIntl.js ${js_src_tests_dir}/supporting/ @@ -101,9 +103,9 @@ for dir in `find ${test262_dir} ${test262_dir}/ch* ${test262_dir}/intl402/ch* -t touch $dir/shell.js done -# Restore the test262 tests' jstests adapter files. +# Construct the test262 tests' jstests adapter files. cp ${js_src_tests_dir}/supporting/test262-browser.js ${test262_dir}/browser.js -cp ${js_src_tests_dir}/supporting/test262-shell.js ${test262_dir}/shell.js +cat ${js_src_tests_dir}/supporting/sta.js ${js_src_tests_dir}/supporting/test262-shell.js > ${test262_dir}/shell.js # Restore the Intl tests' jstests adapter files. cp ${js_src_tests_dir}/supporting/test402-browser.js ${test262_dir}/intl402/browser.js From 3797db631eb793e1c49cc1ca4c9f7c306020a606 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Tue, 4 Jun 2013 10:43:51 -0700 Subject: [PATCH 09/23] Bug 496923 - Import all the ch10/ tests from test262 into jstests. r=importing-script-was-reviewed --HG-- extra : rebase_source : dea30b698346549b29d01a8506cc05fde981569e --- js/src/tests/supporting/sta.js | 901 ++++++++++++++++++ .../test262/ch10/10.1/10.1.1/10.1.1-1-s.js | 18 + .../test262/ch10/10.1/10.1.1/10.1.1-10-s.js | 18 + .../test262/ch10/10.1/10.1.1/10.1.1-11-s.js | 23 + .../test262/ch10/10.1/10.1.1/10.1.1-12-s.js | 17 + .../test262/ch10/10.1/10.1.1/10.1.1-13-s.js | 17 + .../test262/ch10/10.1/10.1.1/10.1.1-14-s.js | 22 + .../test262/ch10/10.1/10.1.1/10.1.1-15-s.js | 26 + .../test262/ch10/10.1/10.1.1/10.1.1-16-s.js | 24 + .../test262/ch10/10.1/10.1.1/10.1.1-17-s.js | 30 + .../test262/ch10/10.1/10.1.1/10.1.1-18-s.js | 31 + .../test262/ch10/10.1/10.1.1/10.1.1-19-s.js | 25 + .../test262/ch10/10.1/10.1.1/10.1.1-2-s.js | 23 + .../test262/ch10/10.1/10.1.1/10.1.1-20-s.js | 21 + .../test262/ch10/10.1/10.1.1/10.1.1-21-s.js | 21 + .../test262/ch10/10.1/10.1.1/10.1.1-22-s.js | 24 + .../test262/ch10/10.1/10.1.1/10.1.1-23-s.js | 20 + .../test262/ch10/10.1/10.1.1/10.1.1-24-s.js | 20 + .../test262/ch10/10.1/10.1.1/10.1.1-25-s.js | 29 + .../test262/ch10/10.1/10.1.1/10.1.1-26-s.js | 32 + .../test262/ch10/10.1/10.1.1/10.1.1-27-s.js | 24 + .../test262/ch10/10.1/10.1.1/10.1.1-28-s.js | 27 + .../test262/ch10/10.1/10.1.1/10.1.1-29-s.js | 19 + .../test262/ch10/10.1/10.1.1/10.1.1-2gs.js | 16 + .../test262/ch10/10.1/10.1.1/10.1.1-3-s.js | 19 + .../test262/ch10/10.1/10.1.1/10.1.1-30-s.js | 22 + .../test262/ch10/10.1/10.1.1/10.1.1-31-s.js | 18 + .../test262/ch10/10.1/10.1.1/10.1.1-32-s.js | 18 + .../test262/ch10/10.1/10.1.1/10.1.1-4-s.js | 18 + .../test262/ch10/10.1/10.1.1/10.1.1-5-s.js | 23 + .../test262/ch10/10.1/10.1.1/10.1.1-5gs.js | 16 + .../test262/ch10/10.1/10.1.1/10.1.1-6-s.js | 19 + .../test262/ch10/10.1/10.1.1/10.1.1-7-s.js | 18 + .../test262/ch10/10.1/10.1.1/10.1.1-8-s.js | 23 + .../test262/ch10/10.1/10.1.1/10.1.1-8gs.js | 17 + .../test262/ch10/10.1/10.1.1/10.1.1-9-s.js | 18 + .../tests/test262/ch10/10.1/10.1.1/browser.js | 0 .../tests/test262/ch10/10.1/10.1.1/shell.js | 0 .../tests/test262/ch10/10.1/S10.1.1_A1_T1.js | 18 + .../tests/test262/ch10/10.1/S10.1.1_A1_T2.js | 28 + .../tests/test262/ch10/10.1/S10.1.1_A1_T3.js | 16 + .../tests/test262/ch10/10.1/S10.1.1_A2_T1.js | 20 + .../tests/test262/ch10/10.1/S10.1.6_A1_T1.js | 20 + .../tests/test262/ch10/10.1/S10.1.6_A1_T2.js | 33 + .../tests/test262/ch10/10.1/S10.1.6_A1_T3.js | 20 + .../tests/test262/ch10/10.1/S10.1.7_A1_T1.js | 15 + js/src/tests/test262/ch10/10.1/browser.js | 0 js/src/tests/test262/ch10/10.1/shell.js | 0 .../10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js | 23 + .../10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js | 22 + .../10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js | 24 + .../10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js | 24 + .../10.2.1/10.2.1.1/10.2.1.1.3/browser.js | 0 .../10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js | 0 .../ch10/10.2/10.2.1/10.2.1.1/browser.js | 0 .../ch10/10.2/10.2.1/10.2.1.1/shell.js | 0 .../test262/ch10/10.2/10.2.1/S10.2.1_A1.js | 29 + .../test262/ch10/10.2/10.2.1/S10.2.1_A2.js | 37 + .../test262/ch10/10.2/10.2.1/S10.2.1_A3.js | 21 + .../test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js | 49 + .../test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js | 41 + .../ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js | 35 + .../ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js | 35 + .../ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js | 34 + .../tests/test262/ch10/10.2/10.2.1/browser.js | 0 .../tests/test262/ch10/10.2/10.2.1/shell.js | 0 .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js | 26 + .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js | 25 + .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js | 28 + .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js | 27 + .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js | 31 + .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js | 30 + .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js | 32 + .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js | 32 + .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js | 27 + .../tests/test262/ch10/10.2/10.2.2/browser.js | 0 .../tests/test262/ch10/10.2/10.2.2/shell.js | 0 .../ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js | 26 + .../ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js | 56 ++ .../ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js | 87 ++ .../ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js | 16 + .../ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js | 30 + .../ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js | 60 ++ .../ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js | 90 ++ .../ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js | 20 + .../ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js | 30 + .../ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js | 60 ++ .../ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js | 90 ++ .../ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js | 20 + .../ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js | 21 + .../ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js | 33 + .../ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js | 45 + .../ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js | 17 + .../ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js | 25 + .../ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js | 37 + .../ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js | 49 + .../ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js | 21 + .../ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js | 24 + .../ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js | 36 + .../ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js | 48 + .../ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js | 20 + .../tests/test262/ch10/10.2/10.2.3/browser.js | 0 .../tests/test262/ch10/10.2/10.2.3/shell.js | 0 js/src/tests/test262/ch10/10.2/browser.js | 0 js/src/tests/test262/ch10/10.2/shell.js | 0 .../test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js | 22 + .../test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js | 22 + .../tests/test262/ch10/10.4/10.4.1/browser.js | 0 .../tests/test262/ch10/10.4/10.4.1/shell.js | 0 .../test262/ch10/10.4/10.4.2/10.4.2-1-1.js | 26 + .../test262/ch10/10.4/10.4.2/10.4.2-1-2.js | 31 + .../test262/ch10/10.4/10.4.2/10.4.2-1-3.js | 34 + .../test262/ch10/10.4/10.4.2/10.4.2-1-4.js | 29 + .../test262/ch10/10.4/10.4.2/10.4.2-1-5.js | 27 + .../test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js | 20 + .../test262/ch10/10.4/10.4.2/10.4.2-2-s.js | 18 + .../ch10/10.4/10.4.2/10.4.2-3-c-1-s.js | 21 + .../ch10/10.4/10.4.2/10.4.2-3-c-2-s.js | 22 + .../test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js | 17 + .../test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js | 19 + .../test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js | 18 + .../test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js | 17 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js | 28 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js | 28 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js | 29 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js | 29 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js | 28 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js | 29 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js | 29 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js | 29 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js | 29 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js | 29 + .../ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js | 29 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js | 31 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js | 32 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js | 34 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js | 32 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js | 32 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js | 33 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js | 34 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js | 34 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js | 35 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js | 34 + .../ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js | 34 + .../tests/test262/ch10/10.4/10.4.2/browser.js | 0 .../tests/test262/ch10/10.4/10.4.2/shell.js | 0 .../test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js | 29 + .../test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js | 19 + .../ch10/10.4/10.4.3/10.4.3-1-100-s.js | 22 + .../ch10/10.4/10.4.3/10.4.3-1-100gs.js | 20 + .../ch10/10.4/10.4.3/10.4.3-1-101-s.js | 22 + .../ch10/10.4/10.4.3/10.4.3-1-101gs.js | 20 + .../ch10/10.4/10.4.3/10.4.3-1-102-s.js | 23 + .../ch10/10.4/10.4.3/10.4.3-1-102gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-103.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-104.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-105.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-106.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js | 14 + .../test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js | 29 + .../test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js | 27 + .../test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js | 29 + .../test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js | 22 + .../test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js | 32 + .../test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js | 21 + .../test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js | 20 + .../test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js | 18 + .../test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js | 19 + .../test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js | 17 + .../test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js | 16 + .../test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js | 15 + .../test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js | 18 + .../test262/ch10/10.4/10.4.3/S10.4.3_A1.js | 16 + .../tests/test262/ch10/10.4/10.4.3/browser.js | 0 .../tests/test262/ch10/10.4/10.4.3/shell.js | 0 .../tests/test262/ch10/10.4/S10.4A1.1_T2.js | 33 + .../tests/test262/ch10/10.4/S10.4_A1.1_T1.js | 31 + js/src/tests/test262/ch10/10.4/browser.js | 0 js/src/tests/test262/ch10/10.4/shell.js | 0 js/src/tests/test262/ch10/10.5/10.5-1-s.js | 24 + js/src/tests/test262/ch10/10.5/10.5-1gs.js | 20 + .../tests/test262/ch10/10.5/10.5-7-b-1-s.js | 23 + .../tests/test262/ch10/10.5/10.5-7-b-2-s.js | 23 + .../tests/test262/ch10/10.5/10.5-7-b-3-s.js | 23 + .../tests/test262/ch10/10.5/10.5-7-b-4-s.js | 24 + js/src/tests/test262/ch10/10.5/browser.js | 0 js/src/tests/test262/ch10/10.5/shell.js | 0 .../test262/ch10/10.6/10.6-10-c-ii-1-s.js | 22 + .../tests/test262/ch10/10.6/10.6-10-c-ii-1.js | 21 + .../test262/ch10/10.6/10.6-10-c-ii-2-s.js | 23 + .../tests/test262/ch10/10.6/10.6-10-c-ii-2.js | 22 + js/src/tests/test262/ch10/10.6/10.6-11-b-1.js | 54 ++ js/src/tests/test262/ch10/10.6/10.6-12-1.js | 21 + js/src/tests/test262/ch10/10.6/10.6-12-2.js | 22 + js/src/tests/test262/ch10/10.6/10.6-13-1.js | 21 + js/src/tests/test262/ch10/10.6/10.6-13-a-1.js | 45 + js/src/tests/test262/ch10/10.6/10.6-13-a-2.js | 35 + js/src/tests/test262/ch10/10.6/10.6-13-a-3.js | 36 + .../tests/test262/ch10/10.6/10.6-13-b-1-s.js | 24 + .../tests/test262/ch10/10.6/10.6-13-b-2-s.js | 19 + .../tests/test262/ch10/10.6/10.6-13-b-3-s.js | 26 + .../tests/test262/ch10/10.6/10.6-13-c-1-s.js | 24 + .../tests/test262/ch10/10.6/10.6-13-c-2-s.js | 19 + .../tests/test262/ch10/10.6/10.6-13-c-3-s.js | 24 + js/src/tests/test262/ch10/10.6/10.6-14-1-s.js | 20 + .../tests/test262/ch10/10.6/10.6-14-b-1-s.js | 28 + .../tests/test262/ch10/10.6/10.6-14-b-4-s.js | 27 + .../tests/test262/ch10/10.6/10.6-14-c-1-s.js | 28 + .../tests/test262/ch10/10.6/10.6-14-c-4-s.js | 27 + js/src/tests/test262/ch10/10.6/10.6-1gs.js | 17 + js/src/tests/test262/ch10/10.6/10.6-2gs.js | 19 + js/src/tests/test262/ch10/10.6/10.6-5-1.js | 16 + js/src/tests/test262/ch10/10.6/10.6-6-1.js | 17 + js/src/tests/test262/ch10/10.6/10.6-6-2.js | 20 + js/src/tests/test262/ch10/10.6/10.6-6-3.js | 16 + js/src/tests/test262/ch10/10.6/10.6-6-4.js | 16 + js/src/tests/test262/ch10/10.6/10.6-7-1.js | 53 ++ js/src/tests/test262/ch10/10.6/S10.6_A1.js | 35 + js/src/tests/test262/ch10/10.6/S10.6_A2.js | 36 + js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js | 35 + js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js | 49 + js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js | 40 + js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js | 42 + js/src/tests/test262/ch10/10.6/S10.6_A4.js | 38 + js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js | 35 + js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js | 49 + js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js | 39 + js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js | 41 + js/src/tests/test262/ch10/10.6/S10.6_A6.js | 67 ++ js/src/tests/test262/ch10/10.6/S10.6_A7.js | 20 + js/src/tests/test262/ch10/10.6/browser.js | 0 js/src/tests/test262/ch10/10.6/shell.js | 0 js/src/tests/test262/ch10/browser.js | 0 js/src/tests/test262/ch10/shell.js | 0 js/src/tests/test262/shell.js | 901 ++++++++++++++++++ 409 files changed, 10486 insertions(+) create mode 100644 js/src/tests/supporting/sta.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-1-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-10-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-11-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-12-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-13-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-14-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-15-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-16-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-18-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-19-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-20-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-21-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-22-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-23-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-24-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-25-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-26-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-27-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-28-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-29-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2gs.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-3-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-30-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-31-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-32-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-4-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5gs.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-6-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-7-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8gs.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-9-s.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/browser.js create mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/shell.js create mode 100644 js/src/tests/test262/ch10/10.1/S10.1.1_A1_T1.js create mode 100644 js/src/tests/test262/ch10/10.1/S10.1.1_A1_T2.js create mode 100644 js/src/tests/test262/ch10/10.1/S10.1.1_A1_T3.js create mode 100644 js/src/tests/test262/ch10/10.1/S10.1.1_A2_T1.js create mode 100644 js/src/tests/test262/ch10/10.1/S10.1.6_A1_T1.js create mode 100644 js/src/tests/test262/ch10/10.1/S10.1.6_A1_T2.js create mode 100644 js/src/tests/test262/ch10/10.1/S10.1.6_A1_T3.js create mode 100644 js/src/tests/test262/ch10/10.1/S10.1.7_A1_T1.js create mode 100644 js/src/tests/test262/ch10/10.1/browser.js create mode 100644 js/src/tests/test262/ch10/10.1/shell.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A3.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/browser.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/shell.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/browser.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/shell.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/browser.js create mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/shell.js create mode 100644 js/src/tests/test262/ch10/10.2/browser.js create mode 100644 js/src/tests/test262/ch10/10.2/shell.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.1/browser.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.1/shell.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/browser.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/shell.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/browser.js create mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/shell.js create mode 100644 js/src/tests/test262/ch10/10.4/S10.4A1.1_T2.js create mode 100644 js/src/tests/test262/ch10/10.4/S10.4_A1.1_T1.js create mode 100644 js/src/tests/test262/ch10/10.4/browser.js create mode 100644 js/src/tests/test262/ch10/10.4/shell.js create mode 100644 js/src/tests/test262/ch10/10.5/10.5-1-s.js create mode 100644 js/src/tests/test262/ch10/10.5/10.5-1gs.js create mode 100644 js/src/tests/test262/ch10/10.5/10.5-7-b-1-s.js create mode 100644 js/src/tests/test262/ch10/10.5/10.5-7-b-2-s.js create mode 100644 js/src/tests/test262/ch10/10.5/10.5-7-b-3-s.js create mode 100644 js/src/tests/test262/ch10/10.5/10.5-7-b-4-s.js create mode 100644 js/src/tests/test262/ch10/10.5/browser.js create mode 100644 js/src/tests/test262/ch10/10.5/shell.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-11-b-1.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-12-1.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-12-2.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-1.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-a-1.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-a-2.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-a-3.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-b-1-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-b-2-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-b-3-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-c-1-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-c-2-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-c-3-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-1-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-b-1-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-b-4-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-c-1-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-c-4-s.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-1gs.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-2gs.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-5-1.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-6-1.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-6-2.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-6-3.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-6-4.js create mode 100644 js/src/tests/test262/ch10/10.6/10.6-7-1.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A1.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A2.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A4.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A6.js create mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A7.js create mode 100644 js/src/tests/test262/ch10/10.6/browser.js create mode 100644 js/src/tests/test262/ch10/10.6/shell.js create mode 100644 js/src/tests/test262/ch10/browser.js create mode 100644 js/src/tests/test262/ch10/shell.js diff --git a/js/src/tests/supporting/sta.js b/js/src/tests/supporting/sta.js new file mode 100644 index 00000000000..5380639e004 --- /dev/null +++ b/js/src/tests/supporting/sta.js @@ -0,0 +1,901 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +//----------------------------------------------------------------------------- +function compareArray(aExpected, aActual) { + if (aActual.length != aExpected.length) { + return false; + } + + aExpected.sort(); + aActual.sort(); + + var s; + for (var i = 0; i < aExpected.length; i++) { + if (aActual[i] !== aExpected[i]) { + return false; + } + } + return true; +} + +//----------------------------------------------------------------------------- +function arrayContains(arr, expected) { + var found; + for (var i = 0; i < expected.length; i++) { + found = false; + for (var j = 0; j < arr.length; j++) { + if (expected[i] === arr[j]) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; +} + +//----------------------------------------------------------------------------- +var supportsArrayIndexGettersOnArrays = undefined; +function fnSupportsArrayIndexGettersOnArrays() { + if (typeof supportsArrayIndexGettersOnArrays !== "undefined") { + return supportsArrayIndexGettersOnArrays; + } + + supportsArrayIndexGettersOnArrays = false; + + if (fnExists(Object.defineProperty)) { + var arr = []; + Object.defineProperty(arr, "0", { + get: function() { + supportsArrayIndexGettersOnArrays = true; + return 0; + } + }); + var res = arr[0]; + } + + return supportsArrayIndexGettersOnArrays; +} + +//----------------------------------------------------------------------------- +var supportsArrayIndexGettersOnObjects = undefined; +function fnSupportsArrayIndexGettersOnObjects() { + if (typeof supportsArrayIndexGettersOnObjects !== "undefined") + return supportsArrayIndexGettersOnObjects; + + supportsArrayIndexGettersOnObjects = false; + + if (fnExists(Object.defineProperty)) { + var obj = {}; + Object.defineProperty(obj, "0", { + get: function() { + supportsArrayIndexGettersOnObjects = true; + return 0; + } + }); + var res = obj[0]; + } + + return supportsArrayIndexGettersOnObjects; +} + +//----------------------------------------------------------------------------- +function ConvertToFileUrl(pathStr) { + return "file:" + pathStr.replace(/\\/g, "/"); +} + +//----------------------------------------------------------------------------- +function fnExists(/*arguments*/) { + for (var i = 0; i < arguments.length; i++) { + if (typeof (arguments[i]) !== "function") return false; + } + return true; +} + +//----------------------------------------------------------------------------- +var __globalObject = Function("return this;")(); +function fnGlobalObject() { + return __globalObject; +} + +//----------------------------------------------------------------------------- +function fnSupportsStrict() { + "use strict"; + try { + eval('with ({}) {}'); + return false; + } catch (e) { + return true; + } +} + +//----------------------------------------------------------------------------- +//Verify all attributes specified data property of given object: +//value, writable, enumerable, configurable +//If all attribute values are expected, return true, otherwise, return false +function dataPropertyAttributesAreCorrect(obj, + name, + value, + writable, + enumerable, + configurable) { + var attributesCorrect = true; + + if (obj[name] !== value) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof value === "number" && + isNaN(value)) { + // keep empty + } else { + attributesCorrect = false; + } + } + + try { + if (obj[name] === "oldValue") { + obj[name] = "newValue"; + } else { + obj[name] = "OldValue"; + } + } catch (we) { + } + + var overwrited = false; + if (obj[name] !== value) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof value === "number" && + isNaN(value)) { + // keep empty + } else { + overwrited = true; + } + } + if (overwrited !== writable) { + attributesCorrect = false; + } + + var enumerated = false; + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === name) { + enumerated = true; + } + } + + if (enumerated !== enumerable) { + attributesCorrect = false; + } + + + var deleted = false; + + try { + delete obj[name]; + } catch (de) { + } + if (!obj.hasOwnProperty(name)) { + deleted = true; + } + if (deleted !== configurable) { + attributesCorrect = false; + } + + return attributesCorrect; +} + +//----------------------------------------------------------------------------- +//Verify all attributes specified accessor property of given object: +//get, set, enumerable, configurable +//If all attribute values are expected, return true, otherwise, return false +function accessorPropertyAttributesAreCorrect(obj, + name, + get, + set, + setVerifyHelpProp, + enumerable, + configurable) { + var attributesCorrect = true; + + if (get !== undefined) { + if (obj[name] !== get()) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof get() === "number" && + isNaN(get())) { + // keep empty + } else { + attributesCorrect = false; + } + } + } else { + if (obj[name] !== undefined) { + attributesCorrect = false; + } + } + + try { + var desc = Object.getOwnPropertyDescriptor(obj, name); + if (typeof desc.set === "undefined") { + if (typeof set !== "undefined") { + attributesCorrect = false; + } + } else { + obj[name] = "toBeSetValue"; + if (obj[setVerifyHelpProp] !== "toBeSetValue") { + attributesCorrect = false; + } + } + } catch (se) { + throw se; + } + + + var enumerated = false; + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === name) { + enumerated = true; + } + } + + if (enumerated !== enumerable) { + attributesCorrect = false; + } + + + var deleted = false; + try { + delete obj[name]; + } catch (de) { + throw de; + } + if (!obj.hasOwnProperty(name)) { + deleted = true; + } + if (deleted !== configurable) { + attributesCorrect = false; + } + + return attributesCorrect; +} + +//----------------------------------------------------------------------------- +var NotEarlyErrorString = "NotEarlyError"; +var EarlyErrorRePat = "^((?!" + NotEarlyErrorString + ").)*$"; +var NotEarlyError = new Error(NotEarlyErrorString); + +//----------------------------------------------------------------------------- +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function Test262Error(message) { + if (message) this.message = message; +} + +Test262Error.prototype.toString = function () { + return "Test262 Error: " + this.message; +}; + +function testFailed(message) { + throw new Test262Error(message); +} + + +function testPrint(message) { + +} + + +//adaptors for Test262 framework +function $PRINT(message) { + +} + +function $INCLUDE(message) { } +function $ERROR(message) { + testFailed(message); +} + +function $FAIL(message) { + testFailed(message); +} + + + +//Sputnik library definitions +//Ultimately these should be namespaced some how and only made +//available to tests that explicitly include them. +//For now, we just define the globally + +//math_precision.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function getPrecision(num) { + //TODO: Create a table of prec's, + // because using Math for testing Math isn't that correct. + + var log2num = Math.log(Math.abs(num)) / Math.LN2; + var pernum = Math.ceil(log2num); + return (2 * Math.pow(2, -52 + pernum)); + //return(0); +} + + +//math_isequal.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +var prec; +function isEqual(num1, num2) { + if ((num1 === Infinity) && (num2 === Infinity)) { + return (true); + } + if ((num1 === -Infinity) && (num2 === -Infinity)) { + return (true); + } + prec = getPrecision(Math.min(Math.abs(num1), Math.abs(num2))); + return (Math.abs(num1 - num2) <= prec); + //return(num1 === num2); +} + +//numeric_conversion.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function ToInteger(p) { + var x = Number(p); + + if (isNaN(x)) { + return +0; + } + + if ((x === +0) + || (x === -0) + || (x === Number.POSITIVE_INFINITY) + || (x === Number.NEGATIVE_INFINITY)) { + return x; + } + + var sign = (x < 0) ? -1 : 1; + + return (sign * Math.floor(Math.abs(x))); +} + +//Date_constants.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +var HoursPerDay = 24; +var MinutesPerHour = 60; +var SecondsPerMinute = 60; + +var msPerDay = 86400000; +var msPerSecond = 1000; +var msPerMinute = 60000; +var msPerHour = 3600000; + +var date_1899_end = -2208988800001; +var date_1900_start = -2208988800000; +var date_1969_end = -1; +var date_1970_start = 0; +var date_1999_end = 946684799999; +var date_2000_start = 946684800000; +var date_2099_end = 4102444799999; +var date_2100_start = 4102444800000; + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +//the following values are normally generated by the sputnik.py driver +var $LocalTZ, + $DST_start_month, + $DST_start_sunday, + $DST_start_hour, + $DST_start_minutes, + $DST_end_month, + $DST_end_sunday, + $DST_end_hour, + $DST_end_minutes; + +(function () { + /** + * Finds the first date, starting from |start|, where |predicate| + * holds. + */ + var findNearestDateBefore = function(start, predicate) { + var current = start; + var month = 1000 * 60 * 60 * 24 * 30; + for (var step = month; step > 0; step = Math.floor(step / 3)) { + if (!predicate(current)) { + while (!predicate(current)) + current = new Date(current.getTime() + step); + current = new Date(current.getTime() - step); + } + } + while (!predicate(current)) { + current = new Date(current.getTime() + 1); + } + return current; + }; + + var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0); + var decemberDate = new Date(2000, 11, 20, 0, 0, 0, 0); + var juneOffset = juneDate.getTimezoneOffset(); + var decemberOffset = decemberDate.getTimezoneOffset(); + var isSouthernHemisphere = (juneOffset > decemberOffset); + var winterTime = isSouthernHemisphere ? juneDate : decemberDate; + var summerTime = isSouthernHemisphere ? decemberDate : juneDate; + + var dstStart = findNearestDateBefore(winterTime, function (date) { + return date.getTimezoneOffset() == summerTime.getTimezoneOffset(); + }); + $DST_start_month = dstStart.getMonth(); + $DST_start_sunday = dstStart.getDate() > 15 ? '"last"' : '"first"'; + $DST_start_hour = dstStart.getHours(); + $DST_start_minutes = dstStart.getMinutes(); + + var dstEnd = findNearestDateBefore(summerTime, function (date) { + return date.getTimezoneOffset() == winterTime.getTimezoneOffset(); + }); + $DST_end_month = dstEnd.getMonth(); + $DST_end_sunday = dstEnd.getDate() > 15 ? '"last"' : '"first"'; + $DST_end_hour = dstEnd.getHours(); + $DST_end_minutes = dstEnd.getMinutes(); + + return; +})(); + + +//Date.library.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +//15.9.1.2 Day Number and Time within Day +function Day(t) { + return Math.floor(t/msPerDay); +} + +function TimeWithinDay(t) { + return t%msPerDay; +} + +//15.9.1.3 Year Number +function DaysInYear(y){ + if(y%4 != 0) return 365; + if(y%4 == 0 && y%100 != 0) return 366; + if(y%100 == 0 && y%400 != 0) return 365; + if(y%400 == 0) return 366; +} + +function DayFromYear(y) { + return (365*(y-1970) + + Math.floor((y-1969)/4) + - Math.floor((y-1901)/100) + + Math.floor((y-1601)/400)); +} + +function TimeFromYear(y){ + return msPerDay*DayFromYear(y); +} + +function YearFromTime(t) { + t = Number(t); + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + + for(var time = 0;;year += sign){ + time = TimeFromYear(year); + + if(sign > 0 && time > t){ + year -= sign; + break; + } + else if(sign < 0 && time <= t){ + break; + } + }; + return year; +} + +function InLeapYear(t){ + if(DaysInYear(YearFromTime(t)) == 365) + return 0; + + if(DaysInYear(YearFromTime(t)) == 366) + return 1; +} + +function DayWithinYear(t) { + return Day(t)-DayFromYear(YearFromTime(t)); +} + +//15.9.1.4 Month Number +function MonthFromTime(t){ + var day = DayWithinYear(t); + var leap = InLeapYear(t); + + if((0 <= day) && (day < 31)) return 0; + if((31 <= day) && (day < (59+leap))) return 1; + if(((59+leap) <= day) && (day < (90+leap))) return 2; + if(((90+leap) <= day) && (day < (120+leap))) return 3; + if(((120+leap) <= day) && (day < (151+leap))) return 4; + if(((151+leap) <= day) && (day < (181+leap))) return 5; + if(((181+leap) <= day) && (day < (212+leap))) return 6; + if(((212+leap) <= day) && (day < (243+leap))) return 7; + if(((243+leap) <= day) && (day < (273+leap))) return 8; + if(((273+leap) <= day) && (day < (304+leap))) return 9; + if(((304+leap) <= day) && (day < (334+leap))) return 10; + if(((334+leap) <= day) && (day < (365+leap))) return 11; +} + +//15.9.1.5 Date Number +function DateFromTime(t) { + var day = DayWithinYear(t); + var month = MonthFromTime(t); + var leap = InLeapYear(t); + + if(month == 0) return day+1; + if(month == 1) return day-30; + if(month == 2) return day-58-leap; + if(month == 3) return day-89-leap; + if(month == 4) return day-119-leap; + if(month == 5) return day-150-leap; + if(month == 6) return day-180-leap; + if(month == 7) return day-211-leap; + if(month == 8) return day-242-leap; + if(month == 9) return day-272-leap; + if(month == 10) return day-303-leap; + if(month == 11) return day-333-leap; +} + +//15.9.1.6 Week Day +function WeekDay(t) { + var weekday = (Day(t)+4)%7; + return (weekday < 0 ? 7+weekday : weekday); +} + +//15.9.1.9 Daylight Saving Time Adjustment +$LocalTZ = (new Date()).getTimezoneOffset() / -60; +if (DaylightSavingTA((new Date()).valueOf()) !== 0) { + $LocalTZ -= 1; +} +var LocalTZA = $LocalTZ*msPerHour; + +function DaysInMonth(m, leap) { + m = m%12; + + //April, June, Sept, Nov + if(m == 3 || m == 5 || m == 8 || m == 10 ) { + return 30; + } + + //Jan, March, May, July, Aug, Oct, Dec + if(m == 0 || m == 2 || m == 4 || m == 6 || m == 7 || m == 9 || m == 11){ + return 31; + } + + //Feb + return 28+leap; +} + +function GetSundayInMonth(t, m, count){ + var year = YearFromTime(t); + var tempDate; + + if (count==='"first"') { + for (var d=1; d <= DaysInMonth(m, InLeapYear(t)); d++) { + tempDate = new Date(year, m, d); + if (tempDate.getDay()===0) { + return tempDate.valueOf(); + } + } + } else if(count==='"last"') { + for (var d=DaysInMonth(m, InLeapYear(t)); d>0; d--) { + tempDate = new Date(year, m, d); + if (tempDate.getDay()===0) { + return tempDate.valueOf(); + } + } + } + throw new Error("Unsupported 'count' arg:" + count); +} +/* +function GetSundayInMonth(t, m, count){ + var year = YearFromTime(t); + var leap = InLeapYear(t); + var day = 0; + + if(m >= 1) day += DaysInMonth(0, leap); + if(m >= 2) day += DaysInMonth(1, leap); + if(m >= 3) day += DaysInMonth(2, leap); + if(m >= 4) day += DaysInMonth(3, leap); + if(m >= 5) day += DaysInMonth(4, leap); + if(m >= 6) day += DaysInMonth(5, leap); + if(m >= 7) day += DaysInMonth(6, leap); + if(m >= 8) day += DaysInMonth(7, leap); + if(m >= 9) day += DaysInMonth(8, leap); + if(m >= 10) day += DaysInMonth(9, leap); + if(m >= 11) day += DaysInMonth(10, leap); + + var month_start = TimeFromYear(year)+day*msPerDay; + var sunday = 0; + + if(count === "last"){ + for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay; + WeekDay(last_sunday)>0; + last_sunday -= msPerDay + ){}; + sunday = last_sunday; + } + else { + for(var first_sunday = month_start; + WeekDay(first_sunday)>0; + first_sunday += msPerDay + ){}; + sunday = first_sunday+7*msPerDay*(count-1); + } + + return sunday; +}*/ + +function DaylightSavingTA(t) { +// t = t-LocalTZA; + + var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) + + $DST_start_hour*msPerHour + + $DST_start_minutes*msPerMinute; + + var k = new Date(DST_start); + + var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) + + $DST_end_hour*msPerHour + + $DST_end_minutes*msPerMinute; + + if ( t >= DST_start && t < DST_end ) { + return msPerHour; + } else { + return 0; + } +} + +//15.9.1.9 Local Time +function LocalTime(t){ + return t+LocalTZA+DaylightSavingTA(t); +} + +function UTC(t) { + return t-LocalTZA-DaylightSavingTA(t-LocalTZA); +} + +//15.9.1.10 Hours, Minutes, Second, and Milliseconds +function HourFromTime(t){ + return Math.floor(t/msPerHour)%HoursPerDay; +} + +function MinFromTime(t){ + return Math.floor(t/msPerMinute)%MinutesPerHour; +} + +function SecFromTime(t){ + return Math.floor(t/msPerSecond)%SecondsPerMinute; +} + +function msFromTime(t){ + return t%msPerSecond; +} + +//15.9.1.11 MakeTime (hour, min, sec, ms) +function MakeTime(hour, min, sec, ms){ + if ( !isFinite(hour) || !isFinite(min) || !isFinite(sec) || !isFinite(ms)) { + return Number.NaN; + } + + hour = ToInteger(hour); + min = ToInteger(min); + sec = ToInteger(sec); + ms = ToInteger(ms); + + return ((hour*msPerHour) + (min*msPerMinute) + (sec*msPerSecond) + ms); +} + +//15.9.1.12 MakeDay (year, month, date) +function MakeDay(year, month, date) { + if ( !isFinite(year) || !isFinite(month) || !isFinite(date)) { + return Number.NaN; + } + + year = ToInteger(year); + month = ToInteger(month); + date = ToInteger(date ); + + var result5 = year + Math.floor(month/12); + var result6 = month%12; + + var sign = ( year < 1970 ) ? -1 : 1; + var t = ( year < 1970 ) ? 1 : 0; + var y = ( year < 1970 ) ? 1969 : 1970; + + if( sign == -1 ){ + for ( y = 1969; y >= year; y += sign ) { + t += sign * DaysInYear(y)*msPerDay; + } + } else { + for ( y = 1970 ; y < year; y += sign ) { + t += sign * DaysInYear(y)*msPerDay; + } + } + + var leap = 0; + for ( var m = 0; m < month; m++ ) { + //if year is changed, than we need to recalculate leep + leap = InLeapYear(t); + t += DaysInMonth(m, leap)*msPerDay; + } + + if ( YearFromTime(t) != result5 ) { + return Number.NaN; + } + if ( MonthFromTime(t) != result6 ) { + return Number.NaN; + } + if ( DateFromTime(t) != 1 ) { + return Number.NaN; + } + + return Day(t)+date-1; +} + +//15.9.1.13 MakeDate (day, time) +function MakeDate( day, time ) { + if(!isFinite(day) || !isFinite(time)) { + return Number.NaN; + } + + return day*msPerDay+time; +} + +//15.9.1.14 TimeClip (time) +function TimeClip(time) { + if(!isFinite(time) || Math.abs(time) > 8.64e15){ + return Number.NaN; + } + + return ToInteger(time); +} + +//Test Functions +//ConstructDate is considered deprecated, and should not be used directly from +//test262 tests as it's incredibly sensitive to DST start/end dates that +//vary with geographic location. +function ConstructDate(year, month, date, hours, minutes, seconds, ms){ + /* + * 1. Call ToNumber(year) + * 2. Call ToNumber(month) + * 3. If date is supplied use ToNumber(date); else use 1 + * 4. If hours is supplied use ToNumber(hours); else use 0 + * 5. If minutes is supplied use ToNumber(minutes); else use 0 + * 6. If seconds is supplied use ToNumber(seconds); else use 0 + * 7. If ms is supplied use ToNumber(ms); else use 0 + * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + * 9. Compute MakeDay(Result(8), Result(2), Result(3)) + * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + * 11. Compute MakeDate(Result(9), Result(10)) + * 12. Set the [[Value]] property of the newly constructed object to TimeClip(UTC(Result(11))) + */ + var r1 = Number(year); + var r2 = Number(month); + var r3 = ((date && arguments.length > 2) ? Number(date) : 1); + var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0); + var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0); + var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0); + var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0); + + var r8 = r1; + + if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99)) + r8 = 1900+r1; + + var r9 = MakeDay(r8, r2, r3); + var r10 = MakeTime(r4, r5, r6, r7); + var r11 = MakeDate(r9, r10); + + var retVal = TimeClip(UTC(r11)); + return retVal; +} + + + +/**** Python code for initialize the above constants +// We may want to replicate the following in JavaScript. +// However, using JS date operations to generate parameters that are then used to +// test those some date operations seems unsound. However, it isn't clear if there +//is a good interoperable alternative. + +# Copyright 2009 the Sputnik authors. All rights reserved. +# This code is governed by the BSD license found in the LICENSE file. + +def GetDaylightSavingsTimes(): +# Is the given floating-point time in DST? +def IsDst(t): +return time.localtime(t)[-1] +# Binary search to find an interval between the two times no greater than +# delta where DST switches, returning the midpoint. +def FindBetween(start, end, delta): +while end - start > delta: +middle = (end + start) / 2 +if IsDst(middle) == IsDst(start): +start = middle +else: +end = middle +return (start + end) / 2 +now = time.time() +one_month = (30 * 24 * 60 * 60) +# First find a date with different daylight savings. To avoid corner cases +# we try four months before and after today. +after = now + 4 * one_month +before = now - 4 * one_month +if IsDst(now) == IsDst(before) and IsDst(now) == IsDst(after): +logger.warning("Was unable to determine DST info.") +return None +# Determine when the change occurs between now and the date we just found +# in a different DST. +if IsDst(now) != IsDst(before): +first = FindBetween(before, now, 1) +else: +first = FindBetween(now, after, 1) +# Determine when the change occurs between three and nine months from the +# first. +second = FindBetween(first + 3 * one_month, first + 9 * one_month, 1) +# Find out which switch is into and which if out of DST +if IsDst(first - 1) and not IsDst(first + 1): +start = second +end = first +else: +start = first +end = second +return (start, end) + + +def GetDaylightSavingsAttribs(): +times = GetDaylightSavingsTimes() +if not times: +return None +(start, end) = times +def DstMonth(t): +return time.localtime(t)[1] - 1 +def DstHour(t): +return time.localtime(t - 1)[3] + 1 +def DstSunday(t): +if time.localtime(t)[2] > 15: +return "'last'" +else: +return "'first'" +def DstMinutes(t): +return (time.localtime(t - 1)[4] + 1) % 60 +attribs = { } +attribs['start_month'] = DstMonth(start) +attribs['end_month'] = DstMonth(end) +attribs['start_sunday'] = DstSunday(start) +attribs['end_sunday'] = DstSunday(end) +attribs['start_hour'] = DstHour(start) +attribs['end_hour'] = DstHour(end) +attribs['start_minutes'] = DstMinutes(start) +attribs['end_minutes'] = DstMinutes(end) +return attribs + +*********/ + +//--Test case registration----------------------------------------------------- +function runTestCase(testcase) { + if (testcase() !== true) { + $ERROR("Test case returned non-true value!"); + } +} diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-1-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-1-s.js new file mode 100644 index 00000000000..a9cf025bc8e --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-1-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-1-s.js + * @description Strict Mode - Use Strict Directive Prologue is 'use strict'; which contains two space between 'use' and 'strict' + * @noStrict + */ + + +function testcase() { + "use strict"; + var public = 1; + return public === 1; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-10-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-10-s.js new file mode 100644 index 00000000000..51aa8ca7332 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-10-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-10-s.js + * @description Strict Mode - Use Strict Directive Prologue is ''USE STRICT';' in which all characters are uppercase + * @noStrict + */ + + +function testcase() { + "USE STRICT"; + var public = 1; + return public === 1; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-11-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-11-s.js new file mode 100644 index 00000000000..6d7794d9717 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-11-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-11-s.js + * @description Strict Mode - Eval code is strict code with a Use Strict Directive at the beginning of the block + * @noStrict + */ + + +function testcase() { + try { + eval("'use strict'; var public = 1; var anotherVariableNotReserveWord = 2;"); + + return false; + } catch (e) { + return e instanceof SyntaxError && typeof public === "undefined" && + typeof anotherVariableNotReserveWord === "undefined"; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-12-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-12-s.js new file mode 100644 index 00000000000..09fdffe8420 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-12-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-12-s.js + * @description Strict Mode - Eval code is strict eval code with a Use Strict Directive in the middle of the block + * @noStrict + */ + + +function testcase() { + eval("var public = 1; 'use strict'; var anotherVariableNotReserveWord = 2;"); + return public === 1 && anotherVariableNotReserveWord === 2; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-13-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-13-s.js new file mode 100644 index 00000000000..0a4ba30ffba --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-13-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-13-s.js + * @description Strict Mode - Eval code is strict eval code with a Use Strict Directive at the end of the block + * @noStrict + */ + + +function testcase() { + eval("var public = 1; var anotherVariableNotReserveWord = 2; 'use strict';"); + return public === 1 && anotherVariableNotReserveWord === 2; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-14-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-14-s.js new file mode 100644 index 00000000000..dff41336640 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-14-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-14-s.js + * @description Strict Mode - The call to eval function is contained in a Strict Mode block + * @noStrict + */ + + +function testcase() { + 'use strict'; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return true; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-15-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-15-s.js new file mode 100644 index 00000000000..b7f7664f543 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-15-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-15-s.js + * @description Strict Mode - Function code that is part of a FunctionDeclaration is strict function code if FunctionDeclaration is contained in use strict + * @noStrict + */ + + +function testcase() { + "use strict"; + function fun() { + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } + + return fun(); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-16-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-16-s.js new file mode 100644 index 00000000000..35ef8803fbb --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-16-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-16-s.js + * @description Strict Mode - Function code that is part of a FunctionExpression is strict function code if FunctionExpression is contained in use strict + * @noStrict + */ + + +function testcase() { + "use strict"; + return function () { + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } (); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js new file mode 100644 index 00000000000..976e644fe11 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-17-s.js + * @description Strict Mode - Function code that is part of a Accessor PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(getter) + * @noStrict + */ + + +function testcase() { + "use strict"; + try { + var obj = {}; + Object.defineProperty(obj, "accProperty", { + get: function () { + eval("public = 1;"); + return 11; + } + }); + + var temp = obj.accProperty === 11; + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-18-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-18-s.js new file mode 100644 index 00000000000..b384ebfe515 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-18-s.js @@ -0,0 +1,31 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-18-s.js + * @description Strict Mode - Function code that is part of a Accessor PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(setter) + * @noStrict + */ + + +function testcase() { + "use strict"; + try { + var obj = {}; + var data = "data"; + Object.defineProperty(obj, "accProperty", { + set: function (value) { + eval("var public = 1;"); + data = value; + } + }); + + obj.accProperty = "overrideData"; + return false; + } catch (e) { + return e instanceof SyntaxError && data === "data"; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-19-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-19-s.js new file mode 100644 index 00000000000..6643ec7f16f --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-19-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-19-s.js + * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the start of the block + * @noStrict + */ + + +function testcase() { + function fun() { + "use strict"; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } + return fun(); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2-s.js new file mode 100644 index 00000000000..42e6bce785c --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-2-s.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';' + * @noStrict + */ + + +function testcase() { + "use strict" + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-20-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-20-s.js new file mode 100644 index 00000000000..cc30e88e6cf --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-20-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-20-s.js + * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears in the middle of the block + * @noStrict + */ + + +function testcase() { + function fun() { + eval("var public = 1;"); + "use strict"; + return public === 1; + } + return fun(); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-21-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-21-s.js new file mode 100644 index 00000000000..6c0245461ee --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-21-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-21-s.js + * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the end of the block + * @noStrict + */ + + +function testcase() { + function fun() { + eval("var public = 1;"); + return public === 1; + "use strict"; + } + return fun(); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-22-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-22-s.js new file mode 100644 index 00000000000..875ad9780c9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-22-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-22-s.js + * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the start of the block + * @noStrict + */ + + +function testcase() { + return function () { + "use strict"; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } (); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-23-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-23-s.js new file mode 100644 index 00000000000..680e928cd7c --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-23-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-23-s.js + * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears in the middle of the block + * @noStrict + */ + + +function testcase() { + return function () { + eval("var public = 1;"); + return public === 1; + "use strict"; + } (); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-24-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-24-s.js new file mode 100644 index 00000000000..ef67dbe592a --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-24-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-24-s.js + * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the end of the block + * @noStrict + */ + + +function testcase() { + return function () { + eval("var public = 1;"); + "use strict"; + return public === 1; + } (); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-25-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-25-s.js new file mode 100644 index 00000000000..206518f72b2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-25-s.js @@ -0,0 +1,29 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-25-s.js + * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the start of the block(getter) + * @noStrict + */ + + +function testcase() { + try { + var obj = {}; + Object.defineProperty(obj, "accProperty", { + get: function () { + "use strict"; + eval("var public = 1;"); + return 11; + } + }); + var temp = obj.accProperty === 11; + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-26-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-26-s.js new file mode 100644 index 00000000000..9da18136bbd --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-26-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-26-s.js + * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the start of the block(setter) + * @noStrict + */ + + +function testcase() { + try { + var obj = {}; + var data = "data"; + Object.defineProperty(obj, "accProperty", { + set: function (value) { + "use strict"; + eval("var public = 1;"); + data = value; + } + }); + + obj.accProperty = "overrideData"; + + return false; + } catch (e) { + return e instanceof SyntaxError && data === "data"; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-27-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-27-s.js new file mode 100644 index 00000000000..94b01f5af87 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-27-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-27-s.js + * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears in the middle of the block(getter) + * @noStrict + */ + + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "accProperty", { + get: function () { + eval("public = 1;"); + "use strict"; + return 11; + } + }); + return obj.accProperty === 11 && public === 1; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-28-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-28-s.js new file mode 100644 index 00000000000..f3ebe7d11e1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-28-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-28-s.js + * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the end of the block(setter) + * @noStrict + */ + + +function testcase() { + var obj = {}; + var data; + + Object.defineProperty(obj, "accProperty", { + set: function (value) { + var _10_1_1_28_s = {a:1, a:2}; + data = value; + "use strict"; + } + }); + obj.accProperty = "overrideData"; + return data==="overrideData"; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-29-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-29-s.js new file mode 100644 index 00000000000..9745777b181 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-29-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-29-s.js + * @description Strict Mode - The built-in Function constructor is contained in use strict code + * @noStrict + */ + + +function testcase() { + "use strict"; + var funObj = new Function("a", "eval('public = 1;');"); + funObj(); + return true; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2gs.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2gs.js new file mode 100644 index 00000000000..dd30cb215fb --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +/** + * @path ch10/10.1/10.1.1/10.1.1-2gs.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';' + * @noStrict + * @negative ^((?!NotEarlyError).)*$ + */ + +"use strict" +throw NotEarlyError; +var public = 1; diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-3-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-3-s.js new file mode 100644 index 00000000000..8c4e4fb5d4c --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-3-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-3-s.js + * @description Strict Mode - Use Strict Directive Prologue is '' use strict';' which the first character is space + * @noStrict + */ + + +function testcase() { + " use strict"; + var public = 1; + + return public === 1; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-30-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-30-s.js new file mode 100644 index 00000000000..79c68e7c23c --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-30-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-30-s.js + * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the start of the block + * @noStrict + */ + + +function testcase() { + try { + var funObj = new Function("a", "'use strict'; eval('public = 1;');"); + funObj(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-31-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-31-s.js new file mode 100644 index 00000000000..21c84976bcc --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-31-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-31-s.js + * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears in the middle of the block + * @noStrict + */ + + +function testcase() { + var funObj = new Function("a", "eval('public = 1;'); 'use strict'; anotherVariable = 2;"); + funObj(); + return public === 1 && anotherVariable === 2; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-32-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-32-s.js new file mode 100644 index 00000000000..a7cbc1d8c2e --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-32-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-32-s.js + * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the end of the block + * @noStrict + */ + + +function testcase() { + var funObj = new Function("a", "eval('public = 1;'); anotherVariable = 2; 'use strict';"); + funObj(); + return public === 1 && anotherVariable === 2; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-4-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-4-s.js new file mode 100644 index 00000000000..3d7db186276 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-4-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-4-s.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict ';' which the last character is space + * @noStrict + */ + + +function testcase() { + "use strict "; + var public = 1; + return public === 1; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5-s.js new file mode 100644 index 00000000000..6a9f07af477 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-5-s.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the beginning of the block + * @noStrict + */ + + +function testcase() { + "use strict"; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5gs.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5gs.js new file mode 100644 index 00000000000..63698e5e622 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +/** + * @path ch10/10.1/10.1.1/10.1.1-5gs.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the start of the code + * @noStrict + * @negative ^((?!NotEarlyError).)*$ + */ + +"use strict"; +throw NotEarlyError; +var public = 1; diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-6-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-6-s.js new file mode 100644 index 00000000000..6434c251599 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-6-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-6-s.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears in the middle of the block + * @noStrict + */ + + +function testcase() { + var interface = 2; + "use strict"; + var public = 1; + return public === 1 && interface === 2; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-7-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-7-s.js new file mode 100644 index 00000000000..42b5e1ee20a --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-7-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-7-s.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the end of the block + * @noStrict + */ + + +function testcase() { + var public = 1; + return public === 1; + "use strict"; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8-s.js new file mode 100644 index 00000000000..3fc4df80e7a --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-8-s.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the directive prologue + * @noStrict + */ + + +function testcase() { + "use strict"; + "use strict"; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8gs.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8gs.js new file mode 100644 index 00000000000..88476ac4a78 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8gs.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +/** + * @path ch10/10.1/10.1.1/10.1.1-8gs.js + * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the code + * @noStrict + * @negative ^((?!NotEarlyError).)*$ + */ + +"use strict"; +"use strict"; +throw NotEarlyError; +var public = 1; diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-9-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-9-s.js new file mode 100644 index 00000000000..b294ef1467d --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-9-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.1/10.1.1/10.1.1-9-s.js + * @description Strict Mode - Use Strict Directive Prologue is ''Use strict';' in which the first character is uppercase + * @noStrict + */ + + +function testcase() { + "Use strict"; + var public = 1; + return public === 1; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/browser.js b/js/src/tests/test262/ch10/10.1/10.1.1/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/shell.js b/js/src/tests/test262/ch10/10.1/10.1.1/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T1.js b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T1.js new file mode 100644 index 00000000000..4085aa5ace9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T1.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Program functions are defined in source text by a FunctionDeclaration or created dynamically either + * by using a FunctionExpression or by using the built-in Function object as a constructor + * + * @path ch10/10.1/S10.1.1_A1_T1.js + * @description Defining function by a FunctionDeclaration + */ + +//CHECK#1 +function f1(){ + return 1; +} +if(typeof(f1)!=="function") + $ERROR('#1: typeof(f1)!=="function"'); + diff --git a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T2.js b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T2.js new file mode 100644 index 00000000000..d453d6e5967 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T2.js @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Program functions are defined in source text by a FunctionDeclaration or created dynamically either + * by using a FunctionExpression or by using the built-in Function object as a constructor + * + * @path ch10/10.1/S10.1.1_A1_T2.js + * @description Creating function dynamically by using a FunctionExpression + */ + +//CHECK#1 +var x=function f1(){return 1;}(); +if(x!==1) + $ERROR('#1: Create function dynamically either by using a FunctionExpression'); + +//CHECK#2 +var y=function (){return 2;}(); +if(y!==2){ + $ERROR('#2: Create an anonymous function dynamically either by using a FunctionExpression'); +} + +//CHECK#2 +var z = (function(){return 3;})(); +if(z!==3){ + $ERROR('#3: Create an anonymous function dynamically either by using a FunctionExpression wrapped in a group operator'); +} + diff --git a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T3.js b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T3.js new file mode 100644 index 00000000000..5e49dcd5940 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T3.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Program functions are defined in source text by a FunctionDeclaration or created dynamically either + * by using a FunctionExpression or by using the built-in Function object as a constructor + * + * @path ch10/10.1/S10.1.1_A1_T3.js + * @description Creating function dynamically by using the built-in Function object as a constructor + */ + +//CHECK#1 +var x=new function f1(){return 1;}; +if(typeof(x.constructor)!=="function") + $ERROR('#1: typeof(x.constructor)!=="function"'); + diff --git a/js/src/tests/test262/ch10/10.1/S10.1.1_A2_T1.js b/js/src/tests/test262/ch10/10.1/S10.1.1_A2_T1.js new file mode 100644 index 00000000000..aa5701155db --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/S10.1.1_A2_T1.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * There are two types of Function objects. Internal functions + * are built-in objects of the language, such as parseInt and Math.exp + * + * @path ch10/10.1/S10.1.1_A2_T1.js + * @description Checking types of parseInt and Math.exp + */ + +//CHECK#1 +if(typeof(Math.exp)!=="function") + $ERROR('#1: typeof(Math.exp(10))!=="function" '+typeof(Math.exp())); + +//CHECK#2 +if(typeof(parseInt)!=="function") + $ERROR('#2: typeof(parseInt())!=="function" '+typeof(parseInt())); + + diff --git a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T1.js b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T1.js new file mode 100644 index 00000000000..5dee9bf43d8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T1.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The activation object is initialised with a property with name arguments and attributes {DontDelete} + * + * @path ch10/10.1/S10.1.6_A1_T1.js + * @description Checking if deleting function parameter is possible + * @noStrict + */ + +//CHECK#1 +function f1(a){ + delete a; + return a; +} +if (f1(1) !== 1) + $ERROR('#1: Function parameter was deleted'); + + diff --git a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T2.js b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T2.js new file mode 100644 index 00000000000..8747b2f110b --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T2.js @@ -0,0 +1,33 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The activation object is initialised with a property with name arguments and attributes {DontDelete} + * + * @path ch10/10.1/S10.1.6_A1_T2.js + * @description Checking funtion which returns property "arguments" + */ + +var ARG_STRING = "value of the argument property"; + +function f1() { + this.constructor.prototype.arguments = ARG_STRING; + return arguments; +} + +//CHECK#1 +if ((new f1(1,2,3,4,5)).length !== 5) + $ERROR('#1: (new f1(1,2,3,4,5)).length===5, where f1 returns "arguments" that is set to "'+ ARG_STRING + '"'); + +//CHECK#2 +if ((new f1(1,2,3,4,5))[3] !== 4) + $ERROR('#2: (new f1(1,2,3,4,5))[3]===4, where f1 returns "arguments" that is set to "'+ ARG_STRING + '"'); + +//CHECK#3 +var x = new f1(1,2,3,4,5); +if (delete x[3] !== true) + $ERROR('#3.1: Function parameters have attribute {DontDelete}'); + +if (x[3] === 4) + $ERROR('#3.2: Function parameters have attribute {DontDelete}'); + diff --git a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T3.js b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T3.js new file mode 100644 index 00000000000..95e1bf2ef38 --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T3.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The activation object is initialised with a property with name arguments and attributes {DontDelete} + * + * @path ch10/10.1/S10.1.6_A1_T3.js + * @description Checking function which returns "this" + * @noStrict + */ + +function f1() { + if (delete arguments) { + $ERROR("#1: Function parameters have attribute {DontDelete}" + arguments); + } + return arguments; +} + +f1(); + diff --git a/js/src/tests/test262/ch10/10.1/S10.1.7_A1_T1.js b/js/src/tests/test262/ch10/10.1/S10.1.7_A1_T1.js new file mode 100644 index 00000000000..f7e7a0b0cca --- /dev/null +++ b/js/src/tests/test262/ch10/10.1/S10.1.7_A1_T1.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The this value associated with an executioncontext is immutable + * + * @path ch10/10.1/S10.1.7_A1_T1.js + * @description Checking if deleting "this" fails + */ + +//CHECK#1 +if (delete this !== true) + $ERROR('#1: The this value associated with an executioncontext is immutable. Actual: this was deleted'); + + diff --git a/js/src/tests/test262/ch10/10.1/browser.js b/js/src/tests/test262/ch10/10.1/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.1/shell.js b/js/src/tests/test262/ch10/10.1/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js new file mode 100644 index 00000000000..bfc1f5eced2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js + * @description Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (NaN) + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + try { + NaN = 12; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js new file mode 100644 index 00000000000..e6083697876 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js + * @description Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (undefined) + * @onlyStrict + */ + + +function testcase() { + "use strict"; + try { + undefined = 12; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js new file mode 100644 index 00000000000..9303b79b59c --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js + * @description Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Object) + * @onlyStrict + */ + + +function testcase() { + "use strict"; + var objBak = Object; + + try { + Object = 12; + return true; + } finally { + Object = objBak; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js new file mode 100644 index 00000000000..9ecdf64a5e8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js + * @description Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Number) + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + var numBak = Number; + try { + Number = 12; + return true; + } finally { + Number = numBak; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js new file mode 100644 index 00000000000..6206633b248 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * If the caller supplies fewer parameter values than there are + * formal parameters, the extra formal parameters have value undefined + * + * @path ch10/10.2/10.2.1/S10.2.1_A1.js + * @description Calling function excluding a few parameters + */ + +//CHECK#1 +function f1(a, b){ + return (b === undefined); +} +if(!(f1(1, 2) === false)){ + $ERROR('#1: f1(1, 2) === false'); +} else if(!(f1(1) === true)){ + $ERROR('#1: f1(1) === true'); +} + +//CHECK#2 +function f2(a, b, c){ + return (b === undefined) && (c === undefined); +} +if(!(f2(1) === true)){ + $ERROR('#2: f2(1, 2) === true'); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js new file mode 100644 index 00000000000..e622c54626f --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js @@ -0,0 +1,37 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * If two or more formal parameters share the same name, hence + * the same property, the corresponding property is given the value that was + * supplied for the last parameter with this name + * + * @path ch10/10.2/10.2.1/S10.2.1_A2.js + * @description Creating functions initialized with two or more formal parameters, which have the same name + * @noStrict + */ + +//CHECK#1 +function f1(x, x) { + return x; +} +if(!(f1(1, 2) === 2)) { + $ERROR("#1: f1(1, 2) === 2"); +} + +//CHECK#2 +function f2(x, x, x){ + return x*x*x; +} +if(!(f2(1, 2, 3) === 27)){ + $ERROR("f2(1, 2, 3) === 27"); +} + +//CHECK#3 +function f3(x, x) { + return 'a' + x; +} +if(!(f3(1, 2) === 'a2')){ + $ERROR("#3: f3(1, 2) === 'a2'"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A3.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A3.js new file mode 100644 index 00000000000..1c15c0621d3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A3.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * If the value of this last parameter (which has the same + * name as some previous parameters do) was not supplied by the + * caller, the value of the corresponding property is undefined + * + * @path ch10/10.2/10.2.1/S10.2.1_A3.js + * @description Creating functions with two or more formal parameters, + * that have the same name. Calling this function excluding a few last parameters + */ + +//CHECK#1 +function f1(x, a, b, x){ + return x; +} +if(!(f1(1, 2) === undefined)){ + $ERROR('#1: f1(1, 2) === undefined'); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js new file mode 100644 index 00000000000..a153af430f6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js @@ -0,0 +1,49 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Function declaration in function code - If the variable object + * already has a property with the name of Function Identifier, replace its + * value and attributes. Semantically, this step must follow the creation of + * FormalParameterList properties + * + * @path ch10/10.2/10.2.1/S10.2.1_A4_T1.js + * @description Checking existence of a function with passed parameter + * @noStrict + */ + +//CHECK#1 +function f1(x){ + return x; + + function x(){ + return 7; + } +} +if(!(f1().constructor.prototype === Function.prototype)){ + $ERROR('#1: f1() returns function'); +} + +//CHECK#2 +function f2(x){ + return typeof x; + + function x(){ + return 7; + } +} +if(!(f2() === "function")){ + $ERROR('#2: f2() === "function"'); +} + +//CHECK#3 +function f3() { + return typeof arguments; + function arguments() { + return 7; + } +} +if (!(f3() === "function")){ + $ERROR('#3: f3() === "function"'); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js new file mode 100644 index 00000000000..16661df91db --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js @@ -0,0 +1,41 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Function declaration in function code - If the variable object + * already has a property with the name of Function Identifier, replace its + * value and attributes. Semantically, this step must follow the creation of + * FormalParameterList properties + * + * @path ch10/10.2/10.2.1/S10.2.1_A4_T2.js + * @description Checking existence of a function with declared variable + */ + +//CHECK#1 +function f1(){ + var x; + + return x; + + function x(){ + return 7; + } +} +if(!(f1().constructor.prototype === Function.prototype)){ + $PRINT('#1: f1() returns function'); +} + +//CHECK#2 +function f2(){ + var x; + + return typeof x; + + function x(){ + return 7; + } +} +if(!(f2() === "function")){ + $PRINT('#2: f2() === "function"'); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js new file mode 100644 index 00000000000..824aedeeec3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js @@ -0,0 +1,35 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * For each VariableDeclaration or VariableDeclarationNoIn in the + * code, create a property of the variable object whose name is the Identifier + * in the VariableDeclaration or VariableDeclarationNoIn, whose value is + * undefined and whose attributes are determined by the type of code + * + * @path ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js + * @description Checking variable existence only + */ + +//CHECK#1 +function f1(){ + var x; + + return typeof x; +} + +if(!(f1() === "undefined")){ + $PRINT('#1: f1() === "undefined"'); +} + +//CHECK#2 +function f2(){ + var x; + + return x; +} + +if(!(f2() === undefined)){ + $PRINT('#1: f2() === undefined'); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js new file mode 100644 index 00000000000..adef8b5c5d4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js @@ -0,0 +1,35 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * For each VariableDeclaration or VariableDeclarationNoIn in the + * code, create a property of the variable object whose name is the Identifier + * in the VariableDeclaration or VariableDeclarationNoIn, whose value is + * undefined and whose attributes are determined by the type of code + * + * @path ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js + * @description Checking existence of the variable object property with formal parameter + */ + +//CHECK#1 +function f1(x){ + var x; + + return typeof x; +} + +if(!(f1() === "undefined")){ + $PRINT('#1: f1(1) === "undefined"'); +} + +//CHECK#2 +function f2(x){ + var x; + + return x; +} + +if(!(f2() === undefined)){ + $PRINT('#1: f2(1) === undefined'); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js new file mode 100644 index 00000000000..d5321c9079a --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js @@ -0,0 +1,34 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * If there is already a property of the variable object with the + * name of a declared variable, the value of the property and its attributes + * are not changed + * + * @path ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js + * @description Checking existence of the variable object property with formal parameter + */ + +//CHECK#1 +function f1(x){ + var x; + + return typeof x; +} + +if(!(f1(1) === "number")){ + $PRINT('#1: f1(1) === "number"'); +} + +//CHECK#2 +function f2(x){ + var x; + + return x; +} + +if(!(f2(1) === 1)){ + $PRINT('#1: f2(1) === 1'); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/browser.js b/js/src/tests/test262/ch10/10.2/10.2.1/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/shell.js b/js/src/tests/test262/ch10/10.2/10.2.1/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js new file mode 100644 index 00000000000..7aba918d178 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T1.js + * @description Checking scope chain containing function declarations + */ + +var x = 0; + +function f1(){ + var x = 1; + function f2(){ + return x; + }; + return f2(); +} + +if(!(f1() === 1)){ + $ERROR("#1: Scope chain disturbed"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js new file mode 100644 index 00000000000..33b47241881 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js @@ -0,0 +1,25 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T2.js + * @description Checking scope chain containing function declarations + */ + +var x = 0; + +function f1(){ + function f2(){ + return x; + }; + return f2(); +} + +if(!(f1() === 0)){ + $ERROR("#1: Scope chain disturbed"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js new file mode 100644 index 00000000000..a9a85deff06 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T3.js + * @description Checking scope chain containing function declarations + */ + +var x = 0; + +function f1(){ + function f2(){ + return x; + }; + return f2(); + + var x = 1; +} + +if(!(f1() === undefined)){ + $ERROR("#1: Scope chain disturbed"); +} + + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js new file mode 100644 index 00000000000..e32ffac3525 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js @@ -0,0 +1,27 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T4.js + * @description Checking scope chain containing function declarations + */ + +var x = 0; + +function f1(){ + function f2(){ + return x; + }; + + var x = 1; + return f2(); +} + +if(!(f1() === 1)){ + $ERROR("#1: Scope chain disturbed"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js new file mode 100644 index 00000000000..c71654f6fef --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js @@ -0,0 +1,31 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T5.js + * @description Checking scope chain containing function declarations and "with" + * @noStrict + */ + +var x = 0; + +var myObj = {x : "obj"}; + +function f1(){ + var x = 1; + function f2(){ + with(myObj){ + return x; + } + }; + return f2(); +} + +if(!(f1() === "obj")){ + $ERROR("#1: Scope chain disturbed"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js new file mode 100644 index 00000000000..990c27ef3c5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js @@ -0,0 +1,30 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T6.js + * @description Checking scope chain containing function declarations and "with" + * @noStrict + */ + +var x = 0; + +var myObj = {x : "obj"}; + +function f1(){ + function f2(){ + with(myObj){ + return x; + } + }; + return f2(); +} + +if(!(f1() === "obj")){ + $ERROR("#1: Scope chain disturbed"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js new file mode 100644 index 00000000000..cc719b5046c --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T7.js + * @description Checking scope chain containing function declarations and "with" + * @noStrict + */ + +var x = 0; + +var myObj = {x : "obj"}; + +function f1(){ + function f2(){ + with(myObj){ + return x; + } + }; + return f2(); + + var x = 1; +} + +if(!(f1() === "obj")){ + $ERROR("#1: Scope chain disturbed"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js new file mode 100644 index 00000000000..3aaefcf14bc --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T8.js + * @description Checking scope chain containing function declarations and "with" + * @noStrict + */ + +var x = 0; + +var myObj = {x : "obj"}; + +function f1(){ + function f2(){ + with(myObj){ + return x; + } + }; + + var x = 1; + return f2(); +} + +if(!(f1() === "obj")){ + $ERROR("#1: Scope chain disturbed"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js new file mode 100644 index 00000000000..c03fdd1cf42 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js @@ -0,0 +1,27 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every execution context has associated with it a scope chain. + * A scope chain is a list of objects that are searched when evaluating an + * Identifier + * + * @path ch10/10.2/10.2.2/S10.2.2_A1_T9.js + * @description Checking scope chain containing function declarations and "with" + * @noStrict + */ + +var x = 0; + +var myObj = {x : "obj"}; + +function f1(){ + with(myObj){ + return x; + } +} + +if(!(f1() === "obj")){ + $ERROR("#1: Scope chain disturbed"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/browser.js b/js/src/tests/test262/ch10/10.2/10.2.2/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/shell.js b/js/src/tests/test262/ch10/10.2/10.2.2/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js new file mode 100644 index 00000000000..6a133d78890 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js + * @description Global execution context - Value Properties + */ + +//CHECK#1 +if ( NaN === null ) { + $ERROR("#1: NaN === null"); +} + +//CHECK#2 +if ( Infinity === null ) { + $ERROR("#2: Infinity === null"); +} + +//CHECK#3 +if ( undefined === null ) { + $ERROR("#3: undefined === null"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js new file mode 100644 index 00000000000..1fafadc99ff --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js @@ -0,0 +1,56 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js + * @description Global execution context - Function Properties + */ + +//CHECK#4 +if ( eval === null ) { + $ERROR("#4: eval === null"); +} + +//CHECK#5 +if ( parseInt === null ) { + $ERROR("#5: parseInt === null"); +} + +//CHECK#6 +if ( parseFloat === null ) { + $ERROR("#6: parseFloat === null"); +} + +//CHECK#7 +if ( isNaN === null ) { + $ERROR("#7: isNaN === null"); +} + +//CHECK#8 +if ( isFinite === null ) { + $ERROR("#8: isFinite === null"); +} + +//CHECK#9 +if ( decodeURI === null ) { + $ERROR("#9: decodeURI === null"); +} + +//CHECK#10 +if ( decodeURIComponent === null ) { + $ERROR("#10: decodeURIComponent === null"); +} + +//CHECK#11 +if ( encodeURI === null ) { + $ERROR("#11: encodeURI === null"); +} + +//CHECK#12 +if ( encodeURIComponent === null ) { + $ERROR("#12: encodeURIComponent === null"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js new file mode 100644 index 00000000000..3407039e883 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js @@ -0,0 +1,87 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js + * @description Global execution context - Constructor Properties + */ + +//CHECK#13 +if ( Object === null ) { + $ERROR("#13: Object === null"); +} + +//CHECK#14 +if ( Function === null ) { + $ERROR("#14: Function === null"); +} + +//CHECK#15 +if ( String === null ) { + $ERROR("#15: String === null"); +} + +//CHECK#16 +if ( Number === null ) { + $ERROR("#16: Number === null"); +} + +//CHECK#17 +if ( Array === null ) { + $ERROR("#17: Array === null"); +} + +//CHECK#18 +if ( Boolean === null ) { + $ERROR("#20: Boolean === null"); +} + +//CHECK#18 +if ( Date === null ) { + $ERROR("#18: Date === null"); +} + +//CHECK#19 +if ( RegExp === null ) { + $ERROR("#19: RegExp === null"); +} + +//CHECK#20 +if ( Error === null ) { + $ERROR("#20: Error === null"); +} + +//CHECK#21 +if ( EvalError === null ) { + $ERROR("#21: EvalError === null"); +} + +//CHECK#22 +if ( RangeError === null ) { + $ERROR("#22: RangeError === null"); +} + +//CHECK#23 +if ( ReferenceError === null ) { + $ERROR("#23: ReferenceError === null"); +} + +//CHECK#24 +if ( SyntaxError === null ) { + $ERROR("#24: SyntaxError === null"); +} + +//CHECK#25 +if ( TypeError === null ) { + $ERROR("#25: TypeError === null"); +} + +//CHECK#26 +if ( URIError === null ) { + $ERROR("#26: URIError === null"); +} + + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js new file mode 100644 index 00000000000..f59cc646e9d --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js + * @description Global execution context - Other Properties + */ + +//CHECK#27 +if ( Math === null ) { + $ERROR("#27: Math === null"); +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js new file mode 100644 index 00000000000..a6b6c4bbf0d --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js @@ -0,0 +1,30 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js + * @description Function execution context - Value Properties + */ + +function test() { + //CHECK#1 + if ( NaN === null ) { + $ERROR("#1: NaN === null"); + } + + //CHECK#2 + if ( Infinity === null ) { + $ERROR("#2: Infinity === null"); + } + + //CHECK#3 + if ( undefined === null ) { + $ERROR("#3: undefined === null"); + } +} + +test(); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js new file mode 100644 index 00000000000..45ca89f3663 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js @@ -0,0 +1,60 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js + * @description Function execution context - Function Properties + */ + +function test() { + //CHECK#4 + if ( eval === null ) { + $ERROR("#4: eval === null"); + } + + //CHECK#5 + if ( parseInt === null ) { + $ERROR("#5: parseInt === null"); + } + + //CHECK#6 + if ( parseFloat === null ) { + $ERROR("#6: parseFloat === null"); + } + + //CHECK#7 + if ( isNaN === null ) { + $ERROR("#7: isNaN === null"); + } + + //CHECK#8 + if ( isFinite === null ) { + $ERROR("#8: isFinite === null"); + } + + //CHECK#9 + if ( decodeURI === null ) { + $ERROR("#9: decodeURI === null"); + } + + //CHECK#10 + if ( decodeURIComponent === null ) { + $ERROR("#10: decodeURIComponent === null"); + } + + //CHECK#11 + if ( encodeURI === null ) { + $ERROR("#11: encodeURI === null"); + } + + //CHECK#12 + if ( encodeURIComponent === null ) { + $ERROR("#12: encodeURIComponent === null"); + } +} + +test(); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js new file mode 100644 index 00000000000..295943cb75b --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js @@ -0,0 +1,90 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js + * @description Function execution context - Constructor Properties + */ + +function test() { + //CHECK#13 + if ( Object === null ) { + $ERROR("#13: Object === null"); + } + + //CHECK#14 + if ( Function === null ) { + $ERROR("#14: Function === null"); + } + + //CHECK#15 + if ( String === null ) { + $ERROR("#15: String === null"); + } + + //CHECK#16 + if ( Number === null ) { + $ERROR("#16: Function === null"); + } + + //CHECK#17 + if ( Array === null ) { + $ERROR("#17: Array === null"); + } + + //CHECK#18 + if ( Boolean === null ) { + $ERROR("#20: Boolean === null"); + } + + //CHECK#18 + if ( Date === null ) { + $ERROR("#18: Date === null"); + } + + //CHECK#19 + if ( RegExp === null ) { + $ERROR("#19: RegExp === null"); + } + + //CHECK#20 + if ( Error === null ) { + $ERROR("#20: Error === null"); + } + + //CHECK#21 + if ( EvalError === null ) { + $ERROR("#21: EvalError === null"); + } + + //CHECK#22 + if ( RangeError === null ) { + $ERROR("#22: RangeError === null"); + } + + //CHECK#23 + if ( ReferenceError === null ) { + $ERROR("#23: ReferenceError === null"); + } + + //CHECK#24 + if ( SyntaxError === null ) { + $ERROR("#24: SyntaxError === null"); + } + + //CHECK#25 + if ( TypeError === null ) { + $ERROR("#25: TypeError === null"); + } + + //CHECK#26 + if ( URIError === null ) { + $ERROR("#26: URIError === null"); + } +} + +test(); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js new file mode 100644 index 00000000000..01d02fb3938 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js + * @description Function execution context - Other Properties + */ + +function test() { + //CHECK#27 + if ( Math === null ) { + $ERROR("#27: Math === null"); + } +} + +test(); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js new file mode 100644 index 00000000000..695f0acf5f0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js @@ -0,0 +1,30 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js + * @description Eval execution context - Value Properties + */ + +var evalStr = +'//CHECK#1\n'+ +'if ( NaN === null ) {\n'+ +' $ERROR("#1: NaN === null");\n'+ +'}\n'+ + +'//CHECK#2\n'+ +'if ( Infinity === null ) {\n'+ +' $ERROR("#2: Infinity === null");\n'+ +'}\n'+ + +'//CHECK#3\n'+ +'if ( undefined === null ) {\n'+ +' $ERROR("#3: undefined === null");\n'+ +'}\n'+ +';\n'; + +eval(evalStr); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js new file mode 100644 index 00000000000..5afd0ef9356 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js @@ -0,0 +1,60 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js + * @description Eval execution context - Function Properties + */ + +var evalStr = +'//CHECK#4\n'+ +'if ( eval === null ) {\n'+ +' $ERROR("#4: eval === null");\n'+ +'}\n'+ + +'//CHECK#5\n'+ +'if ( parseInt === null ) {\n'+ +' $ERROR("#5: parseInt === null");\n'+ +'}\n'+ + +'//CHECK#6\n'+ +'if ( parseFloat === null ) {\n'+ +' $ERROR("#6: parseFloat === null");\n'+ +'}\n'+ + +'//CHECK#7\n'+ +'if ( isNaN === null ) {\n'+ +' $ERROR("#7: isNaN === null");\n'+ +'}\n'+ + +'//CHECK#8\n'+ +'if ( isFinite === null ) {\n'+ +' $ERROR("#8: isFinite === null");\n'+ +'}\n'+ + +'//CHECK#9\n'+ +'if ( decodeURI === null ) {\n'+ +' $ERROR("#9: decodeURI === null");\n'+ +'}\n'+ + +'//CHECK#10\n'+ +'if ( decodeURIComponent === null ) {\n'+ +' $ERROR("#10: decodeURIComponent === null");\n'+ +'}\n'+ + +'//CHECK#11\n'+ +'if ( encodeURI === null ) {\n'+ +' $ERROR("#11: encodeURI === null");\n'+ +'}\n'+ + +'//CHECK#12\n'+ +'if ( encodeURIComponent === null ) {\n'+ +' $ERROR("#12: encodeURIComponent === null");\n'+ +'}\n'+ +';\n'; + +eval(evalStr); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js new file mode 100644 index 00000000000..b34b1e252eb --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js @@ -0,0 +1,90 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js + * @description Eval execution context - Constructor Properties + */ + +var evalStr = +'//CHECK#13\n'+ +'if ( Object === null ) {\n'+ +' $ERROR("#13: Object === null");\n'+ +'}\n'+ + +'//CHECK#14\n'+ +'if ( Function === null ) {\n'+ +' $ERROR("#14: Function === null");\n'+ +'}\n'+ + +'//CHECK#15\n'+ +'if ( String === null ) {\n'+ +' $ERROR("#15: String === null");\n'+ +'}\n'+ + +'//CHECK#16\n'+ +'if ( Number === null ) {\n'+ +' $ERROR("#16: Function === null");\n'+ +'}\n'+ + +'//CHECK#17\n'+ +'if ( Array === null ) {\n'+ +' $ERROR("#17: Array === null");\n'+ +'}\n'+ + +'//CHECK#18\n'+ +'if ( Boolean === null ) {\n'+ +' $ERROR("#20: Boolean === null");\n'+ +'}\n'+ + +'//CHECK#18\n'+ +'if ( Date === null ) {\n'+ +' $ERROR("#18: Date === null");\n'+ +'}\n'+ + +'//CHECK#19\n'+ +'if ( RegExp === null ) {\n'+ +' $ERROR("#19: RegExp === null");\n'+ +'}\n'+ + +'//CHECK#20\n'+ +'if ( Error === null ) {\n'+ +' $ERROR("#20: Error === null");\n'+ +'}\n'+ + +'//CHECK#21\n'+ +'if ( EvalError === null ) {\n'+ +' $ERROR("#21: EvalError === null");\n'+ +'}\n'+ + +'//CHECK#22\n'+ +'if ( RangeError === null ) {\n'+ +' $ERROR("#22: RangeError === null");\n'+ +'}\n'+ + +'//CHECK#23\n'+ +'if ( ReferenceError === null ) {\n'+ +' $ERROR("#23: ReferenceError === null");\n'+ +'}\n'+ + +'//CHECK#24\n'+ +'if ( SyntaxError === null ) {\n'+ +' $ERROR("#24: SyntaxError === null");\n'+ +'}\n'+ + +'//CHECK#25\n'+ +'if ( TypeError === null ) {\n'+ +' $ERROR("#25: TypeError === null");\n'+ +'}\n'+ + +'//CHECK#26\n'+ +'if ( URIError === null ) {\n'+ +' $ERROR("#26: URIError === null");\n'+ +'}\n'+ +';\n'; + +eval(evalStr); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js new file mode 100644 index 00000000000..054969ce2df --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object has properties such as built-in objects such as + * Math, String, Date, parseInt, etc + * + * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js + * @description Eval execution context - Other Properties + */ + +var evalStr = +'//CHECK#27\n'+ +'if ( Math === null ) {\n'+ +' $ERROR("#27: Math === null");\n'+ +'}\n'+ +';\n'; + +eval(evalStr); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js new file mode 100644 index 00000000000..db57ad5baed --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js + * @description Global execution context - Value Properties + */ + +//CHECK#1 +for (var x in this) { + if ( x === 'NaN' ) { + $ERROR("#1: 'NaN' have attribute DontEnum"); + } else if ( x === 'Infinity' ) { + $ERROR("#1: 'Infinity' have attribute DontEnum"); + } else if ( x === 'undefined' ) { + $ERROR("#1: 'undefined' have attribute DontEnum"); + } +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js new file mode 100644 index 00000000000..6a39d43a171 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js @@ -0,0 +1,33 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js + * @description Global execution context - Function Properties + */ + +//CHECK#1 +for (var x in this) { + if ( x === 'eval' ) { + $ERROR("#1: 'eval' have attribute DontEnum"); + } else if ( x === 'parseInt' ) { + $ERROR("#1: 'parseInt' have attribute DontEnum"); + } else if ( x === 'parseFloat' ) { + $ERROR("#1: 'parseFloat' have attribute DontEnum"); + } else if ( x === 'isNaN' ) { + $ERROR("#1: 'isNaN' have attribute DontEnum"); + } else if ( x === 'isFinite' ) { + $ERROR("#1: 'isFinite' have attribute DontEnum"); + } else if ( x === 'decodeURI' ) { + $ERROR("#1: 'decodeURI' have attribute DontEnum"); + } else if ( x === 'decodeURIComponent' ) { + $ERROR("#1: 'decodeURIComponent' have attribute DontEnum"); + } else if ( x === 'encodeURI' ) { + $ERROR("#1: 'encodeURI' have attribute DontEnum"); + } else if ( x === 'encodeURIComponent' ) { + $ERROR("#1: 'encodeURIComponent' have attribute DontEnum"); + } +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js new file mode 100644 index 00000000000..c684a649a2a --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js @@ -0,0 +1,45 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js + * @description Global execution context - Constructor Properties + */ + +//CHECK#1 +for (var x in this) { + if ( x === 'Object' ) { + $ERROR("#1: 'property 'Object' have attribute DontEnum"); + } else if ( x === 'Function') { + $ERROR("#1: 'Function' have attribute DontEnum"); + } else if ( x === 'String' ) { + $ERROR("#1: 'String' have attribute DontEnum"); + } else if ( x === 'Number' ) { + $ERROR("#1: 'Number' have attribute DontEnum"); + } else if ( x === 'Array' ) { + $ERROR("#1: 'Array' have attribute DontEnum"); + } else if ( x === 'Boolean' ) { + $ERROR("#1: 'Boolean' have attribute DontEnum"); + } else if ( x === 'Date' ) { + $ERROR("#1: 'Date' have attribute DontEnum"); + } else if ( x === 'RegExp' ) { + $ERROR("#1: 'RegExp' have attribute DontEnum"); + } else if ( x === 'Error' ) { + $ERROR("#1: 'Error' have attribute DontEnum"); + } else if ( x === 'EvalError' ) { + $ERROR("#1: 'EvalError' have attribute DontEnum"); + } else if ( x === 'RangeError' ) { + $ERROR("#1: 'RangeError' have attribute DontEnum"); + } else if ( x === 'ReferenceError' ) { + $ERROR("#1: 'ReferenceError' have attribute DontEnum"); + } else if ( x === 'SyntaxError' ) { + $ERROR("#1: 'SyntaxError' have attribute DontEnum"); + } else if ( x === 'TypeError' ) { + $ERROR("#1: 'TypeError' have attribute DontEnum"); + } else if ( x === 'URIError' ) { + $ERROR("#1: 'URIError' have attribute DontEnum"); + } +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js new file mode 100644 index 00000000000..cb575c5330f --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js + * @description Global execution context - Other Properties + */ + +//CHECK#1 +for (var x in this) { + if ( x === 'Math' ) { + $ERROR("#1: 'Math' have attribute DontEnum"); + } +} + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js new file mode 100644 index 00000000000..808cc1b605a --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js @@ -0,0 +1,25 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js + * @description Function execution context - Value Properties + */ + +function test() { + //CHECK#1 + for (var x in this) { + if ( x === 'NaN' ) { + $ERROR("#1: 'NaN' have attribute DontEnum"); + } else if ( x === 'Infinity' ) { + $ERROR("#1: 'Infinity' have attribute DontEnum"); + } else if ( x === 'undefined' ) { + $ERROR("#1: 'undefined' have attribute DontEnum"); + } + } +} + +test(); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js new file mode 100644 index 00000000000..ac87a58efd1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js @@ -0,0 +1,37 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js + * @description Function execution context - Function Properties + */ + +function test() { + //CHECK#1 + for (var x in this) { + if ( x === 'eval' ) { + $ERROR("#1: 'eval' have attribute DontEnum"); + } else if ( x === 'parseInt' ) { + $ERROR("#1: 'parseInt' have attribute DontEnum"); + } else if ( x === 'parseFloat' ) { + $ERROR("#1: 'parseFloat' have attribute DontEnum"); + } else if ( x === 'isNaN' ) { + $ERROR("#1: 'isNaN' have attribute DontEnum"); + } else if ( x === 'isFinite' ) { + $ERROR("#1: 'isFinite' have attribute DontEnum"); + } else if ( x === 'decodeURI' ) { + $ERROR("#1: 'decodeURI' have attribute DontEnum"); + } else if ( x === 'decodeURIComponent' ) { + $ERROR("#1: 'decodeURIComponent' have attribute DontEnum"); + } else if ( x === 'encodeURI' ) { + $ERROR("#1: 'encodeURI' have attribute DontEnum"); + } else if ( x === 'encodeURIComponent' ) { + $ERROR("#1: 'encodeURIComponent' have attribute DontEnum"); + } + } +} + +test(); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js new file mode 100644 index 00000000000..e6f5f4ac7b9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js @@ -0,0 +1,49 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js + * @description Function execution context - Constructor Properties + */ + +function test() { + //CHECK#1 + for (var x in this) { + if ( x === 'Object' ) { + $ERROR("#1: 'property 'Object' have attribute DontEnum"); + } else if ( x === 'Function') { + $ERROR("#1: 'Function' have attribute DontEnum"); + } else if ( x === 'String' ) { + $ERROR("#1: 'String' have attribute DontEnum"); + } else if ( x === 'Number' ) { + $ERROR("#1: 'Number' have attribute DontEnum"); + } else if ( x === 'Array' ) { + $ERROR("#1: 'Array' have attribute DontEnum"); + } else if ( x === 'Boolean' ) { + $ERROR("#1: 'Boolean' have attribute DontEnum"); + } else if ( x === 'Date' ) { + $ERROR("#1: 'Date' have attribute DontEnum"); + } else if ( x === 'RegExp' ) { + $ERROR("#1: 'RegExp' have attribute DontEnum"); + } else if ( x === 'Error' ) { + $ERROR("#1: 'Error' have attribute DontEnum"); + } else if ( x === 'EvalError' ) { + $ERROR("#1: 'EvalError' have attribute DontEnum"); + } else if ( x === 'RangeError' ) { + $ERROR("#1: 'RangeError' have attribute DontEnum"); + } else if ( x === 'ReferenceError' ) { + $ERROR("#1: 'ReferenceError' have attribute DontEnum"); + } else if ( x === 'SyntaxError' ) { + $ERROR("#1: 'SyntaxError' have attribute DontEnum"); + } else if ( x === 'TypeError' ) { + $ERROR("#1: 'TypeError' have attribute DontEnum"); + } else if ( x === 'URIError' ) { + $ERROR("#1: 'URIError' have attribute DontEnum"); + } + } +} + +test(); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js new file mode 100644 index 00000000000..3a6afa5cc0c --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js + * @description Function execution context - Other Properties + */ + +function test() { + //CHECK#1 + for (var x in this) { + if ( x === 'Math' ) { + $ERROR("#1: 'Math' have attribute DontEnum"); + } + } +} + +test(); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js new file mode 100644 index 00000000000..f7f32c563eb --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js + * @description Global execution context - Value Properties + */ + +var evalStr = +'//CHECK#1\n'+ +'for (var x in this) {\n'+ +' if ( x === \'NaN\' ) {\n'+ +' $ERROR("#1: \'NaN\' have attribute DontEnum");\n'+ +' } else if ( x === \'Infinity\' ) {\n'+ +' $ERROR("#1: \'Infinity\' have attribute DontEnum");\n'+ +' } else if ( x === \'undefined\' ) {\n'+ +' $ERROR("#1: \'undefined\' have attribute DontEnum");\n'+ +' }\n'+ +'}\n'; + +eval(evalStr); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js new file mode 100644 index 00000000000..8d3cfe7ee0a --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js @@ -0,0 +1,36 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js + * @description Global execution context - Function Properties + */ + +var evalStr = +'//CHECK#1\n'+ +'for (var x in this) {\n'+ +' if ( x === \'eval\' ) {\n'+ +' $ERROR("#1: \'eval\' have attribute DontEnum");\n'+ +' } else if ( x === \'parseInt\' ) {\n'+ +' $ERROR("#1: \'parseInt\' have attribute DontEnum");\n'+ +' } else if ( x === \'parseFloat\' ) {\n'+ +' $ERROR("#1: \'parseFloat\' have attribute DontEnum");\n'+ +' } else if ( x === \'isNaN\' ) {\n'+ +' $ERROR("#1: \'isNaN\' have attribute DontEnum");\n'+ +' } else if ( x === \'isFinite\' ) {\n'+ +' $ERROR("#1: \'isFinite\' have attribute DontEnum");\n'+ +' } else if ( x === \'decodeURI\' ) {\n'+ +' $ERROR("#1: \'decodeURI\' have attribute DontEnum");\n'+ +' } else if ( x === \'decodeURIComponent\' ) {\n'+ +' $ERROR("#1: \'decodeURIComponent\' have attribute DontEnum");\n'+ +' } else if ( x === \'encodeURI\' ) {\n'+ +' $ERROR("#1: \'encodeURI\' have attribute DontEnum");\n'+ +' } else if ( x === \'encodeURIComponent\' ) {\n'+ +' $ERROR("#1: \'encodeURIComponent\' have attribute DontEnum");\n'+ +' }\n'+ +'}\n'; + +eval(evalStr); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js new file mode 100644 index 00000000000..9ae75beb9ab --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js @@ -0,0 +1,48 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js + * @description Global execution context - Constructor Properties + */ + +var evalStr = +'//CHECK#1\n'+ +'for (var x in this) {\n'+ +' if ( x === \'Object\' ) {\n'+ +' $ERROR("#1: \'Object\' have attribute DontEnum");\n'+ +' } else if ( x === \'Function\') {\n'+ +' $ERROR("#1: \'Function\' have attribute DontEnum");\n'+ +' } else if ( x === \'String\' ) {\n'+ +' $ERROR("#1: \'String\' have attribute DontEnum");\n'+ +' } else if ( x === \'Number\' ) {\n'+ +' $ERROR("#1: \'Number\' have attribute DontEnum");\n'+ +' } else if ( x === \'Array\' ) {\n'+ +' $ERROR("#1: \'Array\' have attribute DontEnum");\n'+ +' } else if ( x === \'Boolean\' ) {\n'+ +' $ERROR("#1: \'Boolean\' have attribute DontEnum");\n'+ +' } else if ( x === \'Date\' ) {\n'+ +' $ERROR("#1: \'Date\' have attribute DontEnum");\n'+ +' } else if ( x === \'RegExp\' ) {\n'+ +' $ERROR("#1: \'RegExp\' have attribute DontEnum");\n'+ +' } else if ( x === \'Error\' ) {\n'+ +' $ERROR("#1: \'Error\' have attribute DontEnum");\n'+ +' } else if ( x === \'EvalError\' ) {\n'+ +' $ERROR("#1: \'EvalError\' have attribute DontEnum");\n'+ +' } else if ( x === \'RangeError\' ) {\n'+ +' $ERROR("#1: \'RangeError\' have attribute DontEnum");\n'+ +' } else if ( x === \'ReferenceError\' ) {\n'+ +' $ERROR("#1: \'ReferenceError\' have attribute DontEnum");\n'+ +' } else if ( x === \'SyntaxError\' ) {\n'+ +' $ERROR("#1: \'SyntaxError\' have attribute DontEnum");\n'+ +' } else if ( x === \'TypeError\' ) {\n'+ +' $ERROR("#1: \'TypeError\' have attribute DontEnum");\n'+ +' } else if ( x === \'URIError\' ) {\n'+ +' $ERROR("#1: \'URIError\' have attribute DontEnum");\n'+ +' }\n'+ +'}\n'; + +eval(evalStr); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js new file mode 100644 index 00000000000..ed60835c9fd --- /dev/null +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Global object properties have attributes { DontEnum } + * + * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js + * @description Global execution context - Other Properties + */ + +var evalStr = +'//CHECK#1\n'+ +'for (var x in this) {\n'+ +' if ( x === \'Math\' ) {\n'+ +' $ERROR("#1: \'Math\' have attribute DontEnum");\n'+ +' }\n'+ +'}\n'; + +eval(evalStr); + diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/browser.js b/js/src/tests/test262/ch10/10.2/10.2.3/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/shell.js b/js/src/tests/test262/ch10/10.2/10.2.3/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/browser.js b/js/src/tests/test262/ch10/10.2/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.2/shell.js b/js/src/tests/test262/ch10/10.2/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js b/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js new file mode 100644 index 00000000000..04abf8bef31 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Variable instantiation is performed using the global object as + * the variable object and using property attributes { DontDelete } + * + * @path ch10/10.4/10.4.1/S10.4.1_A1_T1.js + * @description Checking if deleting variable x, that is defined as var x = 1, fails + * @noStrict + */ + +var x = 1; + +if (this.x !== 1) { + $ERROR("#1: variable x is a property of global object"); +} + +if(delete this.x !== false){ + $ERROR("#2: variable x has property attribute DontDelete"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js b/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js new file mode 100644 index 00000000000..107381f2d44 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Variable instantiation is performed using the global object as + * the variable object and using property attributes { DontDelete } + * + * @path ch10/10.4/10.4.1/S10.4.1_A1_T2.js + * @description Checking if deleting variable x, that is defined as x = 1, fails + * @noStrict + */ + +x = 1; + +if (this.x !== 1) { + $ERROR("#1: variable x is a property of global object"); +} + +if(delete this.x !== true){ + $ERROR("#2: variable x has property attribute DontDelete"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.1/browser.js b/js/src/tests/test262/ch10/10.4/10.4.1/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.4/10.4.1/shell.js b/js/src/tests/test262/ch10/10.4/10.4.1/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js new file mode 100644 index 00000000000..233eac2c81f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-1-1.js + * @description Indirect call to eval has context set to global context + */ + +var __10_4_2_1_1_1 = "str"; +function testcase() { + try { + + var _eval = eval; + var __10_4_2_1_1_1 = "str1"; + if(_eval("\'str\' === __10_4_2_1_1_1") === true && // indirect eval + eval("\'str1\' === __10_4_2_1_1_1") === true) { // direct eval + return true; + } + return false; + } finally { + delete this.__10_4_2_1_1_1; + } +} +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js new file mode 100644 index 00000000000..7c144f5529f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js @@ -0,0 +1,31 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-1-2.js + * @description Indirect call to eval has context set to global context (nested function) + */ + +var __10_4_2_1_2 = "str"; +function testcase() { + try { + + var _eval = eval; + var __10_4_2_1_2 = "str1"; + function foo() { + var __10_4_2_1_2 = "str2"; + if(_eval("\'str\' === __10_4_2_1_2") === true && // indirect eval + eval("\'str2\' === __10_4_2_1_2") === true) { // direct eval + return true; + } else { + return false; + } + } + return foo(); + } finally { + delete this.__10_4_2_1_1_2; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js new file mode 100644 index 00000000000..078ea21abf2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js @@ -0,0 +1,34 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-1-3.js + * @description Indirect call to eval has context set to global context (catch block) + */ + +var __10_4_2_1_3 = "str"; +function testcase() { + + try { + + var _eval = eval; + var __10_4_2_1_3 = "str1"; + try { + throw "error"; + } + catch (e) { + var __10_4_2_1_3 = "str2"; + if (_eval("\'str\' === __10_4_2_1_3") === true && // indirect eval + eval("\'str2\' === __10_4_2_1_3") === true) { // direct eval + return true; + } else { + return false; + } + } + } finally { + delete this.__10_4_2_1_3; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js new file mode 100644 index 00000000000..8a025f0d9cd --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js @@ -0,0 +1,29 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-1-4.js + * @description Indirect call to eval has context set to global context (with block) + */ + +var __10_4_2_1_4 = "str"; +function testcase() { + try { + var o = new Object(); + o.__10_4_2_1_4 = "str2"; + var _eval = eval; + var __10_4_2_1_4 = "str1"; + with (o) { + if (_eval("\'str\' === __10_4_2_1_4") === true && // indirect eval + eval("\'str2\' === __10_4_2_1_4") === true) { // direct eval + return true; + } + } + return false; + } finally { + delete this.__10_4_2_1_4; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js new file mode 100644 index 00000000000..3808a9988db --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-1-5.js + * @description Indirect call to eval has context set to global context (inside another eval) + */ + +var __10_4_2_1_5 = "str"; +function testcase() { + try { + + var __10_4_2_1_5 = "str1"; + var r = eval("\ + var _eval = eval; \ + var __10_4_2_1_5 = \'str2\'; \ + _eval(\"\'str\' === __10_4_2_1_5 \") && \ + eval(\"\'str2\' === __10_4_2_1_5\")\ + "); + return r; + } finally { + delete this.__10_4_2_1_5; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js new file mode 100644 index 00000000000..61d85cec014 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-2-c-1.js + * @description Direct val code in non-strict mode - can instantiate variable in calling context + */ + + +function testcase() { + var x = 0; + return function inner() { + eval("var x = 1"); + if (x === 1) + return true; + } (); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js new file mode 100644 index 00000000000..fb00b04f5a2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-2-s.js + * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval + * @onlyStrict + */ + + +function testcase() { + "use strict"; + eval("(function fun(x){ return x })(10)"); + return typeof (fun) === "undefined"; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js new file mode 100644 index 00000000000..57ee1912d0d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-3-c-1-s.js + * @description Direct eval code in strict mode - cannot instantiate variable in the variable environment of the calling context + * @onlyStrict + */ + + +function testcase() { + var _10_4_2_3_c_1_s = 0; + function _10_4_2_3_c_1_sFunc() { + eval("'use strict';var _10_4_2_3_c_1_s = 1"); + return _10_4_2_3_c_1_s===0; + } + return _10_4_2_3_c_1_sFunc(); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js new file mode 100644 index 00000000000..91caa626b70 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2-3-c-2-s.js + * @description Calling code in strict mode - eval cannot instantiate variable in the variable environment of the calling context + * @onlyStrict + */ + + +function testcase() { + var _10_4_2_3_c_2_s = 0; + function _10_4_2_3_c_2_sFunc() { + 'use strict'; + eval("var _10_4_2_3_c_2_s = 1"); + return _10_4_2_3_c_2_s===0; + } + return _10_4_2_3_c_2_sFunc(); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js new file mode 100644 index 00000000000..e0d77031f76 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +/** + * @path ch10/10.4/10.4.2/10.4.2.1-1gs.js + * @description Strict Mode - eval code cannot instantiate variable in the variable environment of the calling context that invoked the eval if the code of the calling context is strict code + * @onlyStrict + * @negative ^((?!NotEarlyError).)*$ + */ + +"use strict"; +eval("var x = 7;"); +x = 9; +throw NotEarlyError; diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js new file mode 100644 index 00000000000..5fc76cb35cb --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2.1-2-s.js + * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + eval("function _10_4_2_1_2_fun(){}"); + return typeof _10_4_2_1_2_fun === "undefined"; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js new file mode 100644 index 00000000000..89ce853994f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.2/10.4.2.1-4-s.js + * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval which is contained in strict mode code + * @onlyStrict + */ + + +function testcase() { + + eval("'use strict'; function _10_4_2_1_4_fun(){}"); + return typeof _10_4_2_1_4_fun === "undefined"; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js new file mode 100644 index 00000000000..3a3690ce936 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js @@ -0,0 +1,17 @@ +// Copyright 2011 Google Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @path ch10/10.4/10.4.2/S10.4.2.1_A1.js + * @description Strict indirect eval should not leak top level + * declarations into the global scope + * @onlyStrict + */ + +"use strict"; +if (!('foo' in this)) { + (1,eval)('"use strict"; var foo = 88;'); + if ('foo' in this) { + $ERROR("Strict indirect eval leaked a top level declaration"); + } +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js new file mode 100644 index 00000000000..077ae7be11f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +x = 1; +y = 2; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js new file mode 100644 index 00000000000..4903b5b3b9a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +var x = 1; +var y = 2; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js new file mode 100644 index 00000000000..fb7b1690e26 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +this.x = 1; +this.y = 2; + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js new file mode 100644 index 00000000000..b7eb20df00d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +var x = 1; +var y = 2; + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js new file mode 100644 index 00000000000..3b32b2bc2d9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +this.x = 1; +this.y = 2; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js new file mode 100644 index 00000000000..c5e5d0a0465 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +x = 1; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +y = 2; + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js new file mode 100644 index 00000000000..927a8007dfe --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +var x = 1; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +var y = 2; + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js new file mode 100644 index 00000000000..b9fb461f6c3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +this.x = 1; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +this.y = 2; + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js new file mode 100644 index 00000000000..93160490c4c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +x = 1; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +var y = 2; + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js new file mode 100644 index 00000000000..5376140af67 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +this.x = 1; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +var y = 2; + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js new file mode 100644 index 00000000000..76d75b8f9cc --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +x = 1; +y = 2; + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js new file mode 100644 index 00000000000..229cfc63f82 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js @@ -0,0 +1,31 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + x = 1; + y = 2; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + return (str1 === str2); +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js new file mode 100644 index 00000000000..1707379cf28 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + var x = 1; + var y = 2; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js new file mode 100644 index 00000000000..b94f2aa56e2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js @@ -0,0 +1,34 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js + * @description eval within global execution context + * @noStrict + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); + + this.x = 1; + this.y = 2; +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js new file mode 100644 index 00000000000..72611dc49a2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); + var x = 1; + var y = 2; +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js new file mode 100644 index 00000000000..f3cd1b0bf62 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + this.x = 1; + this.y = 2; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js new file mode 100644 index 00000000000..cebe8f3a281 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js @@ -0,0 +1,33 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + x = 1; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); + + y = 2; +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js new file mode 100644 index 00000000000..80243484991 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js @@ -0,0 +1,34 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + var x = 1; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); + + var y = 2; +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js new file mode 100644 index 00000000000..275f8ce9878 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js @@ -0,0 +1,34 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + this.x = 1; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); + + this.y = 2; +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js new file mode 100644 index 00000000000..1870bc1fd63 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js @@ -0,0 +1,35 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + x = 1; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); + + var y = 2; +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + + + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js new file mode 100644 index 00000000000..8f128246018 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js @@ -0,0 +1,34 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + this.x = 1; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); + + var y = 2; +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js new file mode 100644 index 00000000000..e77ca4323ff --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js @@ -0,0 +1,34 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js + * @description eval within global execution context + */ + +function f(){ + var i; + var j; + str1 = ''; + str2 = ''; + + for(i in this){ + str1+=i; + } + + eval('for(j in this){\nstr2+=j;\n}'); + + return (str1 === str2); + + x = 1; + y = 2; +} + +if(!f()){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + + diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/browser.js b/js/src/tests/test262/ch10/10.4/10.4.2/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/shell.js b/js/src/tests/test262/ch10/10.4/10.4.2/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js new file mode 100644 index 00000000000..9ed7152e401 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js @@ -0,0 +1,29 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-1-s.js + * @description this is not coerced to an object in strict mode (Number) + * @noStrict + */ + + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + + + return foo.call(1) === 'number' && bar.call(1) === 'object'; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js new file mode 100644 index 00000000000..d737cff1ac6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-10-s.js + * @description Strict Mode - checking 'this' (FunctionExpression includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var f = function () { + "use strict"; + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js new file mode 100644 index 00000000000..98deb941e53 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-100-s.js + * @description Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace from non-strict context) + * @onlyStrict + */ + +function testcase() { +var x = 3; + +function f() { + "use strict"; + x = this; + return "a"; +} +return ("ab".replace("b", f)==="aa") && (x===undefined); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js new file mode 100644 index 00000000000..b78f8166088 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-100gs.js + * @description Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace from non-strict context) + * @onlyStrict + */ +var x = 3; + +function f() { + "use strict"; + x = this; + return "a"; +} +if (("ab".replace("b", f)!=="aa") || (x!==undefined)) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js new file mode 100644 index 00000000000..bb7c2c7a97b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-101-s.js + * @description Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context) + * @noStrict + */ + +function testcase() { +var x = 3; + +function f() { + x = this; + return "a"; +} + +return (function() {"use strict"; return "ab".replace("b", f)==="aa";}()) && (x===fnGlobalObject()); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js new file mode 100644 index 00000000000..bc6eba526d8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-101gs.js + * @description Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context) + * @noStrict + */ +var x = 3; + +function f() { + x = this; + return "a"; +} + +if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==fnGlobalObject())) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js new file mode 100644 index 00000000000..0a11390eff7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-102-s.js + * @description Strict Mode - checking 'this' (strict anonymous function passed as arg to String.prototype.replace from non-strict context) + * @onlyStrict + */ + +function testcase() { +var x = 3; + +return ("ab".replace("b", (function () { + "use strict"; + return function () { + x = this; + return "a"; + } + })())==="aa") && (x===undefined); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js new file mode 100644 index 00000000000..90505a2fd7b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-102gs.js + * @description Strict Mode - checking 'this' (strict anonymous function passed as arg to String.prototype.replace from non-strict context) + * @onlyStrict + */ +var x = 3; +if ( ("ab".replace("b", (function () { + "use strict"; + return function () { + x = this; + return "a"; + } + })())!=="aa") || (x!==undefined)) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js new file mode 100644 index 00000000000..a0bc90873d9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-103.js + * @description Non strict mode should ToObject thisArg if not an object. Abstract equality operator should succeed. + */ + +function testcase(){ + Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); + if((5).x == 0) return false; + if(!((5).x == 5)) return false; + return true; +} + +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js new file mode 100644 index 00000000000..42f89deb3c9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * + * @path ch10/10.4/10.4.3/10.4.3-1-104.js + * @onlyStrict + * @description Strict mode should not ToObject thisArg if not an object. Strict equality operator should succeed. + */ + + +function testcase(){ + Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } }); + if(!((5).x === 5)) return false; + return true; +} + +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js new file mode 100644 index 00000000000..a66b850cf26 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * Created based on feedback in https://bugs.ecmascript.org/show_bug.cgi?id=333 + * + * @path ch10/10.4/10.4.3/10.4.3-1-105.js + * @description Non strict mode should ToObject thisArg if not an object. Return type should be object and strict equality should fail. + */ + + function testcase(){ + Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); + if((5).x === 5) return false; + if(!(typeof (5).x === "object")) return false; + return true; +} + +runTestCase(testcase); + diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js new file mode 100644 index 00000000000..36afbda2add --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * Created based on feedback in https://bugs.ecmascript.org/show_bug.cgi?id=333 + * + * @path ch10/10.4/10.4.3/10.4.3-1-106.js + * @onlyStrict + * @description Strict mode should not ToObject thisArg if not an object. Return type should be 'number'. + */ + + function testcase(){ + Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } }); + if(!(typeof (5).x === "number")) return false; + return true; +} + +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js new file mode 100644 index 00000000000..74ee475ae6b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-10gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression includes strict directive prologue) + * @onlyStrict + */ + +var f = function () { + "use strict"; + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js new file mode 100644 index 00000000000..8f781333822 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-11-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +return (function () { + return typeof this; +})() === "undefined"; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js new file mode 100644 index 00000000000..3be7db62a08 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-11gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within strict mode) + * @onlyStrict + */ + +"use strict"; +if ((function () { + return typeof this; +})() !== "undefined") { + throw "'this' had incorrect value!"; +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js new file mode 100644 index 00000000000..a88b4c03f92 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-12-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +return (function () { + "use strict"; + return typeof this; +})() === "undefined"; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js new file mode 100644 index 00000000000..0bb4a97811d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-12gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression includes strict directive prologue) + * @onlyStrict + */ + +if ((function () { + "use strict"; + return typeof this; +})() !== "undefined") { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js new file mode 100644 index 00000000000..c4ebc9d3905 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-13-s.js + * @description Strict Mode - checking 'this' (Function constructor defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var f = Function("return typeof this;"); +return f() !== "undefined"; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js new file mode 100644 index 00000000000..d6c4d550aad --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-13gs.js + * @description Strict - checking 'this' from a global scope (Function constructor defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var f = Function("return typeof this;"); +if (f() === "undefined") { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js new file mode 100644 index 00000000000..fe45b69317a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-14-s.js + * @description Strict Mode - checking 'this' (Function constructor includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var f = Function("\"use strict\";\nreturn typeof this;"); +return f() === "undefined"; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js new file mode 100644 index 00000000000..cec5e66d823 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-14gs.js + * @description Strict - checking 'this' from a global scope (Function constructor includes strict directive prologue) + * @onlyStrict + */ + +var f = Function("\"use strict\";\nreturn typeof this;"); +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js new file mode 100644 index 00000000000..961d55b6d78 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-15-s.js + * @description Strict Mode - checking 'this' (New'ed Function constructor defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var f = new Function("return typeof this;"); +return f() !== "undefined"; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js new file mode 100644 index 00000000000..26d75fa6413 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-15gs.js + * @description Strict - checking 'this' from a global scope (New'ed Function constructor defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var f = new Function("return typeof this;"); +if (f() === "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js new file mode 100644 index 00000000000..6167f4c4ac7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-16-s.js + * @description Strict Mode - checking 'this' (New'ed Function constructor includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var f = new Function("\"use strict\";\nreturn typeof this;"); +return f() === "undefined"; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js new file mode 100644 index 00000000000..b7a2287e7b8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-16gs.js + * @description Strict - checking 'this' from a global scope (New'ed Function constructor includes strict directive prologue) + * @onlyStrict + */ + +var f = new Function("\"use strict\";\nreturn typeof this;"); +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js new file mode 100644 index 00000000000..4d2caf0635c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-17-s.js + * @description Strict Mode - checking 'this' (eval used within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +return (eval("typeof this") === "undefined") && (eval("this") !== fnGlobalObject()); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js new file mode 100644 index 00000000000..f583c6e895a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-17gs.js + * @description Strict - checking 'this' from a global scope (eval used within strict mode) + * @onlyStrict + */ + +"use strict"; +if (eval("this") !== fnGlobalObject()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js new file mode 100644 index 00000000000..e1d35e49763 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js @@ -0,0 +1,14 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-18gs.js + * @description Strict - checking 'this' from a global scope (eval includes strict directive prologue) + * @onlyStrict + */ + +if (eval("\"use strict\";\nthis") !== fnGlobalObject()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js new file mode 100644 index 00000000000..c2d412838d5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-19-s.js + * @description Strict Mode - checking 'this' (indirect eval used within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var my_eval = eval; +return my_eval("this") === fnGlobalObject(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js new file mode 100644 index 00000000000..2d1c35edcd6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-19gs.js + * @description Strict - checking 'this' from a global scope (indirect eval used within strict mode) + * @onlyStrict + */ + +"use strict"; +var my_eval = eval; +if (my_eval("this") !== fnGlobalObject()) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js new file mode 100644 index 00000000000..0efe7fd65dc --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js @@ -0,0 +1,29 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-2-s.js + * @description this is not coerced to an object in strict mode (string) + * @noStrict + */ + + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + + + return foo.call('1') === 'string' && bar.call('1') === 'object'; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js new file mode 100644 index 00000000000..869bc53e4b0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-20-s.js + * @description Strict Mode - checking 'this' (indirect eval includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var my_eval = eval; +return my_eval("\"use strict\";\nthis") === fnGlobalObject(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js new file mode 100644 index 00000000000..48544cb0ea0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-20gs.js + * @description Strict - checking 'this' from a global scope (indirect eval includes strict directive prologue) + * @onlyStrict + */ + +var my_eval = eval; +if (my_eval("\"use strict\";\nthis") !== fnGlobalObject() ) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js new file mode 100644 index 00000000000..915f54ce8b0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-21-s.js + * @description Strict Mode - checking 'this' (New'ed object from FunctionDeclaration defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +function f() { + return this; +} +return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js new file mode 100644 index 00000000000..b1263404900 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-21gs.js + * @description Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration defined within strict mode) + * @onlyStrict + */ + +"use strict"; +function f() { + return this; +} +if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { + throw "'this' had incorrect value!"; +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js new file mode 100644 index 00000000000..55d66e60c21 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-22-s.js + * @description Strict Mode - checking 'this' (New'ed object from FunctionDeclaration includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +function f() { + "use strict"; + return this; +} +return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); + +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js new file mode 100644 index 00000000000..1abde0e2f47 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-22gs.js + * @description Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration includes strict directive prologue) + * @onlyStrict + */ + +function f() { + "use strict"; + return this; +} +if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { + throw "'this' had incorrect value!"; +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js new file mode 100644 index 00000000000..b2c40be4f0a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-23-s.js + * @description Strict Mode - checking 'this' (New'ed object from FunctionExpression defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var f = function () { + return this; +} +return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); + +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js new file mode 100644 index 00000000000..4aab842916e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-23gs.js + * @description Strict - checking 'this' from a global scope (New'ed object from FunctionExpression defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var f = function () { + return this; +} +if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js new file mode 100644 index 00000000000..3499abe4dd4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-24-s.js + * @description Strict Mode - checking 'this' (New'ed object from FunctionExpression includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var f = function () { + "use strict"; + return this; +} +return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js new file mode 100644 index 00000000000..38d5e14909b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-24gs.js + * @description Strict - checking 'this' from a global scope (New'ed object from FunctionExpression includes strict directive prologue) + * @onlyStrict + */ + +var f = function () { + "use strict"; + return this; +} +if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js new file mode 100644 index 00000000000..138802f6485 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-25-s.js + * @description Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var obj = new (function () { + return this; +}); +return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js new file mode 100644 index 00000000000..30ac917cbd6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-25gs.js + * @description Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var obj = new (function () { + return this; +}); +if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { + throw "'this' had incorrect value!"; +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js new file mode 100644 index 00000000000..a015f4082f0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-26-s.js + * @description Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var obj = new (function () { + "use strict"; + return this; +}); +return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js new file mode 100644 index 00000000000..e19bce342de --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-26gs.js + * @description Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression includes strict directive prologue) + * @onlyStrict + */ + +var obj = new (function () { + "use strict"; + return this; +}); +if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js new file mode 100644 index 00000000000..54eda820f81 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-27-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +function f1() { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js new file mode 100644 index 00000000000..0cb1cb4f27a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-27gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) + * @onlyStrict + */ + +"use strict"; +function f1() { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js new file mode 100644 index 00000000000..c2a5578a84b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-28-s.js + * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +function f1() { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js new file mode 100644 index 00000000000..663a18e00c8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-28gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionDeclaration inside strict mode) + * @onlyStrict + */ + +"use strict"; +function f1() { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js new file mode 100644 index 00000000000..87ea431d7bc --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-29-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +function f1() { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js new file mode 100644 index 00000000000..416f1b4f330 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-29gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) + * @onlyStrict + */ + +"use strict"; +function f1() { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js new file mode 100644 index 00000000000..19bafdcff9d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-3-s.js + * @description this is not coerced to an object in strict mode (undefined) + * @noStrict + */ + + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + return foo.call(undefined) === 'undefined' && bar.call() === 'object'; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js new file mode 100644 index 00000000000..b4085931b31 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-30-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var f1 = function () { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js new file mode 100644 index 00000000000..ab3c6222d59 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-30gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionExpression inside strict mode) + * @onlyStrict + */ + +"use strict"; +var f1 = function () { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js new file mode 100644 index 00000000000..dc32ca19ee3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-31-s.js + * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var f1 = function () { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js new file mode 100644 index 00000000000..1bbb2d1616a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-31gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionExpression inside strict mode) + * @onlyStrict + */ + +"use strict"; +var f1 = function () { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js new file mode 100644 index 00000000000..4ba988920db --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-32-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var f1 = function () { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js new file mode 100644 index 00000000000..1cd2ad05ada --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-32gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) + * @onlyStrict + */ + +"use strict"; +var f1 = function () { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js new file mode 100644 index 00000000000..6c4d66e2e3f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-33-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +return (function () { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js new file mode 100644 index 00000000000..c288566cb6d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-33gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode) + * @onlyStrict + */ + +"use strict"; +if (! ((function () { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js new file mode 100644 index 00000000000..9cf25b53dcf --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-34-s.js + * @description Strict Mode - checking 'this' (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +return (function () { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js new file mode 100644 index 00000000000..72980aa4118 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-34gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) + * @onlyStrict + */ + +"use strict"; +if (! ((function () { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js new file mode 100644 index 00000000000..8f7abb36fc5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-35-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +return (function () { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js new file mode 100644 index 00000000000..ecee18fe320 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-35gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) + * @onlyStrict + */ + +"use strict"; +if (! ((function () { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js new file mode 100644 index 00000000000..08bea7cc437 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-36-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +function f1() { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js new file mode 100644 index 00000000000..88fab9f20a7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-36gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) + * @onlyStrict + */ + +function f1() { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js new file mode 100644 index 00000000000..93e7fde2880 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-37-s.js + * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +function f1() { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js new file mode 100644 index 00000000000..795b6032db9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-37gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) + * @onlyStrict + */ + +function f1() { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js new file mode 100644 index 00000000000..f496d4ed08e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-38-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +function f1() { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js new file mode 100644 index 00000000000..1c00b742e41 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-38gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) + * @onlyStrict + */ + +function f1() { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js new file mode 100644 index 00000000000..22478bc26d2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-39-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var f1 = function () { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js new file mode 100644 index 00000000000..7ec3adf91a0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-39gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +var f1 = function () { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js new file mode 100644 index 00000000000..28bd8f05903 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js @@ -0,0 +1,29 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-4-s.js + * @description this is not coerced to an object in strict mode (boolean) + * @noStrict + */ + + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + + + return foo.call(true) === 'boolean' && bar.call(true) === 'object'; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js new file mode 100644 index 00000000000..b90817f6389 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-40-s.js + * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var f1 = function () { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js new file mode 100644 index 00000000000..2d8fbf0ba98 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-40gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +var f1 = function () { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js new file mode 100644 index 00000000000..48495e39292 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-41-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var f1 = function () { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js new file mode 100644 index 00000000000..43cba61c8e3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-41gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +var f1 = function () { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js new file mode 100644 index 00000000000..c4f7058579a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-42-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +return (function () { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js new file mode 100644 index 00000000000..b1802bf1602 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-42gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +if (! ((function () { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js new file mode 100644 index 00000000000..6575e56b9d5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-43-s.js + * @description Strict Mode - checking 'this' (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +return (function () { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js new file mode 100644 index 00000000000..0da4b787139 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-43gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +if (! ((function () { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js new file mode 100644 index 00000000000..b7ac11d8d85 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-44-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +function testcase() { +return (function () { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js new file mode 100644 index 00000000000..2300e4acba1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-44gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) + * @onlyStrict + */ + +if (! ((function () { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js new file mode 100644 index 00000000000..e23f9fef051 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-45-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) + * @noStrict + */ + +function testcase() { +function f1() { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js new file mode 100644 index 00000000000..ce99d65746c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-45gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) + * @noStrict + */ + +function f1() { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js new file mode 100644 index 00000000000..5945b2b2153 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-46-s.js + * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) + * @noStrict + */ + +function testcase() { +function f1() { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js new file mode 100644 index 00000000000..3d0ddd895c7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-46gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) + * @noStrict + */ + +function f1() { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js new file mode 100644 index 00000000000..6a5fe9d4071 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-47-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) + * @noStrict + */ + +function testcase() { +function f1() { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js new file mode 100644 index 00000000000..78884f8c6b4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-47gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) + * @noStrict + */ + +function f1() { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js new file mode 100644 index 00000000000..3c4d49af4ce --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-48-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) + * @noStrict + */ + +function testcase() { +var f1 = function () { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js new file mode 100644 index 00000000000..b6d619176a1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-48gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) + * @noStrict + */ + +var f1 = function () { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js new file mode 100644 index 00000000000..3ae616eaa23 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-49-s.js + * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionExpression) + * @noStrict + */ + +function testcase() { +var f1 = function () { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js new file mode 100644 index 00000000000..d6aee3a9182 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-49gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within a FunctionExpression) + * @noStrict + */ + +var f1 = function () { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js new file mode 100644 index 00000000000..5d64cea6b72 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-5-s.js + * @description this is not coerced to an object in strict mode (function) + * @onlyStrict + */ + + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + + function foobar() + { + } + + return foo.call(foobar) === 'function' && bar.call(foobar) === 'function'; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js new file mode 100644 index 00000000000..ad273ecb1fe --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-50-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) + * @noStrict + */ + +function testcase() { +var f1 = function () { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js new file mode 100644 index 00000000000..21cd879efa8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-50gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) + * @noStrict + */ + +var f1 = function () { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js new file mode 100644 index 00000000000..e8935366e05 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-51-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) + * @noStrict + */ + +function testcase() { +return (function () { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js new file mode 100644 index 00000000000..52f8e35a6a2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-51gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) + * @noStrict + */ + +if (! ((function () { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +})())) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js new file mode 100644 index 00000000000..b2c3a00820c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-52-s.js + * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) + * @noStrict + */ + +function testcase() { +return (function () { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js new file mode 100644 index 00000000000..cc617750d2d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-52gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) + * @noStrict + */ + +if (! ((function () { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +})())) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js new file mode 100644 index 00000000000..2324bf44f63 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-53-s.js + * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) + * @noStrict + */ + +function testcase() { +return (function () { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js new file mode 100644 index 00000000000..0c6581f2e19 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-53gs.js + * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) + * @noStrict + */ + +if (! ((function () { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +})())) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js new file mode 100644 index 00000000000..ac481d6109c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-54-s.js + * @description Strict Mode - checking 'this' (Literal getter defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var o = { get foo() { return this; } } +return o.foo===o; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js new file mode 100644 index 00000000000..571ad634e9e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-54gs.js + * @description Strict - checking 'this' from a global scope (Literal getter defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var o = { get foo() { return this; } } +if (o.foo!==o) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js new file mode 100644 index 00000000000..49acc2d11bf --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-55-s.js + * @description Strict Mode - checking 'this' (Literal getter includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var o = { get foo() { "use strict"; return this; } } +return o.foo===o; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js new file mode 100644 index 00000000000..ab3ccbbc549 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-55gs.js + * @description Strict - checking 'this' from a global scope (Literal getter includes strict directive prologue) + * @onlyStrict + */ + +var o = { get foo() { "use strict"; return this; } } +if (o.foo!==o) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js new file mode 100644 index 00000000000..1a492c46209 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-56-s.js + * @description Strict Mode - checking 'this' (Literal setter defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var x = 2; +var o = { set foo(stuff) { x=this; } } +o.foo = 3; +return x===o; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js new file mode 100644 index 00000000000..7ea7c7a3f52 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-56gs.js + * @description Strict - checking 'this' from a global scope (Literal setter defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var x = 2; +var o = { set foo(stuff) { x=this; } } +o.foo = 3; +if (x!==o) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js new file mode 100644 index 00000000000..bcd4ef62cf8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-57-s.js + * @description Strict Mode - checking 'this' (Literal setter includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var x = 2; +var o = { set foo(stuff) { "use strict"; x=this; } } +o.foo = 3; +return x===o; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js new file mode 100644 index 00000000000..e59df33573e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-57gs.js + * @description Strict - checking 'this' from a global scope (Literal setter includes strict directive prologue) + * @onlyStrict + */ + +var x = 2; +var o = { set foo(stuff) { "use strict"; x=this; } } +o.foo = 3; +if (x!==o) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js new file mode 100644 index 00000000000..964f8d43580 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-58-s.js + * @description Strict Mode - checking 'this' (Injected getter defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var o = {}; +Object.defineProperty(o, "foo", { get: function() { return this; } }); +return o.foo===o; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js new file mode 100644 index 00000000000..166e440795e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-58gs.js + * @description Strict - checking 'this' from a global scope (Injected getter defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var o = {}; +Object.defineProperty(o, "foo", { get : function() { return this; } }); +if (o.foo!==o) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js new file mode 100644 index 00000000000..7d0afddf50b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-59-s.js + * @description Strict Mode - checking 'this' (Injected getter includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var o = {}; +Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); +return o.foo===o; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js new file mode 100644 index 00000000000..09e1d064872 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-59gs.js + * @description Strict - checking 'this' from a global scope (Injected getter includes strict directive prologue) + * @onlyStrict + */ + +var o = {}; +Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); +if (o.foo!==o) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js new file mode 100644 index 00000000000..1bd803beec6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-60-s.js + * @description Strict Mode - checking 'this' (Injected setter defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var o = {}; +var x = 2; +Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); +o.foo = 3; +return x===o; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js new file mode 100644 index 00000000000..09053dbd186 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-60gs.js + * @description Strict - checking 'this' from a global scope (Injected setter defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var o = {}; +var x = 2; +Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); +o.foo = 3; +if (x!==o) { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js new file mode 100644 index 00000000000..23586b25079 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-61-s.js + * @description Strict Mode - checking 'this' (Injected setter includes strict directive prologue) + * @onlyStrict + */ + +function testcase() { +var o = {}; +var x = 2; +Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); +o.foo = 3; +return x===o; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js new file mode 100644 index 00000000000..2d31c32d8aa --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-61gs.js + * @description Strict - checking 'this' from a global scope (Injected setter includes strict directive prologue) + * @onlyStrict + */ + +var o = {}; +var x = 2; +Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); +o.foo = 3; +if (x!==o) { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js new file mode 100644 index 00000000000..a2e3c0bb89a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-62-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by non-strict function declaration) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this;}; +function foo() { return f();} +return foo()===undefined; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js new file mode 100644 index 00000000000..9cd2ae0e76c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-62gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict function declaration) + * @onlyStrict + */ + +function f() { "use strict"; return this;}; +function foo() { return f();} +if (foo()!==undefined){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js new file mode 100644 index 00000000000..5b93d280bd8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-63-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by non-strict eval) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return eval("f();"); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js new file mode 100644 index 00000000000..07f7a9ceefe --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-63gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict eval) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! eval("f();")){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js new file mode 100644 index 00000000000..ddb042449c8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-64-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by non-strict Function constructor) + * @onlyStrict + */ + +function testcase() { +fnGlobalObject().f = function() { "use strict"; return this===undefined;}; +return Function("return f();")(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js new file mode 100644 index 00000000000..6877c83413c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-64gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict Function constructor) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! (Function("return f();")())){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js new file mode 100644 index 00000000000..5b0f20a65f7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-65-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by non-strict new'ed Function constructor) + * @onlyStrict + */ + +function testcase() { +fnGlobalObject().f = function() { "use strict"; return this===undefined;}; +return (new Function("return f();"))(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js new file mode 100644 index 00000000000..567a1236043 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-65gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict new'ed Function constructor) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! ( (new Function("return f();")) () )){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js new file mode 100644 index 00000000000..3b44018277b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-66-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply()) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.apply(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js new file mode 100644 index 00000000000..29a609b7a92 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-66gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply()) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! f.apply()){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js new file mode 100644 index 00000000000..baf57dc0c87 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-67-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(null)) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===null;}; +return f.apply(null); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js new file mode 100644 index 00000000000..9122b9fdec2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-67gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(null)) + * @onlyStrict + */ + +function f() { "use strict"; return this===null;}; +if (! f.apply(null)){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js new file mode 100644 index 00000000000..10a5294e109 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-68-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(undefined)) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.apply(undefined); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js new file mode 100644 index 00000000000..5bfeee3f05f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-68gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(undefined)) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! f.apply(undefined)){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js new file mode 100644 index 00000000000..8db3b94ce70 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-69-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(someObject)) + * @onlyStrict + */ + +function testcase() { +var o = {}; +function f() { "use strict"; return this===o;}; +return f.apply(o); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js new file mode 100644 index 00000000000..f32b45575ca --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-69gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(someObject)) + * @onlyStrict + */ + +var o = {}; +function f() { "use strict"; return this===o;}; +if (! f.apply(o)){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js new file mode 100644 index 00000000000..ae370f766eb --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-7-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration defined within strict mode) + * @onlyStrict + */ + + +function testcase() { +"use strict"; +function f() { + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js new file mode 100644 index 00000000000..d1bf918ee8f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-70-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(globalObject)) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this;}; +return f.apply(fnGlobalObject()) === fnGlobalObject(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js new file mode 100644 index 00000000000..0044b8afd7b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-70gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(globalObject)) + * @onlyStrict + */ + +function f() { "use strict"; return this;}; +if (f.apply(fnGlobalObject()) !== fnGlobalObject()){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js new file mode 100644 index 00000000000..5fe5dcba304 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-71-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call()) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.call(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js new file mode 100644 index 00000000000..c978be9ad81 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-71gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call()) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! f.call()){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js new file mode 100644 index 00000000000..b9c669291c0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-72-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(null)) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===null;}; +return f.call(null); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js new file mode 100644 index 00000000000..49ca243d1ff --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-72gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(null)) + * @onlyStrict + */ + +function f() { "use strict"; return this===null;}; +if (! f.call(null)){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js new file mode 100644 index 00000000000..e04b5d7be5f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-73-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(undefined)) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.call(undefined); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js new file mode 100644 index 00000000000..10a3176db89 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-73gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(undefined)) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! f.call(undefined)){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js new file mode 100644 index 00000000000..7e2d746e3a3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-74-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(someObject)) + * @onlyStrict + */ + +function testcase() { +var o = {}; +function f() { "use strict"; return this===o;}; +return f.call(o); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js new file mode 100644 index 00000000000..27a73d67f86 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-74gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(someObject)) + * @onlyStrict + */ + +var o = {}; +function f() { "use strict"; return this===o;}; +if (! f.call(o)){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js new file mode 100644 index 00000000000..fa8f4d4b082 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-75-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(globalObject)) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this;}; +return f.call(fnGlobalObject()) === fnGlobalObject(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js new file mode 100644 index 00000000000..3df699177b4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-75gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(globalObject)) + * @onlyStrict + */ + +function f() { "use strict"; return this;}; +if (f.call(fnGlobalObject()) !== fnGlobalObject()){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js new file mode 100644 index 00000000000..7918f0dfae7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-76-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind()()) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.bind()(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js new file mode 100644 index 00000000000..f61d0e324e1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-76gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind()()) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! (f.bind()())){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js new file mode 100644 index 00000000000..fb5614dd9ab --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-77-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(null)()) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===null;}; +return f.bind(null)(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js new file mode 100644 index 00000000000..51d38c39858 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-77gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(null)()) + * @onlyStrict + */ + +function f() { "use strict"; return this===null;}; +if (! (f.bind(null)())){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js new file mode 100644 index 00000000000..3d50f279c96 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-78-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(undefined)()) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.bind(undefined)(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js new file mode 100644 index 00000000000..8d67642faf2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-78gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(undefined)()) + * @onlyStrict + */ + +function f() { "use strict"; return this===undefined;}; +if (! (f.bind(undefined)())){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js new file mode 100644 index 00000000000..5dace0a4593 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-79-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(someObject)()) + * @onlyStrict + */ + +function testcase() { +var o = {}; +function f() { "use strict"; return this===o;}; +return f.bind(o)(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js new file mode 100644 index 00000000000..a347c004a8b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-79gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(someObject)()) + * @onlyStrict + */ + +var o = {}; +function f() { "use strict"; return this===o;}; +if (! (f.bind(o)())){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js new file mode 100644 index 00000000000..23b1c05839f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-7gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within strict mode) + * @onlyStrict + */ + +"use strict"; +function f() { + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js new file mode 100644 index 00000000000..7d6beaa1acd --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-8-s.js + * @description Strict Mode - checking 'this' (FunctionDeclaration includes strict directive prologue) + * @onlyStrict + */ + + +function testcase() { +function f() { + "use strict"; + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js new file mode 100644 index 00000000000..86951b61acc --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-80-s.js + * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(globalObject)()) + * @onlyStrict + */ + +function testcase() { +function f() { "use strict"; return this;}; +return f.bind(fnGlobalObject())() === fnGlobalObject(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js new file mode 100644 index 00000000000..e3ed02e6a90 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-80gs.js + * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(globalObject)()) + * @onlyStrict + */ + +function f() { "use strict"; return this;}; +if (f.bind(fnGlobalObject())() !== fnGlobalObject()){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js new file mode 100644 index 00000000000..61be6b784f0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-81-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict function declaration) + * @noStrict + */ + +function testcase() { +function f() { return this!==undefined;}; +function foo() { "use strict"; return f();} +return foo(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js new file mode 100644 index 00000000000..0544e0cd762 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-81gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict function declaration) + * @noStrict + */ + +function f() { return this!==undefined;}; +function foo() { "use strict"; return f();} +if (! foo()){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js new file mode 100644 index 00000000000..0a2b166005e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-82-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict eval) + * @noStrict + */ + +function testcase() { +function f() { return this!==undefined;}; +return (function () {"use strict"; return eval("f();");})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js new file mode 100644 index 00000000000..305435eebbe --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-82gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict eval) + * @noStrict + */ + +function f() { return this!==undefined;}; +if (! ((function () {"use strict"; return eval("f();");})()) ){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js new file mode 100644 index 00000000000..f03adeff567 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-83-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function constructor) + * @noStrict + */ + +function testcase() { +fnGlobalObject().f = function() {return this!==undefined;}; +return (function () {return Function("\"use strict\";return f();")();})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js new file mode 100644 index 00000000000..dfe59d84e71 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-83gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function constructor) + * @noStrict + */ + +function f() {return this!==undefined;}; +if (! ((function () {return Function("\"use strict\";return f();")();})()) ){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js new file mode 100644 index 00000000000..80781784629 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-84-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict new'ed Function constructor) + * @noStrict + */ + +function testcase() { +fnGlobalObject().f = function() { return this!==undefined;}; +return (function () {return new Function("\"use strict\";return f();")();})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js new file mode 100644 index 00000000000..23a20910d82 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-84gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict new'ed Function constructor) + * @noStrict + */ + +function f() { return this!==undefined;}; +if (! ((function () {return new Function("\"use strict\";return f();")();})()) ){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js new file mode 100644 index 00000000000..abdb33b92a9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-85-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply()) + * @noStrict + */ + +function testcase() { +function f() { return this!==undefined;}; +return (function () {"use strict"; return f.apply();})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js new file mode 100644 index 00000000000..093115f32f3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-85gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply()) + * @noStrict + */ + +function f() { return this!==undefined;}; +if (! ((function () {"use strict"; return f.apply();})())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js new file mode 100644 index 00000000000..fca8007f335 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-86-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(null)) + * @noStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.apply(null);})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js new file mode 100644 index 00000000000..f1e23cce2b6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-86gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(null)) + * @noStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.apply(null);})())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js new file mode 100644 index 00000000000..be4505ace2b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-87-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(undefined)) + * @noStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject()}; +return (function () {"use strict"; return f.apply(undefined);})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js new file mode 100644 index 00000000000..af76c9a8bea --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-87gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(undefined)) + * @noStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.apply(undefined);})())){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js new file mode 100644 index 00000000000..72c42456787 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-88-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(someObject)) + * @onlyStrict + */ + +function testcase() { +var o = {}; +function f() { return this===o;}; +return (function () {"use strict"; return f.apply(o);})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js new file mode 100644 index 00000000000..8b85f6993e5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-88gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(someObject)) + * @onlyStrict + */ + +var o = {}; +function f() { return this===o;}; +if (! ((function () {"use strict"; return f.apply(o);})())){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js new file mode 100644 index 00000000000..451851d5b55 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-89-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(globalObject)) + * @onlyStrict + */ + +function testcase() { +function f() { return this;}; +return (function () {"use strict"; return f.apply(fnGlobalObject()); })() === fnGlobalObject(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js new file mode 100644 index 00000000000..68f415a642d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-89gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(globalObject)) + * @onlyStrict + */ + +function f() { return this;}; +if ((function () {"use strict"; return f.apply(fnGlobalObject());})() !== fnGlobalObject()){ + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js new file mode 100644 index 00000000000..814fb7ec71d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-8gs.js + * @description Strict - checking 'this' from a global scope (FunctionDeclaration includes strict directive prologue) + * @onlyStrict + */ + +function f() { + "use strict"; + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js new file mode 100644 index 00000000000..38ca374e73c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-9-s.js + * @description Strict Mode - checking 'this' (FunctionExpression defined within strict mode) + * @onlyStrict + */ + +function testcase() { +"use strict"; +var f = function () { + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js new file mode 100644 index 00000000000..0b6a4b3f12d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-90-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call()) + * @noStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.call(); })(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js new file mode 100644 index 00000000000..78a91247fa3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-90gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call()) + * @noStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.call();})())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js new file mode 100644 index 00000000000..2dc4007e9a9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-91-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(null)) + * @noStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.call(null); })(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js new file mode 100644 index 00000000000..c1052a773f6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-91gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(null)) + * @noStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.call(null); })())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js new file mode 100644 index 00000000000..3a04a7b6fa9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-92-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(undefined)) + * @noStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.call(undefined);})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js new file mode 100644 index 00000000000..4517302f35d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-92gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(undefined)) + * @noStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.call(undefined);})())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js new file mode 100644 index 00000000000..e8da599e75d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-93-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(someObject)) + * @onlyStrict + */ + +function testcase() { +var o = {}; +function f() { return this===o;}; +return (function () {"use strict"; return f.call(o); })(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js new file mode 100644 index 00000000000..44bd495b4f5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-93gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(someObject)) + * @onlyStrict + */ + +var o = {}; +function f() { return this===o;}; +if (! ((function () {"use strict"; return f.call(o); })())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js new file mode 100644 index 00000000000..655ac9e76d4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-94-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(globalObject)) + * @onlyStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.call(fnGlobalObject());})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js new file mode 100644 index 00000000000..e752c688e93 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-94gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(globalObject)) + * @onlyStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.call(fnGlobalObject());})())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js new file mode 100644 index 00000000000..db48e89d9c5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-95-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind()()) + * @noStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.bind()(); })(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js new file mode 100644 index 00000000000..5d5fc09b802 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-95gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind()()) + * @noStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.bind()(); })())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js new file mode 100644 index 00000000000..3c4e652c3cd --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-96-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(null)()) + * @noStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.bind(null)(); })(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js new file mode 100644 index 00000000000..cbfe417c4b4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-96gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(null)()) + * @noStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.bind(null)(); })())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js new file mode 100644 index 00000000000..feac73bd634 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-97-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(undefined)()) + * @noStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.bind(undefined)();})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js new file mode 100644 index 00000000000..1e79dd96e14 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-97gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(undefined)()) + * @noStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.bind(undefined)(); })())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js new file mode 100644 index 00000000000..1c07cafc693 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-98-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(someObject)()) + * @onlyStrict + */ + +function testcase() { +var o = {}; +function f() { return this===o;}; +return (function () {"use strict"; return f.bind(o)();})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js new file mode 100644 index 00000000000..c72e9dcc6f5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-98gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(someObject)()) + * @onlyStrict + */ + +var o = {}; +function f() { return this===o;}; +if (! ((function () {"use strict"; return f.bind(o)();})())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js new file mode 100644 index 00000000000..47b1dac4d2f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-99-s.js + * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(globalObject)()) + * @onlyStrict + */ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.bind(fnGlobalObject())();})(); +} +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js new file mode 100644 index 00000000000..5e9730d9f35 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js @@ -0,0 +1,15 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-99gs.js + * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(globalObject)()) + * @onlyStrict + */ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.bind(fnGlobalObject())();})())){ + throw "'this' had incorrect value!"; +} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js new file mode 100644 index 00000000000..56c150c8972 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js @@ -0,0 +1,18 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.4/10.4.3/10.4.3-1-9gs.js + * @description Strict - checking 'this' from a global scope (FunctionExpression defined within strict mode) + * @onlyStrict + */ + +"use strict"; +var f = function () { + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js b/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js new file mode 100644 index 00000000000..ea2432219a5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js @@ -0,0 +1,16 @@ +// Copyright 2011 Google, Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @path ch10/10.4/10.4.3/S10.4.3_A1.js + * @description When calling a strict anonymous function as a + * function, "this" should be bound to undefined. + * @onlyStrict + */ + +"use strict"; +var that = (function() { return this; })(); +if (that !== undefined) { + $ERROR('#1: "this" leaked as: ' + that); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/browser.js b/js/src/tests/test262/ch10/10.4/10.4.3/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/shell.js b/js/src/tests/test262/ch10/10.4/10.4.3/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.4/S10.4A1.1_T2.js b/js/src/tests/test262/ch10/10.4/S10.4A1.1_T2.js new file mode 100644 index 00000000000..080aad06abe --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/S10.4A1.1_T2.js @@ -0,0 +1,33 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every function call enters a new execution context + * + * @path ch10/10.4/S10.4A1.1_T2.js + * @description Recursive function call + */ + +var y; + +function f(a){ + var x; + + if (a === 1) + return x; + else { + if(x === undefined) { + x = 0; + } else { + x = 1; + } + return f(1); + } +} + +y = f(0); + +if(!(y === undefined)){ + $ERROR("#1: Recursive function calls shares execution context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/S10.4_A1.1_T1.js b/js/src/tests/test262/ch10/10.4/S10.4_A1.1_T1.js new file mode 100644 index 00000000000..408d5077069 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/S10.4_A1.1_T1.js @@ -0,0 +1,31 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Every function call enters a new execution context + * + * @path ch10/10.4/S10.4_A1.1_T1.js + * @description Sequence of function calls + */ + +var y; + +function f(){ + var x; + + if(x === undefined) { + x = 0; + } else { + x = 1; + } + + return x; +} + +y = f(); +y = f(); + +if(!(y === 0)){ + $ERROR("#1: Sequenced function calls shares execution context"); +} + diff --git a/js/src/tests/test262/ch10/10.4/browser.js b/js/src/tests/test262/ch10/10.4/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.4/shell.js b/js/src/tests/test262/ch10/10.4/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.5/10.5-1-s.js b/js/src/tests/test262/ch10/10.5/10.5-1-s.js new file mode 100644 index 00000000000..fc841a5e40a --- /dev/null +++ b/js/src/tests/test262/ch10/10.5/10.5-1-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.5/10.5-1-s.js + * @description Strict Mode - arguments object is immutable + * @onlyStrict + */ + + +function testcase() { + "use strict"; + try { + (function fun() { + eval("arguments = 10"); + })(30); + return false; + } catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/10.5-1gs.js b/js/src/tests/test262/ch10/10.5/10.5-1gs.js new file mode 100644 index 00000000000..aafbeb3339e --- /dev/null +++ b/js/src/tests/test262/ch10/10.5/10.5-1gs.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +/** + * @path ch10/10.5/10.5-1gs.js + * @description Strict Mode - arguments cannot be assigned to in a strict function + * @onlyStrict + * @negative ^((?!NotEarlyError).)*$ + */ + +"use strict"; +throw NotEarlyError; + +function f_10_5_1_gs(){ + arguments = 7; +} + diff --git a/js/src/tests/test262/ch10/10.5/10.5-7-b-1-s.js b/js/src/tests/test262/ch10/10.5/10.5-7-b-1-s.js new file mode 100644 index 00000000000..e1855c7c66e --- /dev/null +++ b/js/src/tests/test262/ch10/10.5/10.5-7-b-1-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.5/10.5-7-b-1-s.js + * @description Strict Mode - arguments object is immutable in eval'ed functions + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + try { + eval("(function _10_5_7_b_1_fun() { arguments = 10;} ());"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/10.5-7-b-2-s.js b/js/src/tests/test262/ch10/10.5/10.5-7-b-2-s.js new file mode 100644 index 00000000000..47820009e16 --- /dev/null +++ b/js/src/tests/test262/ch10/10.5/10.5-7-b-2-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.5/10.5-7-b-2-s.js + * @description Strict Mode - arguments object index assignment is allowed + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + function _10_5_7_b_2_fun() { + arguments[7] = 12; + return arguments[7] === 12; + }; + + return _10_5_7_b_2_fun(30); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/10.5-7-b-3-s.js b/js/src/tests/test262/ch10/10.5/10.5-7-b-3-s.js new file mode 100644 index 00000000000..4f4a66dcd68 --- /dev/null +++ b/js/src/tests/test262/ch10/10.5/10.5-7-b-3-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.5/10.5-7-b-3-s.js + * @description Strict Mode - Adding property to the arguments object successful under strict mode + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + function _10_5_7_b_3_fun() { + arguments[1] = 12; + return arguments[0] = 30 && arguments[1] === 12; + }; + + return _10_5_7_b_3_fun(30); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/10.5-7-b-4-s.js b/js/src/tests/test262/ch10/10.5/10.5-7-b-4-s.js new file mode 100644 index 00000000000..c695446b41e --- /dev/null +++ b/js/src/tests/test262/ch10/10.5/10.5-7-b-4-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.5/10.5-7-b-4-s.js + * @description Strict Mode - Deleting property of the arguments object successful under strict mode + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + function _10_5_7_b_4_fun() { + var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12; + delete arguments[1]; + var _10_5_7_b_4_2 = arguments[0] === 30 && typeof arguments[1] === "undefined"; + return _10_5_7_b_4_1 && _10_5_7_b_4_2; + }; + return _10_5_7_b_4_fun(30, 12); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/browser.js b/js/src/tests/test262/ch10/10.5/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.5/shell.js b/js/src/tests/test262/ch10/10.5/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1-s.js new file mode 100644 index 00000000000..dcc3c49f904 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-10-c-ii-1-s.js + * @description arguments[i] remains same after changing actual parameters in strict mode + * @onlyStrict + */ + + +function testcase() { + function foo(a,b,c) + { + 'use strict'; + a = 1; b = 'str'; c = 2.1; + return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1); + } + return foo(10, 'sss', 1); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1.js b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1.js new file mode 100644 index 00000000000..f0db64ee245 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-10-c-ii-1.js + * @description arguments[i] change with actual parameters + */ + + +function testcase() { + function foo(a,b,c) + { + a = 1; b = 'str'; c = 2.1; + if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1) + return true; + } + return foo(10,'sss',1); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2-s.js b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2-s.js new file mode 100644 index 00000000000..58143f84167 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-10-c-ii-2-s.js + * @description arguments[i] doesn't map to actual parameters in strict mode + * @onlyStrict + */ + + +function testcase() { + + function foo(a,b,c) + { + 'use strict'; + arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; + return 10 === a && 'sss' === b && 1 === c; + } + return foo(10,'sss',1); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2.js b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2.js new file mode 100644 index 00000000000..5891dfe3b2c --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-10-c-ii-2.js + * @description arguments[i] map to actual parameter + */ + + +function testcase() { + + function foo(a,b,c) + { + arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; + if(1 === a && 'str' === b && 2.1 === c) + return true; + } + return foo(10,'sss',1); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-11-b-1.js b/js/src/tests/test262/ch10/10.6/10.6-11-b-1.js new file mode 100644 index 00000000000..bcf937d63ae --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-11-b-1.js @@ -0,0 +1,54 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-11-b-1.js + * @description Arguments Object has index property '0' as its own property, it shoulde be writable, enumerable, configurable and does not invoke the setter defined on Object.prototype[0] (Step 11.b) + */ + + +function testcase() { + try { + var data = "data"; + var getFunc = function () { + return data; + }; + + var setFunc = function (value) { + data = value; + }; + + Object.defineProperty(Object.prototype, "0", { + get: getFunc, + set: setFunc, + configurable: true + }); + + var argObj = (function () { return arguments })(1); + + var verifyValue = false; + verifyValue = (argObj[0] === 1); + + var verifyEnumerable = false; + for (var p in argObj) { + if (p === "0" && argObj.hasOwnProperty("0")) { + verifyEnumerable = true; + } + } + + var verifyWritable = false; + argObj[0] = 1001; + verifyWritable = (argObj[0] === 1001); + + var verifyConfigurable = false; + delete argObj[0]; + verifyConfigurable = argObj.hasOwnProperty("0"); + + return verifyValue && verifyWritable && verifyEnumerable && !verifyConfigurable && data === "data"; + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-12-1.js b/js/src/tests/test262/ch10/10.6/10.6-12-1.js new file mode 100644 index 00000000000..12746eb1ed4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-12-1.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-12-1.js + * @description Accessing callee property of Arguments object is allowed + */ + + +function testcase() { + try + { + arguments.callee; + return true; + } + catch (e) { + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-12-2.js b/js/src/tests/test262/ch10/10.6/10.6-12-2.js new file mode 100644 index 00000000000..11a1793f41e --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-12-2.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-12-2.js + * @description arguments.callee has correct attributes + */ + + +function testcase() { + + var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); + if(desc.configurable === true && + desc.enumerable === false && + desc.writable === true && + desc.hasOwnProperty('get') == false && + desc.hasOwnProperty('put') == false) + return true; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-1.js b/js/src/tests/test262/ch10/10.6/10.6-13-1.js new file mode 100644 index 00000000000..d871a9ccba0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-1.js @@ -0,0 +1,21 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-1.js + * @description Accessing caller property of Arguments object is allowed + */ + + +function testcase() { + try + { + arguments.caller; + return true; + } + catch (e) { + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-a-1.js b/js/src/tests/test262/ch10/10.6/10.6-13-a-1.js new file mode 100644 index 00000000000..a7b3f2ee6a9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-a-1.js @@ -0,0 +1,45 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-a-1.js + * @description In non-strict mode, arguments object should have its own 'callee' property defined (Step 13.a) + */ + + +function testcase() { + try { + Object.defineProperty(Object.prototype, "callee", { + value: 1, + writable: false, + configurable: true + }); + + var argObj = (function () { return arguments })(); + + var verifyValue = false; + verifyValue = typeof argObj.callee === "function"; + + var verifyWritable = false; + argObj.callee = 1001; + verifyWritable = (argObj.callee === 1001); + + var verifyEnumerable = false; + for (var p in argObj) { + if (p === "callee" && argObj.hasOwnProperty("callee")) { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete argObj.callee; + verifyConfigurable = argObj.hasOwnProperty("callee"); + + return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable; + } finally { + delete Object.prototype.callee; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-a-2.js b/js/src/tests/test262/ch10/10.6/10.6-13-a-2.js new file mode 100644 index 00000000000..b681712589f --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-a-2.js @@ -0,0 +1,35 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-a-2.js + * @description A direct call to arguments.callee.caller should work + */ + + +function testcase() { + var called = false; + + function test1(flag) { + if (flag!==true) { + test2(); + } else { + called = true; + } + } + + function test2() { + if(arguments.callee.caller===undefined) { + called=true; // Extension not supported - fake it + } else { + arguments.callee.caller(true); + } + } + + test1(); + return called; +} + +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-a-3.js b/js/src/tests/test262/ch10/10.6/10.6-13-a-3.js new file mode 100644 index 00000000000..ddd03a68c49 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-a-3.js @@ -0,0 +1,36 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-a-3.js + * @description An indirect call to arguments.callee.caller should work + */ + + +function testcase() { + var called = false; + + function test1(flag) { + if (flag!==true) { + test2(); + } else { + called = true; + } + } + + function test2() { + if (arguments.callee.caller===undefined) { + called = true; //Extension not supported - fake it + } else { + var explicit = arguments.callee.caller; + explicit(true); + } + } + + test1(); + return called; +} + +runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-b-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-b-1-s.js new file mode 100644 index 00000000000..d44b475afd3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-b-1-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-b-1-s.js + * @description Accessing caller property of Arguments object throws TypeError in strict mode + * @onlyStrict + */ + + +function testcase() { + 'use strict'; + try + { + arguments.caller; + } + catch (e) { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-b-2-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-b-2-s.js new file mode 100644 index 00000000000..0f1b2b76446 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-b-2-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-b-2-s.js + * @description arguments.caller exists in strict mode + * @onlyStrict + */ + + +function testcase() { + + 'use strict'; + var desc = Object.getOwnPropertyDescriptor(arguments,"caller"); + return desc!== undefined; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-b-3-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-b-3-s.js new file mode 100644 index 00000000000..d85e084f16b --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-b-3-s.js @@ -0,0 +1,26 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-b-3-s.js + * @description arguments.caller is non-configurable in strict mode + * @onlyStrict + */ + + +function testcase() { + + 'use strict'; + var desc = Object.getOwnPropertyDescriptor(arguments,"caller"); + + return (desc.configurable === false && + desc.enumerable === false && + desc.hasOwnProperty('value') == false && + desc.hasOwnProperty('writable') == false && + desc.hasOwnProperty('get') == true && + desc.hasOwnProperty('set') == true); + + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-c-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-c-1-s.js new file mode 100644 index 00000000000..f17a9b37bb9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-c-1-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-c-1-s.js + * @description Accessing callee property of Arguments object throws TypeError in strict mode + * @onlyStrict + */ + + +function testcase() { + 'use strict'; + try + { + arguments.callee; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-c-2-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-c-2-s.js new file mode 100644 index 00000000000..e08e7700312 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-c-2-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-c-2-s.js + * @description arguments.callee is exists in strict mode + * @onlyStrict + */ + + +function testcase() { + + 'use strict'; + var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); + return desc !== undefined; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-c-3-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-c-3-s.js new file mode 100644 index 00000000000..8122932bd82 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-13-c-3-s.js @@ -0,0 +1,24 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-13-c-3-s.js + * @description arguments.callee is non-configurable in strict mode + * @onlyStrict + */ + + +function testcase() { + + 'use strict'; + var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); + return (desc.configurable === false && + desc.enumerable === false && + desc.hasOwnProperty('value') == false && + desc.hasOwnProperty('writable') == false && + desc.hasOwnProperty('get') == true && + desc.hasOwnProperty('set') == true); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-1-s.js new file mode 100644 index 00000000000..aebc6fa1c68 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-14-1-s.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-14-1-s.js + * @description Strict Mode - 'callee' exists and 'caller' exists under strict mode + * @onlyStrict + */ + + +function testcase() { + "use strict"; + var argObj = function () { + return arguments; + } (); + return argObj.hasOwnProperty("callee") && argObj.hasOwnProperty("caller"); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-b-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-b-1-s.js new file mode 100644 index 00000000000..51cbfff4dbe --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-14-b-1-s.js @@ -0,0 +1,28 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-14-b-1-s.js + * @description Strict Mode - [[Enumerable]] attribute value in 'caller' is false under strict mode + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + var argObj = function () { + return arguments; + } (); + + var verifyEnumerable = false; + for (var _10_6_14_b_1 in argObj) { + if (argObj.hasOwnProperty(_10_6_14_b_1) && _10_6_14_b_1 === "caller") { + verifyEnumerable = true; + } + } + return !verifyEnumerable && argObj.hasOwnProperty("caller"); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-b-4-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-b-4-s.js new file mode 100644 index 00000000000..748c630a9e3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-14-b-4-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-14-b-4-s.js + * @description Strict Mode - TypeError is thrown when accessing the [[Set]] attribute in 'caller' under strict mode + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + var argObj = function () { + return arguments; + } (); + + try { + argObj.caller = {}; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-c-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-c-1-s.js new file mode 100644 index 00000000000..cade0a5377d --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-14-c-1-s.js @@ -0,0 +1,28 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-14-c-1-s.js + * @description Strict Mode - [[Enumerable]] attribute value in 'callee' is false under strict mode + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + var argObj = function () { + return arguments; + } (); + + var verifyEnumerable = false; + for (var _10_6_14_c_1 in argObj) { + if (argObj.hasOwnProperty(_10_6_14_c_1) && _10_6_14_c_1 === "callee") { + verifyEnumerable = true; + } + } + return !verifyEnumerable && argObj.hasOwnProperty("callee"); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-c-4-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-c-4-s.js new file mode 100644 index 00000000000..1238570c4fb --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-14-c-4-s.js @@ -0,0 +1,27 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-14-c-4-s.js + * @description Strict Mode - TypeError is thrown when accessing the [[Set]] attribute in 'callee' under strict mode + * @onlyStrict + */ + + +function testcase() { + "use strict"; + + var argObj = function () { + return arguments; + } (); + + try { + argObj.callee = {}; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-1gs.js b/js/src/tests/test262/ch10/10.6/10.6-1gs.js new file mode 100644 index 00000000000..f77fd3c57e1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-1gs.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +/** + * @path ch10/10.6/10.6-1gs.js + * @description Strict Mode - arguments.callee cannot be accessed in a strict function, but does not throw an early error + * @onlyStrict + */ + +"use strict"; +function f_10_6_1_gs(){ + return arguments.callee; +} + diff --git a/js/src/tests/test262/ch10/10.6/10.6-2gs.js b/js/src/tests/test262/ch10/10.6/10.6-2gs.js new file mode 100644 index 00000000000..e13cc02f5ce --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-2gs.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +/** + * @path ch10/10.6/10.6-2gs.js + * @description Strict Mode - arguments.callee cannot be accessed in a strict function + * @onlyStrict + * @negative . + */ + +"use strict"; +function f_10_6_1_gs(){ + return arguments.callee; +} +f_10_6_1_gs(); + diff --git a/js/src/tests/test262/ch10/10.6/10.6-5-1.js b/js/src/tests/test262/ch10/10.6/10.6-5-1.js new file mode 100644 index 00000000000..f058239fe9d --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-5-1.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-5-1.js + * @description [[Prototype]] property of Arguments is set to Object prototype object + */ + + +function testcase() { + if(Object.getPrototypeOf(arguments) === Object.getPrototypeOf({})) + return true; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-6-1.js b/js/src/tests/test262/ch10/10.6/10.6-6-1.js new file mode 100644 index 00000000000..d0ec15e2732 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-6-1.js @@ -0,0 +1,17 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-6-1.js + * @description 'length property of arguments object exists + */ + + +function testcase() { + + var desc = Object.getOwnPropertyDescriptor(arguments,"length"); + return desc !== undefined + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-6-2.js b/js/src/tests/test262/ch10/10.6/10.6-6-2.js new file mode 100644 index 00000000000..afad35fd027 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-6-2.js @@ -0,0 +1,20 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-6-2.js + * @description 'length' property of arguments object has correct attributes + */ + + +function testcase() { + + var desc = Object.getOwnPropertyDescriptor(arguments,"length"); + if(desc.configurable === true && + desc.enumerable === false && + desc.writable === true ) + return true; + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-6-3.js b/js/src/tests/test262/ch10/10.6/10.6-6-3.js new file mode 100644 index 00000000000..e7838e8a41b --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-6-3.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-6-3.js + * @description 'length' property of arguments object for 0 argument function exists + */ + + +function testcase() { + var arguments= undefined; + return (function () {return arguments.length !== undefined})(); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-6-4.js b/js/src/tests/test262/ch10/10.6/10.6-6-4.js new file mode 100644 index 00000000000..6a3a77b2329 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-6-4.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-6-4.js + * @description 'length' property of arguments object for 0 argument function call is 0 even with formal parameters + */ + + +function testcase() { + var arguments= undefined; + return (function (a,b,c) {return arguments.length === 0})(); + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-7-1.js b/js/src/tests/test262/ch10/10.6/10.6-7-1.js new file mode 100644 index 00000000000..30fd4f373a7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/10.6-7-1.js @@ -0,0 +1,53 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. +/** + * @path ch10/10.6/10.6-7-1.js + * @description Arguments Object has length as its own property and does not invoke the setter defined on Object.prototype.length (Step 7) + */ + + +function testcase() { + try { + var data = "data"; + var getFunc = function () { + return 12; + }; + + var setFunc = function (value) { + data = value; + }; + + Object.defineProperty(Object.prototype, "length", { + get: getFunc, + set: setFunc, + configurable: true + }); + + var verifyValue = false; + var argObj = (function () { return arguments })(); + verifyValue = (argObj.length === 0); + + var verifyWritable = false; + argObj.length = 1001; + verifyWritable = (argObj.length === 1001); + + var verifyEnumerable = false; + for (var p in argObj) { + if (p === "length") { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete argObj.length; + verifyConfigurable = argObj.hasOwnProperty("length"); + + return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable && data === "data"; + } finally { + delete Object.prototype.length; + } + } +runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A1.js b/js/src/tests/test262/ch10/10.6/S10.6_A1.js new file mode 100644 index 00000000000..89df9c4dd3c --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A1.js @@ -0,0 +1,35 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * When control enters an execution context for function code, + * an arguments object is created and initialised + * + * @path ch10/10.6/S10.6_A1.js + * @description Executing function which uses arguments object + */ + +//CHECK#1 +function f1(){ + return arguments; +} + +try{ + var x = f1(); +} +catch(e){ + $ERROR("#1: arguments doesn't exists"); +} + +//CHECK#2 +var f2 = function(){ + return arguments; +} + +try{ + var x = f2(); +} +catch(e){ + $ERROR("#2: arguments doesn't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A2.js b/js/src/tests/test262/ch10/10.6/S10.6_A2.js new file mode 100644 index 00000000000..18698be004f --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A2.js @@ -0,0 +1,36 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The value of the internal [[Prototype]] property of the + * created arguments object is the original Object prototype object, the one + * that is the initial value of Object.prototype + * + * @path ch10/10.6/S10.6_A2.js + * @description Checking arguments.constructor.prototype===Object.prototype + */ + +//CHECK#1 +function f1(){ + return arguments.constructor.prototype; +} +try{ + if(f1() !== Object.prototype){ + $ERROR('#1: arguments.constructor.prototype === Object.prototype'); + } +} +catch(e){ + $ERROR("#1: arguments doesn't exists"); +} + +//CHECK#2 +var f2 = function(){return arguments.constructor.prototype;}; +try{ + if(f2() !== Object.prototype){ + $ERROR('#2: arguments.constructor.prototype === Object.prototype'); + } +} +catch(e){ + $ERROR("#2: arguments doesn't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js b/js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js new file mode 100644 index 00000000000..234d6ad1aeb --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js @@ -0,0 +1,35 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name callee with property + * attributes { DontEnum } and no others + * + * @path ch10/10.6/S10.6_A3_T1.js + * @description Checking existence of arguments.callee property + */ + +//CHECK#1 +function f1(){ + return arguments.hasOwnProperty("callee"); +} +try{ + if(f1() !== true){ + $ERROR("#1: arguments object doesn't contains property 'callee'"); + } +} +catch(e){ + $ERROR("#1: arguments object doesn't exists"); +} + +//CHECK#2 +var f2 = function(){return arguments.hasOwnProperty("callee");}; +try{ + if(f2() !== true){ + $ERROR("#2: arguments object doesn't contains property 'callee'"); + } +} +catch(e){ + $ERROR("#2: arguments object doesn't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js b/js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js new file mode 100644 index 00000000000..327e5cf3650 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js @@ -0,0 +1,49 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name callee with property + * attributes { DontEnum } and no others + * + * @path ch10/10.6/S10.6_A3_T2.js + * @description Checking if enumerating the arguments.callee property fails + */ + +//CHECK#1 +function f1(){ + for(var x in arguments){ + if (x === "callee"){ + return false; + } + } + return true; +} + +try{ + if(!f1()){ + $ERROR("#1: A property callee don't have attribute { DontEnum }"); + } +} +catch(e){ + $ERROR("#1: arguments object don't exists"); +} + +//CHECK#2 +var f2 = function(){ + for(var x in arguments){ + if (x === "callee"){ + return false; + } + } + return true; +} + +try{ + if(!f2()){ + $ERROR("#2: A property callee don't have attribute { DontEnum }"); + } +} +catch(e){ + $ERROR("#2: arguments object don't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js b/js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js new file mode 100644 index 00000000000..4b262657024 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name callee with property + * attributes { DontEnum } and no others + * + * @path ch10/10.6/S10.6_A3_T3.js + * @description Checking if deleting arguments.callee property fails + * @noStrict + */ + +//CHECK#1 +function f1(){ + return (delete arguments.callee); +} + +try{ + if(!f1()){ + $ERROR("#1: A property callee have attribute { DontDelete }"); + } +} +catch(e){ + $ERROR("#1: arguments object don't exists"); +} + +//CHECK#2 +var f2 = function(){ + return (delete arguments.callee); +} + +try{ + if(!f2()){ + $ERROR("#2: A property callee have attribute { DontDelete }"); + } +} +catch(e){ + $ERROR("#2: arguments object don't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js b/js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js new file mode 100644 index 00000000000..c83983507d1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js @@ -0,0 +1,42 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name callee with property + * attributes { DontEnum } and no others + * + * @path ch10/10.6/S10.6_A3_T4.js + * @description Overriding arguments.callee property + * @noStrict + */ + +var str = "something different"; +//CHECK#1 +function f1(){ + arguments.callee = str; + return arguments; +} + +try{ + if(f1().callee !== str){ + $ERROR("#1: A property callee have attribute { ReadOnly }"); + } +} +catch(e){ + $ERROR("#1: arguments object don't exists"); +} + +//CHECK#2 +var f2 = function(){ + arguments.callee = str; + return arguments; + } +try{ + if(f2().callee !== str){ + $ERROR("#2: A property callee have attribute { ReadOnly }"); + } +} +catch(e){ + $ERROR("#2: arguments object don't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A4.js b/js/src/tests/test262/ch10/10.6/S10.6_A4.js new file mode 100644 index 00000000000..b49902a45e3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The initial value of the created property callee is the + * Function object being executed + * + * @path ch10/10.6/S10.6_A4.js + * @description Checking that arguments.callee === function object + * @noStrict + */ + +//CHECK#1 +function f1(){ + return arguments.callee; +} + +try{ + if(f1 !== f1()){ + $ERROR('#1: arguments.callee === f1'); + } +} +catch(e){ + $ERROR("#1: arguments object doesn't exists"); +} + +//CHECK#2 +var f2 = function(){return arguments.callee;}; + +try{ + if(f2 !== f2()){ + $ERROR('#2: arguments.callee === f2'); + } +} +catch(e){ + $ERROR("#1: arguments object doesn't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js b/js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js new file mode 100644 index 00000000000..a76e58d47bd --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js @@ -0,0 +1,35 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name length with property + * attributes { DontEnum } and no others + * + * @path ch10/10.6/S10.6_A5_T1.js + * @description Checking existence of arguments.length property + */ + +//CHECK#1 +function f1(){ + return arguments.hasOwnProperty("length"); +} +try{ + if(f1() !== true){ + $ERROR("#1: arguments object doesn't contains property 'length'"); + } +} +catch(e){ + $ERROR("#1: arguments object doesn't exists"); +} + +//CHECK#2 +var f2 = function(){return arguments.hasOwnProperty("length");}; +try{ + if(f2() !== true){ + $ERROR("#2: arguments object doesn't contains property 'length'"); + } +} +catch(e){ + $ERROR("#2: arguments object doesn't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js b/js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js new file mode 100644 index 00000000000..a0f4df7a9ea --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js @@ -0,0 +1,49 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name length with property + * attributes { DontEnum } and no others + * + * @path ch10/10.6/S10.6_A5_T2.js + * @description Checking if enumerating the arguments.length property fails + */ + +//CHECK#1 +function f1(){ + for(var x in arguments){ + if (x === "length"){ + return false; + } + } + return true; +} + +try{ + if(!f1()){ + $ERROR("#1: A property length don't have attribute { DontEnum }"); + } +} +catch(e){ + $ERROR("#1: arguments object don't exists"); +} + +//CHECK#2 +var f2 = function(){ + for(var x in arguments){ + if (x === "length"){ + return false; + } + } + return true; +} + +try{ + if(!f2()){ + $ERROR("#2: A property length don't have attribute { DontEnum }"); + } +} +catch(e){ + $ERROR("#2: arguments object don't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js b/js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js new file mode 100644 index 00000000000..c8187fac853 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name length with property + * attributes { DontEnum } and no others + * + * @path ch10/10.6/S10.6_A5_T3.js + * @description Checking if deleting arguments.length property fails + */ + +//CHECK#1 +function f1(){ + return (delete arguments.length); +} + +try{ + if(!f1()){ + $ERROR("#1: A property length have attribute { DontDelete }"); + } +} +catch(e){ + $ERROR("#1: arguments object don't exists"); +} + +//CHECK#2 +var f2 = function(){ + return (delete arguments.length); +} + +try{ + if(!f2()){ + $ERROR("#2: A property length have attribute { DontDelete }"); + } +} +catch(e){ + $ERROR("#2: arguments object don't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js b/js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js new file mode 100644 index 00000000000..7178bf4240a --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js @@ -0,0 +1,41 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * A property is created with name length with property + * attributes { DontEnum } and no others + * + * @path ch10/10.6/S10.6_A5_T4.js + * @description Overriding arguments.length property + */ + +var str = "something different"; +//CHECK#1 +function f1(){ + arguments.length = str; + return arguments; +} + +try{ + if(f1().length !== str){ + $ERROR("#1: A property length have attribute { ReadOnly }"); + } +} +catch(e){ + $ERROR("#1: arguments object don't exists"); +} + +//CHECK#2 +var f2 = function(){ + arguments.length = str; + return arguments; + }; +try{ + if(f2().length !== str){ + $ERROR("#2: A property length have attribute { ReadOnly }"); + } +} +catch(e){ + $ERROR("#2: arguments object don't exists"); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A6.js b/js/src/tests/test262/ch10/10.6/S10.6_A6.js new file mode 100644 index 00000000000..3f1d0d1c1dd --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A6.js @@ -0,0 +1,67 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The initial value of the created property length is the number + * of actual parameter values supplied by the caller + * + * @path ch10/10.6/S10.6_A6.js + * @description Create function, that returned arguments.length + */ + +function f1(){ + return arguments.length; +} + +//CHECK#1 +if(!(f1() === 0)){ + $ERROR('#1: argument.length === 0'); +} + +//CHECK#2 +if(!(f1(0) === 1)){ + $ERROR('#2: argument.length === 1'); +} + +//CHECK#3 +if(!(f1(0, 1) === 2)){ + $ERROR('#3: argument.length === 2'); +} + +//CHECK#4 +if(!(f1(0, 1, 2) === 3)){ + $ERROR('#4: argument.length === 3'); +} + +//CHECK#5 +if(!(f1(0, 1, 2, 3) === 4)){ + $ERROR('#5: argument.length === 4'); +} + +var f2 = function(){return arguments.length;}; + +//CHECK#6 +if(!(f2() === 0)){ + $ERROR('#6: argument.length === 0'); +} + +//CHECK#7 +if(!(f2(0) === 1)){ + $ERROR('#7: argument.length === 1'); +} + +//CHECK#8 +if(!(f2(0, 1) === 2)){ + $ERROR('#8: argument.length === 2'); +} + +//CHECK#9 +if(!(f2(0, 1, 2) === 3)){ + $ERROR('#9: argument.length === 3'); +} + +//CHECK#10 +if(!(f2(0, 1, 2, 3) === 4)){ + $ERROR('#10: argument.length === 4'); +} + diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A7.js b/js/src/tests/test262/ch10/10.6/S10.6_A7.js new file mode 100644 index 00000000000..f013ba01336 --- /dev/null +++ b/js/src/tests/test262/ch10/10.6/S10.6_A7.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Get arguments of function + * + * @path ch10/10.6/S10.6_A7.js + * @description Use property arguments + */ + +function f1() { + return arguments; +} + +//CHECK#1-5 +for(var i = 1; i < 5; i++){ +if (f1(1,2,3,4,5)[i] !== (i+1)) + $ERROR("#"+i+": Returning function's arguments work wrong, f1(1,2,3,4,5)["+i+"] !== "+(i+1)); +} + diff --git a/js/src/tests/test262/ch10/10.6/browser.js b/js/src/tests/test262/ch10/10.6/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/10.6/shell.js b/js/src/tests/test262/ch10/10.6/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/browser.js b/js/src/tests/test262/ch10/browser.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/ch10/shell.js b/js/src/tests/test262/ch10/shell.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/tests/test262/shell.js b/js/src/tests/test262/shell.js index 4f1af7fb5d8..696171bb633 100644 --- a/js/src/tests/test262/shell.js +++ b/js/src/tests/test262/shell.js @@ -1,3 +1,904 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved. +/// Ecma International makes this code available under the terms and conditions set +/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +/// "Use Terms"). Any redistribution of this code must retain the above +/// copyright and this notice and otherwise comply with the Use Terms. + +//----------------------------------------------------------------------------- +function compareArray(aExpected, aActual) { + if (aActual.length != aExpected.length) { + return false; + } + + aExpected.sort(); + aActual.sort(); + + var s; + for (var i = 0; i < aExpected.length; i++) { + if (aActual[i] !== aExpected[i]) { + return false; + } + } + return true; +} + +//----------------------------------------------------------------------------- +function arrayContains(arr, expected) { + var found; + for (var i = 0; i < expected.length; i++) { + found = false; + for (var j = 0; j < arr.length; j++) { + if (expected[i] === arr[j]) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; +} + +//----------------------------------------------------------------------------- +var supportsArrayIndexGettersOnArrays = undefined; +function fnSupportsArrayIndexGettersOnArrays() { + if (typeof supportsArrayIndexGettersOnArrays !== "undefined") { + return supportsArrayIndexGettersOnArrays; + } + + supportsArrayIndexGettersOnArrays = false; + + if (fnExists(Object.defineProperty)) { + var arr = []; + Object.defineProperty(arr, "0", { + get: function() { + supportsArrayIndexGettersOnArrays = true; + return 0; + } + }); + var res = arr[0]; + } + + return supportsArrayIndexGettersOnArrays; +} + +//----------------------------------------------------------------------------- +var supportsArrayIndexGettersOnObjects = undefined; +function fnSupportsArrayIndexGettersOnObjects() { + if (typeof supportsArrayIndexGettersOnObjects !== "undefined") + return supportsArrayIndexGettersOnObjects; + + supportsArrayIndexGettersOnObjects = false; + + if (fnExists(Object.defineProperty)) { + var obj = {}; + Object.defineProperty(obj, "0", { + get: function() { + supportsArrayIndexGettersOnObjects = true; + return 0; + } + }); + var res = obj[0]; + } + + return supportsArrayIndexGettersOnObjects; +} + +//----------------------------------------------------------------------------- +function ConvertToFileUrl(pathStr) { + return "file:" + pathStr.replace(/\\/g, "/"); +} + +//----------------------------------------------------------------------------- +function fnExists(/*arguments*/) { + for (var i = 0; i < arguments.length; i++) { + if (typeof (arguments[i]) !== "function") return false; + } + return true; +} + +//----------------------------------------------------------------------------- +var __globalObject = Function("return this;")(); +function fnGlobalObject() { + return __globalObject; +} + +//----------------------------------------------------------------------------- +function fnSupportsStrict() { + "use strict"; + try { + eval('with ({}) {}'); + return false; + } catch (e) { + return true; + } +} + +//----------------------------------------------------------------------------- +//Verify all attributes specified data property of given object: +//value, writable, enumerable, configurable +//If all attribute values are expected, return true, otherwise, return false +function dataPropertyAttributesAreCorrect(obj, + name, + value, + writable, + enumerable, + configurable) { + var attributesCorrect = true; + + if (obj[name] !== value) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof value === "number" && + isNaN(value)) { + // keep empty + } else { + attributesCorrect = false; + } + } + + try { + if (obj[name] === "oldValue") { + obj[name] = "newValue"; + } else { + obj[name] = "OldValue"; + } + } catch (we) { + } + + var overwrited = false; + if (obj[name] !== value) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof value === "number" && + isNaN(value)) { + // keep empty + } else { + overwrited = true; + } + } + if (overwrited !== writable) { + attributesCorrect = false; + } + + var enumerated = false; + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === name) { + enumerated = true; + } + } + + if (enumerated !== enumerable) { + attributesCorrect = false; + } + + + var deleted = false; + + try { + delete obj[name]; + } catch (de) { + } + if (!obj.hasOwnProperty(name)) { + deleted = true; + } + if (deleted !== configurable) { + attributesCorrect = false; + } + + return attributesCorrect; +} + +//----------------------------------------------------------------------------- +//Verify all attributes specified accessor property of given object: +//get, set, enumerable, configurable +//If all attribute values are expected, return true, otherwise, return false +function accessorPropertyAttributesAreCorrect(obj, + name, + get, + set, + setVerifyHelpProp, + enumerable, + configurable) { + var attributesCorrect = true; + + if (get !== undefined) { + if (obj[name] !== get()) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof get() === "number" && + isNaN(get())) { + // keep empty + } else { + attributesCorrect = false; + } + } + } else { + if (obj[name] !== undefined) { + attributesCorrect = false; + } + } + + try { + var desc = Object.getOwnPropertyDescriptor(obj, name); + if (typeof desc.set === "undefined") { + if (typeof set !== "undefined") { + attributesCorrect = false; + } + } else { + obj[name] = "toBeSetValue"; + if (obj[setVerifyHelpProp] !== "toBeSetValue") { + attributesCorrect = false; + } + } + } catch (se) { + throw se; + } + + + var enumerated = false; + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === name) { + enumerated = true; + } + } + + if (enumerated !== enumerable) { + attributesCorrect = false; + } + + + var deleted = false; + try { + delete obj[name]; + } catch (de) { + throw de; + } + if (!obj.hasOwnProperty(name)) { + deleted = true; + } + if (deleted !== configurable) { + attributesCorrect = false; + } + + return attributesCorrect; +} + +//----------------------------------------------------------------------------- +var NotEarlyErrorString = "NotEarlyError"; +var EarlyErrorRePat = "^((?!" + NotEarlyErrorString + ").)*$"; +var NotEarlyError = new Error(NotEarlyErrorString); + +//----------------------------------------------------------------------------- +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function Test262Error(message) { + if (message) this.message = message; +} + +Test262Error.prototype.toString = function () { + return "Test262 Error: " + this.message; +}; + +function testFailed(message) { + throw new Test262Error(message); +} + + +function testPrint(message) { + +} + + +//adaptors for Test262 framework +function $PRINT(message) { + +} + +function $INCLUDE(message) { } +function $ERROR(message) { + testFailed(message); +} + +function $FAIL(message) { + testFailed(message); +} + + + +//Sputnik library definitions +//Ultimately these should be namespaced some how and only made +//available to tests that explicitly include them. +//For now, we just define the globally + +//math_precision.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function getPrecision(num) { + //TODO: Create a table of prec's, + // because using Math for testing Math isn't that correct. + + var log2num = Math.log(Math.abs(num)) / Math.LN2; + var pernum = Math.ceil(log2num); + return (2 * Math.pow(2, -52 + pernum)); + //return(0); +} + + +//math_isequal.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +var prec; +function isEqual(num1, num2) { + if ((num1 === Infinity) && (num2 === Infinity)) { + return (true); + } + if ((num1 === -Infinity) && (num2 === -Infinity)) { + return (true); + } + prec = getPrecision(Math.min(Math.abs(num1), Math.abs(num2))); + return (Math.abs(num1 - num2) <= prec); + //return(num1 === num2); +} + +//numeric_conversion.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +function ToInteger(p) { + var x = Number(p); + + if (isNaN(x)) { + return +0; + } + + if ((x === +0) + || (x === -0) + || (x === Number.POSITIVE_INFINITY) + || (x === Number.NEGATIVE_INFINITY)) { + return x; + } + + var sign = (x < 0) ? -1 : 1; + + return (sign * Math.floor(Math.abs(x))); +} + +//Date_constants.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +var HoursPerDay = 24; +var MinutesPerHour = 60; +var SecondsPerMinute = 60; + +var msPerDay = 86400000; +var msPerSecond = 1000; +var msPerMinute = 60000; +var msPerHour = 3600000; + +var date_1899_end = -2208988800001; +var date_1900_start = -2208988800000; +var date_1969_end = -1; +var date_1970_start = 0; +var date_1999_end = 946684799999; +var date_2000_start = 946684800000; +var date_2099_end = 4102444799999; +var date_2100_start = 4102444800000; + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +//the following values are normally generated by the sputnik.py driver +var $LocalTZ, + $DST_start_month, + $DST_start_sunday, + $DST_start_hour, + $DST_start_minutes, + $DST_end_month, + $DST_end_sunday, + $DST_end_hour, + $DST_end_minutes; + +(function () { + /** + * Finds the first date, starting from |start|, where |predicate| + * holds. + */ + var findNearestDateBefore = function(start, predicate) { + var current = start; + var month = 1000 * 60 * 60 * 24 * 30; + for (var step = month; step > 0; step = Math.floor(step / 3)) { + if (!predicate(current)) { + while (!predicate(current)) + current = new Date(current.getTime() + step); + current = new Date(current.getTime() - step); + } + } + while (!predicate(current)) { + current = new Date(current.getTime() + 1); + } + return current; + }; + + var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0); + var decemberDate = new Date(2000, 11, 20, 0, 0, 0, 0); + var juneOffset = juneDate.getTimezoneOffset(); + var decemberOffset = decemberDate.getTimezoneOffset(); + var isSouthernHemisphere = (juneOffset > decemberOffset); + var winterTime = isSouthernHemisphere ? juneDate : decemberDate; + var summerTime = isSouthernHemisphere ? decemberDate : juneDate; + + var dstStart = findNearestDateBefore(winterTime, function (date) { + return date.getTimezoneOffset() == summerTime.getTimezoneOffset(); + }); + $DST_start_month = dstStart.getMonth(); + $DST_start_sunday = dstStart.getDate() > 15 ? '"last"' : '"first"'; + $DST_start_hour = dstStart.getHours(); + $DST_start_minutes = dstStart.getMinutes(); + + var dstEnd = findNearestDateBefore(summerTime, function (date) { + return date.getTimezoneOffset() == winterTime.getTimezoneOffset(); + }); + $DST_end_month = dstEnd.getMonth(); + $DST_end_sunday = dstEnd.getDate() > 15 ? '"last"' : '"first"'; + $DST_end_hour = dstEnd.getHours(); + $DST_end_minutes = dstEnd.getMinutes(); + + return; +})(); + + +//Date.library.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +//15.9.1.2 Day Number and Time within Day +function Day(t) { + return Math.floor(t/msPerDay); +} + +function TimeWithinDay(t) { + return t%msPerDay; +} + +//15.9.1.3 Year Number +function DaysInYear(y){ + if(y%4 != 0) return 365; + if(y%4 == 0 && y%100 != 0) return 366; + if(y%100 == 0 && y%400 != 0) return 365; + if(y%400 == 0) return 366; +} + +function DayFromYear(y) { + return (365*(y-1970) + + Math.floor((y-1969)/4) + - Math.floor((y-1901)/100) + + Math.floor((y-1601)/400)); +} + +function TimeFromYear(y){ + return msPerDay*DayFromYear(y); +} + +function YearFromTime(t) { + t = Number(t); + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + + for(var time = 0;;year += sign){ + time = TimeFromYear(year); + + if(sign > 0 && time > t){ + year -= sign; + break; + } + else if(sign < 0 && time <= t){ + break; + } + }; + return year; +} + +function InLeapYear(t){ + if(DaysInYear(YearFromTime(t)) == 365) + return 0; + + if(DaysInYear(YearFromTime(t)) == 366) + return 1; +} + +function DayWithinYear(t) { + return Day(t)-DayFromYear(YearFromTime(t)); +} + +//15.9.1.4 Month Number +function MonthFromTime(t){ + var day = DayWithinYear(t); + var leap = InLeapYear(t); + + if((0 <= day) && (day < 31)) return 0; + if((31 <= day) && (day < (59+leap))) return 1; + if(((59+leap) <= day) && (day < (90+leap))) return 2; + if(((90+leap) <= day) && (day < (120+leap))) return 3; + if(((120+leap) <= day) && (day < (151+leap))) return 4; + if(((151+leap) <= day) && (day < (181+leap))) return 5; + if(((181+leap) <= day) && (day < (212+leap))) return 6; + if(((212+leap) <= day) && (day < (243+leap))) return 7; + if(((243+leap) <= day) && (day < (273+leap))) return 8; + if(((273+leap) <= day) && (day < (304+leap))) return 9; + if(((304+leap) <= day) && (day < (334+leap))) return 10; + if(((334+leap) <= day) && (day < (365+leap))) return 11; +} + +//15.9.1.5 Date Number +function DateFromTime(t) { + var day = DayWithinYear(t); + var month = MonthFromTime(t); + var leap = InLeapYear(t); + + if(month == 0) return day+1; + if(month == 1) return day-30; + if(month == 2) return day-58-leap; + if(month == 3) return day-89-leap; + if(month == 4) return day-119-leap; + if(month == 5) return day-150-leap; + if(month == 6) return day-180-leap; + if(month == 7) return day-211-leap; + if(month == 8) return day-242-leap; + if(month == 9) return day-272-leap; + if(month == 10) return day-303-leap; + if(month == 11) return day-333-leap; +} + +//15.9.1.6 Week Day +function WeekDay(t) { + var weekday = (Day(t)+4)%7; + return (weekday < 0 ? 7+weekday : weekday); +} + +//15.9.1.9 Daylight Saving Time Adjustment +$LocalTZ = (new Date()).getTimezoneOffset() / -60; +if (DaylightSavingTA((new Date()).valueOf()) !== 0) { + $LocalTZ -= 1; +} +var LocalTZA = $LocalTZ*msPerHour; + +function DaysInMonth(m, leap) { + m = m%12; + + //April, June, Sept, Nov + if(m == 3 || m == 5 || m == 8 || m == 10 ) { + return 30; + } + + //Jan, March, May, July, Aug, Oct, Dec + if(m == 0 || m == 2 || m == 4 || m == 6 || m == 7 || m == 9 || m == 11){ + return 31; + } + + //Feb + return 28+leap; +} + +function GetSundayInMonth(t, m, count){ + var year = YearFromTime(t); + var tempDate; + + if (count==='"first"') { + for (var d=1; d <= DaysInMonth(m, InLeapYear(t)); d++) { + tempDate = new Date(year, m, d); + if (tempDate.getDay()===0) { + return tempDate.valueOf(); + } + } + } else if(count==='"last"') { + for (var d=DaysInMonth(m, InLeapYear(t)); d>0; d--) { + tempDate = new Date(year, m, d); + if (tempDate.getDay()===0) { + return tempDate.valueOf(); + } + } + } + throw new Error("Unsupported 'count' arg:" + count); +} +/* +function GetSundayInMonth(t, m, count){ + var year = YearFromTime(t); + var leap = InLeapYear(t); + var day = 0; + + if(m >= 1) day += DaysInMonth(0, leap); + if(m >= 2) day += DaysInMonth(1, leap); + if(m >= 3) day += DaysInMonth(2, leap); + if(m >= 4) day += DaysInMonth(3, leap); + if(m >= 5) day += DaysInMonth(4, leap); + if(m >= 6) day += DaysInMonth(5, leap); + if(m >= 7) day += DaysInMonth(6, leap); + if(m >= 8) day += DaysInMonth(7, leap); + if(m >= 9) day += DaysInMonth(8, leap); + if(m >= 10) day += DaysInMonth(9, leap); + if(m >= 11) day += DaysInMonth(10, leap); + + var month_start = TimeFromYear(year)+day*msPerDay; + var sunday = 0; + + if(count === "last"){ + for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay; + WeekDay(last_sunday)>0; + last_sunday -= msPerDay + ){}; + sunday = last_sunday; + } + else { + for(var first_sunday = month_start; + WeekDay(first_sunday)>0; + first_sunday += msPerDay + ){}; + sunday = first_sunday+7*msPerDay*(count-1); + } + + return sunday; +}*/ + +function DaylightSavingTA(t) { +// t = t-LocalTZA; + + var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) + + $DST_start_hour*msPerHour + + $DST_start_minutes*msPerMinute; + + var k = new Date(DST_start); + + var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) + + $DST_end_hour*msPerHour + + $DST_end_minutes*msPerMinute; + + if ( t >= DST_start && t < DST_end ) { + return msPerHour; + } else { + return 0; + } +} + +//15.9.1.9 Local Time +function LocalTime(t){ + return t+LocalTZA+DaylightSavingTA(t); +} + +function UTC(t) { + return t-LocalTZA-DaylightSavingTA(t-LocalTZA); +} + +//15.9.1.10 Hours, Minutes, Second, and Milliseconds +function HourFromTime(t){ + return Math.floor(t/msPerHour)%HoursPerDay; +} + +function MinFromTime(t){ + return Math.floor(t/msPerMinute)%MinutesPerHour; +} + +function SecFromTime(t){ + return Math.floor(t/msPerSecond)%SecondsPerMinute; +} + +function msFromTime(t){ + return t%msPerSecond; +} + +//15.9.1.11 MakeTime (hour, min, sec, ms) +function MakeTime(hour, min, sec, ms){ + if ( !isFinite(hour) || !isFinite(min) || !isFinite(sec) || !isFinite(ms)) { + return Number.NaN; + } + + hour = ToInteger(hour); + min = ToInteger(min); + sec = ToInteger(sec); + ms = ToInteger(ms); + + return ((hour*msPerHour) + (min*msPerMinute) + (sec*msPerSecond) + ms); +} + +//15.9.1.12 MakeDay (year, month, date) +function MakeDay(year, month, date) { + if ( !isFinite(year) || !isFinite(month) || !isFinite(date)) { + return Number.NaN; + } + + year = ToInteger(year); + month = ToInteger(month); + date = ToInteger(date ); + + var result5 = year + Math.floor(month/12); + var result6 = month%12; + + var sign = ( year < 1970 ) ? -1 : 1; + var t = ( year < 1970 ) ? 1 : 0; + var y = ( year < 1970 ) ? 1969 : 1970; + + if( sign == -1 ){ + for ( y = 1969; y >= year; y += sign ) { + t += sign * DaysInYear(y)*msPerDay; + } + } else { + for ( y = 1970 ; y < year; y += sign ) { + t += sign * DaysInYear(y)*msPerDay; + } + } + + var leap = 0; + for ( var m = 0; m < month; m++ ) { + //if year is changed, than we need to recalculate leep + leap = InLeapYear(t); + t += DaysInMonth(m, leap)*msPerDay; + } + + if ( YearFromTime(t) != result5 ) { + return Number.NaN; + } + if ( MonthFromTime(t) != result6 ) { + return Number.NaN; + } + if ( DateFromTime(t) != 1 ) { + return Number.NaN; + } + + return Day(t)+date-1; +} + +//15.9.1.13 MakeDate (day, time) +function MakeDate( day, time ) { + if(!isFinite(day) || !isFinite(time)) { + return Number.NaN; + } + + return day*msPerDay+time; +} + +//15.9.1.14 TimeClip (time) +function TimeClip(time) { + if(!isFinite(time) || Math.abs(time) > 8.64e15){ + return Number.NaN; + } + + return ToInteger(time); +} + +//Test Functions +//ConstructDate is considered deprecated, and should not be used directly from +//test262 tests as it's incredibly sensitive to DST start/end dates that +//vary with geographic location. +function ConstructDate(year, month, date, hours, minutes, seconds, ms){ + /* + * 1. Call ToNumber(year) + * 2. Call ToNumber(month) + * 3. If date is supplied use ToNumber(date); else use 1 + * 4. If hours is supplied use ToNumber(hours); else use 0 + * 5. If minutes is supplied use ToNumber(minutes); else use 0 + * 6. If seconds is supplied use ToNumber(seconds); else use 0 + * 7. If ms is supplied use ToNumber(ms); else use 0 + * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + * 9. Compute MakeDay(Result(8), Result(2), Result(3)) + * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + * 11. Compute MakeDate(Result(9), Result(10)) + * 12. Set the [[Value]] property of the newly constructed object to TimeClip(UTC(Result(11))) + */ + var r1 = Number(year); + var r2 = Number(month); + var r3 = ((date && arguments.length > 2) ? Number(date) : 1); + var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0); + var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0); + var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0); + var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0); + + var r8 = r1; + + if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99)) + r8 = 1900+r1; + + var r9 = MakeDay(r8, r2, r3); + var r10 = MakeTime(r4, r5, r6, r7); + var r11 = MakeDate(r9, r10); + + var retVal = TimeClip(UTC(r11)); + return retVal; +} + + + +/**** Python code for initialize the above constants +// We may want to replicate the following in JavaScript. +// However, using JS date operations to generate parameters that are then used to +// test those some date operations seems unsound. However, it isn't clear if there +//is a good interoperable alternative. + +# Copyright 2009 the Sputnik authors. All rights reserved. +# This code is governed by the BSD license found in the LICENSE file. + +def GetDaylightSavingsTimes(): +# Is the given floating-point time in DST? +def IsDst(t): +return time.localtime(t)[-1] +# Binary search to find an interval between the two times no greater than +# delta where DST switches, returning the midpoint. +def FindBetween(start, end, delta): +while end - start > delta: +middle = (end + start) / 2 +if IsDst(middle) == IsDst(start): +start = middle +else: +end = middle +return (start + end) / 2 +now = time.time() +one_month = (30 * 24 * 60 * 60) +# First find a date with different daylight savings. To avoid corner cases +# we try four months before and after today. +after = now + 4 * one_month +before = now - 4 * one_month +if IsDst(now) == IsDst(before) and IsDst(now) == IsDst(after): +logger.warning("Was unable to determine DST info.") +return None +# Determine when the change occurs between now and the date we just found +# in a different DST. +if IsDst(now) != IsDst(before): +first = FindBetween(before, now, 1) +else: +first = FindBetween(now, after, 1) +# Determine when the change occurs between three and nine months from the +# first. +second = FindBetween(first + 3 * one_month, first + 9 * one_month, 1) +# Find out which switch is into and which if out of DST +if IsDst(first - 1) and not IsDst(first + 1): +start = second +end = first +else: +start = first +end = second +return (start, end) + + +def GetDaylightSavingsAttribs(): +times = GetDaylightSavingsTimes() +if not times: +return None +(start, end) = times +def DstMonth(t): +return time.localtime(t)[1] - 1 +def DstHour(t): +return time.localtime(t - 1)[3] + 1 +def DstSunday(t): +if time.localtime(t)[2] > 15: +return "'last'" +else: +return "'first'" +def DstMinutes(t): +return (time.localtime(t - 1)[4] + 1) % 60 +attribs = { } +attribs['start_month'] = DstMonth(start) +attribs['end_month'] = DstMonth(end) +attribs['start_sunday'] = DstSunday(start) +attribs['end_sunday'] = DstSunday(end) +attribs['start_hour'] = DstHour(start) +attribs['end_hour'] = DstHour(end) +attribs['start_minutes'] = DstMinutes(start) +attribs['end_minutes'] = DstMinutes(end) +return attribs + +*********/ + +//--Test case registration----------------------------------------------------- +function runTestCase(testcase) { + if (testcase() !== true) { + $ERROR("Test case returned non-true value!"); + } +} /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ From cd942226a4fbdae7c8678f5539ddb16194be4b25 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Tue, 4 Jun 2013 10:46:36 -0700 Subject: [PATCH 10/23] Bug 496923 - Remove js/src/tests/update-test402.sh as update-test262.sh subsumes it. r=trivial --HG-- extra : rebase_source : 18d64c90097ab0776657e67cc146cc7f25fedb8c --- js/src/tests/update-test402.sh | 69 ---------------------------------- 1 file changed, 69 deletions(-) delete mode 100755 js/src/tests/update-test402.sh diff --git a/js/src/tests/update-test402.sh b/js/src/tests/update-test402.sh deleted file mode 100755 index 29e9d2a9b82..00000000000 --- a/js/src/tests/update-test402.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# Updates the jstests copy of the test cases of Test402, the conformance test -# suite for standard ECMA-402, ECMAScript Internationalization API -# Specification. - -# Usage: update-test402.sh -# E.g.: update-test402.sh http://hg.ecmascript.org/tests/test262/ -# Note that test402 is part of the test262 repository. - -# Abort when an error occurs. -set -e - -if [ $# -lt 1 ]; then - echo "Usage: update-test402.sh " - exit 1 -fi - -# Test402 in its original form uses the harness of Test262, the conformance -# test suite for standard ECMA-262, ECMAScript Language Specification, and its -# test cases are part of the test262 repository. -# Mercurial doesn't have a way to download just a part of a repository, or to -# just get the working copy - we have to clone the entire thing. We use a -# temporary test262 directory for that. -tmp_dir=`mktemp -d /tmp/test402.XXXX`/test262 || exit 1 -echo "Feel free to get some coffee - this could take a few minutes..." -hg clone $1 ${tmp_dir} - -# Now to the actual test402 directory. -test402_dir=`dirname $0`/test402 -rm -rf ${test402_dir} -mkdir ${test402_dir} -mkdir ${test402_dir}/lib - -# Copy over the test402 tests, the supporting JavaScript library files, and -# the license. -cp -r ${tmp_dir}/test/suite/intl402/ch* ${test402_dir} -cp ${tmp_dir}/test/harness/testBuiltInObject.js ${test402_dir}/lib -cp ${tmp_dir}/test/harness/testIntl.js ${test402_dir}/lib -cp ${tmp_dir}/LICENSE ${test402_dir} - -# Create empty browser.js and shell.js in each test directory to keep -# jstests happy. -for dir in `find test402/ch* -type d -print` ; do - touch $dir/browser.js - touch $dir/shell.js -done - -# Restore our own jstests adapter files. -cp supporting/test402-browser.js test402/browser.js -cp supporting/test402-shell.js test402/shell.js - -# Keep a record of what we imported. -echo "URL: $1" > ${test402_dir}/HG-INFO -hg -R ${tmp_dir} log -r. >> ${test402_dir}/HG-INFO - -# Update for the patch. -hg addremove ${test402_dir} - -# Get rid of the Test262 clone. -rm -rf ${tmp_dir} - -# The alert reader may now be wondering: what about test402 tests we don't -# currently pass? We disable such tests in js/src/tests/jstests.list, one by -# one. This has the moderate benefit that if a bug is fixed, only that one file -# must be updated, and we don't have to rerun this script. From 38aa860a8e10032484ef1f55444660524a31138b Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 4 Jun 2013 14:23:29 -0400 Subject: [PATCH 11/23] Backed out changeset 0fbef2fd43e0 (bug 877733) for test bustage on a CLOSED TREE. --- testing/mozbase/generate_diff.py | 9 +-- testing/mozbase/mozcrash/setup.py | 2 +- testing/mozbase/mozinfo/README.md | 62 +++++++++++++++++++ testing/mozbase/mozinfo/mozinfo/__init__.py | 49 --------------- testing/mozbase/mozinfo/mozinfo/mozinfo.py | 46 +++++++------- testing/mozbase/mozinfo/setup.py | 17 +++-- testing/mozbase/mozinstall/README.md | 60 ++++++++++++++++++ testing/mozbase/mozinstall/setup.py | 13 ++-- testing/mozbase/mozprocess/setup.py | 2 +- .../mozprocess/tests/iniparser/Makefile | 2 +- testing/mozbase/mozprocess/tests/manifest.ini | 2 +- 11 files changed, 172 insertions(+), 92 deletions(-) create mode 100644 testing/mozbase/mozinfo/README.md create mode 100644 testing/mozbase/mozinstall/README.md diff --git a/testing/mozbase/generate_diff.py b/testing/mozbase/generate_diff.py index 3020d9a93df..e986f79d0a2 100755 --- a/testing/mozbase/generate_diff.py +++ b/testing/mozbase/generate_diff.py @@ -147,9 +147,7 @@ def parse_versions(*args): return retval def version_tag(directory, version): - """return a version tag string given the directory name of the package""" - package = current_package_info[directory]['name'] - return '%s-%s' % (package, version) + return '%s-%s' % (directory, version) def setup(**kwargs): """monkey-patch function for setuptools.setup""" @@ -323,7 +321,7 @@ def main(args=sys.argv[1:]): tag = version_tag(directory, version) if tag not in _tags: - error("Tag for '%s' -- %s -- not in tags:\n%s" % (directory, version, '\n'.join(sorted(_tags)))) + error("Tag for '%s' -- %s -- not in tags") # ensure that the versions to mirror are compatible with what is in m-c old_package_info = current_package_info.copy() @@ -378,8 +376,7 @@ def main(args=sys.argv[1:]): finally: # cleanup - if options.check: - revert(hg_root, untracked) + revert(hg_root, untracked) shutil.rmtree(tempdir) print "Diff at %s" % output diff --git a/testing/mozbase/mozcrash/setup.py b/testing/mozbase/mozcrash/setup.py index d4a674e160e..0b20106d0e5 100644 --- a/testing/mozbase/mozcrash/setup.py +++ b/testing/mozbase/mozcrash/setup.py @@ -4,7 +4,7 @@ from setuptools import setup -PACKAGE_VERSION = '0.7' +PACKAGE_VERSION = '0.6' # dependencies deps = ['mozfile >= 0.3', diff --git a/testing/mozbase/mozinfo/README.md b/testing/mozbase/mozinfo/README.md new file mode 100644 index 00000000000..ab3803521d7 --- /dev/null +++ b/testing/mozbase/mozinfo/README.md @@ -0,0 +1,62 @@ +Throughout [mozmill](https://developer.mozilla.org/en/Mozmill) +and other Mozilla python code, checking the underlying +platform is done in many different ways. The various checks needed +lead to a lot of copy+pasting, leaving the reader to wonder....is this +specific check necessary for (e.g.) an operating system? Because +information is not consolidated, checks are not done consistently, nor +is it defined what we are checking for. + +[MozInfo](https://github.com/mozilla/mozbase/tree/master/mozinfo) +proposes to solve this problem. MozInfo is a bridge interface, +making the underlying (complex) plethora of OS and architecture +combinations conform to a subset of values of relavence to +Mozilla software. The current implementation exposes relavent key, +values: `os`, `version`, `bits`, and `processor`. Additionally, the +service pack in use is available on the windows platform. + + +# API Usage + +MozInfo is a python package. Downloading the software and running +`python setup.py develop` will allow you to do `import mozinfo` +from python. +[mozinfo.py](https://github.com/mozilla/mozbase/blob/master/mozinfo/mozinfo.py) +is the only file contained is this package, +so if you need a single-file solution, you can just download or call +this file through the web. + +The top level attributes (`os`, `version`, `bits`, `processor`) are +available as module globals: + + if mozinfo.os == 'win': ... + +In addition, mozinfo exports a dictionary, `mozinfo.info`, that +contain these values. mozinfo also exports: + +- `choices`: a dictionary of possible values for os, bits, and + processor +- `main`: the console_script entry point for mozinfo +- `unknown`: a singleton denoting a value that cannot be determined + +`unknown` has the string representation `"UNKNOWN"`. unknown will evaluate +as `False` in python: + + if not mozinfo.os: ... # unknown! + + +# Command Line Usage + +MozInfo comes with a command line, `mozinfo` which may be used to +diagnose one's current system. + +Example output: + + os: linux + version: Ubuntu 10.10 + bits: 32 + processor: x86 + +Three of these fields, os, bits, and processor, have a finite set of +choices. You may display the value of these choices using +`mozinfo --os`, `mozinfo --bits`, and `mozinfo --processor`. +`mozinfo --help` documents command-line usage. diff --git a/testing/mozbase/mozinfo/mozinfo/__init__.py b/testing/mozbase/mozinfo/mozinfo/__init__.py index 8d293c128ee..8549fba3146 100644 --- a/testing/mozbase/mozinfo/mozinfo/__init__.py +++ b/testing/mozbase/mozinfo/mozinfo/__init__.py @@ -2,53 +2,4 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. -""" -interface to transform introspected system information to a format palatable to -Mozilla - -Module variables: - -.. attribute:: bits - - 32 or 64 - -.. attribute:: isBsd - - Returns ``True`` if the operating system is BSD - -.. attribute:: isLinux - - Returns ``True`` if the operating system is Linux - -.. attribute:: isMac - - Returns ``True`` if the operating system is Mac - -.. attribute:: isWin - - Returns ``True`` if the operating system is Windows - -.. attribute:: os - - Operating system [``'win'``, ``'mac'``, ``'linux'``, ...] - -.. attribute:: processor - - Processor architecture [``'x86'``, ``'x86_64'``, ``'ppc'``, ...] - -.. attribute:: version - - Operating system version string. For windows, the service pack information is also included - -.. attribute:: info - - Returns information identifying the current system. - - * :attr:`bits` - * :attr:`os` - * :attr:`processor` - * :attr:`version` - -""" - from mozinfo import * diff --git a/testing/mozbase/mozinfo/mozinfo/mozinfo.py b/testing/mozbase/mozinfo/mozinfo/mozinfo.py index e77cebfb652..87402f1c0e1 100755 --- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py +++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py @@ -4,6 +4,19 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. +""" +file for interface to transform introspected system information to a format +pallatable to Mozilla + +Information: +- os : what operating system ['win', 'mac', 'linux', ...] +- bits : 32 or 64 +- processor : processor architecture ['x86', 'x86_64', 'ppc', ...] +- version : operating system version string + +For windows, the service pack information is also included +""" + # TODO: it might be a good idea of adding a system name (e.g. 'Ubuntu' for # linux) to the information; I certainly wouldn't want anyone parsing this # information and having behaviour depend on it @@ -13,13 +26,6 @@ import platform import re import sys -try: - import json -except ImportError: - import simplejson as json - -import mozfile - # keep a copy of the os module since updating globals overrides this _os = os @@ -52,10 +58,7 @@ if system in ["Microsoft", "Windows"]: service_pack = os.sys.getwindowsversion()[4] info['service_pack'] = service_pack elif system == "Linux": - if hasattr(platform, "linux_distribution"): - (distro, version, codename) = platform.linux_distribution() - else: - (distro, version, codename) = platform.dist() + (distro, version, codename) = platform.dist() version = "%s %s" % (distro, version) if not processor: processor = machine @@ -108,15 +111,7 @@ def sanitize(info): # method for updating information def update(new_info): - """Update the info. - new_info can either be a dict or a path/url - to a json file containing a dict.""" - - if isinstance(new_info, basestring): - f = mozfile.load(new_info) - new_info = json.loads(f.read()) - f.close() - + """update the info""" info.update(new_info) sanitize(info) globals().update(info) @@ -149,12 +144,21 @@ def main(args=None): # args are JSON blobs to override info if args: + try: + from json import loads + except ImportError: + try: + from simplejson import loads + except ImportError: + def loads(string): + """*really* simple json; will not work with unicode""" + return eval(string, {'true': True, 'false': False, 'null': None}) for arg in args: if _os.path.exists(arg): string = file(arg).read() else: string = arg - update(json.loads(string)) + update(loads(string)) # print out choices if requested flag = False diff --git a/testing/mozbase/mozinfo/setup.py b/testing/mozbase/mozinfo/setup.py index 0080ee059a7..16ae2913d5c 100644 --- a/testing/mozbase/mozinfo/setup.py +++ b/testing/mozbase/mozinfo/setup.py @@ -2,12 +2,21 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. + +import os from setuptools import setup -PACKAGE_VERSION = '0.5' +PACKAGE_VERSION = '0.4' + +# get documentation from the README +try: + here = os.path.dirname(os.path.abspath(__file__)) + description = file(os.path.join(here, 'README.md')).read() +except (OSError, IOError): + description = '' # dependencies -deps = ['mozfile >= 0.6'] +deps = [] try: import json except ImportError: @@ -15,8 +24,8 @@ except ImportError: setup(name='mozinfo', version=PACKAGE_VERSION, - description="Library to get system information for use in Mozilla testing", - long_description="see http://mozbase.readthedocs.org", + description="file for interface to transform introspected system information to a format pallatable to Mozilla", + long_description=description, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='mozilla', author='Mozilla Automation and Testing Team', diff --git a/testing/mozbase/mozinstall/README.md b/testing/mozbase/mozinstall/README.md new file mode 100644 index 00000000000..bc034c6a1a1 --- /dev/null +++ b/testing/mozbase/mozinstall/README.md @@ -0,0 +1,60 @@ +[Mozinstall](https://github.com/mozilla/mozbase/tree/master/mozinstall) is a +python package for installing and uninstalling Mozilla applications on +various platforms. + +For example, depending on the platform, Firefox can be distributed as a +zip, tar.bz2, exe, or dmg file or cloned from a repository. Mozinstall takes +the hassle out of extracting and/or running these files and for convenience +returns the full path to the install directory. In the case that mozinstall +is invoked from the command line, the binary path will be printed to stdout. + +To remove an installed application the uninstaller can be used. It requires +the installation path of the application and will remove all the installed +files. On Windows the uninstaller will be tried first. + +# Usage +Mozinstall can be used as API or via the CLI commands. + +## API +An application can be installed by running the commands below. The install +method will return the installation path of the application. + + import mozinstall + path = mozinstall.install(%installer%, %install_folder%) + +To retrieve the real binary call get_binary with the path and +the application name as arguments: + + mozinstall.get_binary(path, 'firefox') + +If the application is not needed anymore the uninstaller will remove all +traces from the system: + + mozinstall.uninstall(path) + +## CLI +The installer can also be used as a command line tool: + + $ mozinstall -d firefox %installer% + +Whereby the directory option is optional and will default to the current +working directory. If the installation was successful the path to the +binary will be printed to stdout. + +Also the uninstaller can be called via the command line: + + $ mozuninstall %install_path% + +# Error Handling + +Mozinstall throws different types of exceptions: + +- mozinstall.InstallError is thrown when the installation fails for any reason. A traceback is provided. +- mozinstall.InvalidBinary is thrown when the binary cannot be found. +- mozinstall.InvalidSource is thrown when the source is not a recognized file type (zip, exe, tar.bz2, tar.gz, dmg). + + +# Dependencies + +Mozinstall depends on the [mozinfo](https://github.com/mozilla/mozbase/tree/master/mozinfo) +package which is also found in the mozbase repository. diff --git a/testing/mozbase/mozinstall/setup.py b/testing/mozbase/mozinstall/setup.py index 9c14f033c7f..13fa8c5b167 100644 --- a/testing/mozbase/mozinstall/setup.py +++ b/testing/mozbase/mozinstall/setup.py @@ -11,16 +11,17 @@ try: except IOError: description = None -PACKAGE_VERSION = '1.6' +PACKAGE_VERSION = '1.4' -deps = ['mozinfo >= 0.4', +deps = ['mozinfo == 0.4', 'mozfile' ] setup(name='mozInstall', version=PACKAGE_VERSION, - description="package for installing and uninstalling Mozilla applications", - long_description="see http://mozbase.readthedocs.org/", + description="This is a utility package for installing and uninstalling " + "Mozilla applications on various platforms.", + long_description=description, # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=['Environment :: Console', 'Intended Audience :: Developers', @@ -39,14 +40,10 @@ setup(name='mozInstall', include_package_data=True, zip_safe=False, install_requires=deps, - # we have to generate two more executables for those systems that cannot run as Administrator - # and the filename containing "install" triggers the UAC entry_points=""" # -*- Entry points: -*- [console_scripts] mozinstall = mozinstall:install_cli mozuninstall = mozinstall:uninstall_cli - moz_add_to_system = mozinstall:install_cli - moz_remove_from_system = mozinstall:uninstall_cli """, ) diff --git a/testing/mozbase/mozprocess/setup.py b/testing/mozbase/mozprocess/setup.py index e284fa154ad..83de82b0ed4 100644 --- a/testing/mozbase/mozprocess/setup.py +++ b/testing/mozbase/mozprocess/setup.py @@ -4,7 +4,7 @@ from setuptools import setup -PACKAGE_VERSION = '0.11' +PACKAGE_VERSION = '0.10' setup(name='mozprocess', version=PACKAGE_VERSION, diff --git a/testing/mozbase/mozprocess/tests/iniparser/Makefile b/testing/mozbase/mozprocess/tests/iniparser/Makefile index 48c86f9d6af..a6b443c8cfd 100644 --- a/testing/mozbase/mozprocess/tests/iniparser/Makefile +++ b/testing/mozbase/mozprocess/tests/iniparser/Makefile @@ -27,7 +27,7 @@ ifeq ($(UNAME), Darwin) AR = ar ARFLAGS = rcv SHLD = libtool - CFLAGS = -v -arch i386 -fPIC -Wall -ansi -pedantic + CFLAGS = -v -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fPIC -Wall -ansi -pedantic LDFLAGS = -arch_only i386 endif ifeq ($(WIN32), 1) diff --git a/testing/mozbase/mozprocess/tests/manifest.ini b/testing/mozbase/mozprocess/tests/manifest.ini index 1a086edeb96..3fdadf47567 100644 --- a/testing/mozbase/mozprocess/tests/manifest.ini +++ b/testing/mozbase/mozprocess/tests/manifest.ini @@ -2,4 +2,4 @@ # see https://bugzilla.mozilla.org/show_bug.cgi?id=790765#c51 [test_mozprocess.py] -disabled = bug 877864 +skip-if = os == 'win' \ No newline at end of file From e4c4ef5e279bd6614e3a632f17853c19c9d18c30 Mon Sep 17 00:00:00 2001 From: Joe Drew Date: Tue, 4 Jun 2013 14:38:31 -0400 Subject: [PATCH 12/23] Bug 878037 - Revert the null-owner intentional crashes, since we found the cause. r=seth --- image/src/imgRequestProxy.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/image/src/imgRequestProxy.cpp b/image/src/imgRequestProxy.cpp index e843d78fa9c..48d716d3e2b 100644 --- a/image/src/imgRequestProxy.cpp +++ b/image/src/imgRequestProxy.cpp @@ -39,7 +39,6 @@ class ProxyBehaviour virtual imgStatusTracker& GetStatusTracker() const = 0; virtual imgRequest* GetOwner() const = 0; virtual void SetOwner(imgRequest* aOwner) = 0; - virtual bool IsStatic() = 0; }; class RequestBehaviour : public ProxyBehaviour @@ -64,8 +63,6 @@ class RequestBehaviour : public ProxyBehaviour } } - virtual bool IsStatic() { return false; } - private: // We maintain the following invariant: // The proxy is registered at most with a single imgRequest as an observer, @@ -81,11 +78,6 @@ class RequestBehaviour : public ProxyBehaviour mozilla::image::Image* RequestBehaviour::GetImage() const { - if (mOwnerHasImage && !mOwner) { - NS_WARNING("If mOwnerHasImage is true mOwner must be true"); - MOZ_CRASH(); - } - if (!mOwnerHasImage) return nullptr; return GetStatusTracker().GetImage(); @@ -100,11 +92,6 @@ RequestBehaviour::GetStatusTracker() const // That's why this method uses mOwner->GetStatusTracker() instead of just // mOwner->mStatusTracker -- we might have a null mImage and yet have an // mOwner with a non-null mImage (and a null mStatusTracker pointer). - if (mOwnerHasImage && !mOwner) { - NS_WARNING("If mOwnerHasImage is true mOwner must be true"); - MOZ_CRASH(); - } - return mOwner->GetStatusTracker(); } @@ -178,11 +165,6 @@ nsresult imgRequestProxy::Init(imgRequest* aOwner, NS_ABORT_IF_FALSE(mAnimationConsumers == 0, "Cannot have animation before Init"); - if (!mBehaviour->IsStatic() && !aOwner) { - NS_WARNING("Non-static imgRequestProxies should be initialized with an owner"); - MOZ_CRASH(); - } - mBehaviour->SetOwner(aOwner); mListener = aObserver; // Make sure to addref mListener before the AddProxy call below, since @@ -231,11 +213,6 @@ nsresult imgRequestProxy::ChangeOwner(imgRequest *aNewOwner) GetOwner()->RemoveProxy(this, NS_IMAGELIB_CHANGING_OWNER); - if (!mBehaviour->IsStatic() && !aNewOwner) { - NS_WARNING("Non-static imgRequestProxies should be only changed to a non-null owner"); - MOZ_CRASH(); - } - mBehaviour->SetOwner(aNewOwner); // If we were locked, apply the locks here @@ -585,10 +562,6 @@ NS_IMETHODIMP imgRequestProxy::Clone(imgINotificationObserver* aObserver, { nsresult result; imgRequestProxy* proxy; - if (mBehaviour->IsStatic()) { - NS_WARNING("Calling non-static imgRequestProxy::Clone with static mBehaviour"); - MOZ_CRASH(); - } result = Clone(aObserver, &proxy); *aClone = proxy; return result; @@ -1049,8 +1022,6 @@ public: MOZ_ASSERT(!aOwner, "We shouldn't be giving static requests a non-null owner."); } - virtual bool IsStatic() { return true; } - private: // Our image. We have to hold a strong reference here, because that's normally // the job of the underlying request. @@ -1080,10 +1051,6 @@ imgRequestProxyStatic::Clone(imgINotificationObserver* aObserver, { nsresult result; imgRequestProxy* proxy; - if (!mBehaviour->IsStatic()) { - NS_WARNING("Calling static imgRequestProxy::Clone with non-static mBehaviour"); - MOZ_CRASH(); - } result = PerformClone(aObserver, NewStaticProxy, &proxy); *aClone = proxy; return result; From bf470038f51dc0cd7bf9e025c602926edc818e84 Mon Sep 17 00:00:00 2001 From: Joe Drew Date: Tue, 4 Jun 2013 14:38:37 -0400 Subject: [PATCH 13/23] Bug 878037 - Make static image requests (imgRequestProxyStatic) Clone correctly when the concrete-type Clone override is called. r=seth --- image/src/imgRequestProxy.cpp | 10 +++------- image/src/imgRequestProxy.h | 8 +++++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/image/src/imgRequestProxy.cpp b/image/src/imgRequestProxy.cpp index 48d716d3e2b..55df8deb349 100644 --- a/image/src/imgRequestProxy.cpp +++ b/image/src/imgRequestProxy.cpp @@ -1045,13 +1045,9 @@ NS_IMETHODIMP imgRequestProxyStatic::GetImagePrincipal(nsIPrincipal **aPrincipal return NS_OK; } -NS_IMETHODIMP +nsresult imgRequestProxyStatic::Clone(imgINotificationObserver* aObserver, - imgIRequest** aClone) + imgRequestProxy** aClone) { - nsresult result; - imgRequestProxy* proxy; - result = PerformClone(aObserver, NewStaticProxy, &proxy); - *aClone = proxy; - return result; + return PerformClone(aObserver, NewStaticProxy, aClone); } diff --git a/image/src/imgRequestProxy.h b/image/src/imgRequestProxy.h index a36d3bee393..ac70f01b0ca 100644 --- a/image/src/imgRequestProxy.h +++ b/image/src/imgRequestProxy.h @@ -104,7 +104,7 @@ public: // imgRequest::RemoveProxy void ClearAnimationConsumers(); - nsresult Clone(imgINotificationObserver* aObserver, imgRequestProxy** aClone); + virtual nsresult Clone(imgINotificationObserver* aObserver, imgRequestProxy** aClone); nsresult GetStaticRequest(imgRequestProxy** aReturn); protected: @@ -231,8 +231,10 @@ public: NS_IMETHOD GetImagePrincipal(nsIPrincipal** aPrincipal) MOZ_OVERRIDE; - NS_IMETHOD Clone(imgINotificationObserver* aObserver, - imgIRequest** aClone) MOZ_OVERRIDE; + using imgRequestProxy::Clone; + + virtual nsresult Clone(imgINotificationObserver* aObserver, + imgRequestProxy** aClone) MOZ_OVERRIDE; protected: friend imgRequestProxy* NewStaticProxy(imgRequestProxy*); From 11575bb513fb1a86963bec0c33db5206e9da3f20 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 4 Jun 2013 20:44:37 +0200 Subject: [PATCH 14/23] Bug 875211 - use one global gl texture per texture unit rather than one per GrallocTextureHostOGL. r=bjacob --- gfx/layers/opengl/CompositorOGL.cpp | 21 ++++ gfx/layers/opengl/CompositorOGL.h | 10 ++ gfx/layers/opengl/TextureHostOGL.cpp | 137 ++++++++++++--------------- gfx/layers/opengl/TextureHostOGL.h | 19 +--- 4 files changed, 96 insertions(+), 91 deletions(-) diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index 86efafefb5e..af7b3f42319 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -232,6 +232,7 @@ CompositorOGL::CompositorOGL(nsIWidget *aWidget, int aSurfaceWidth, , mSurfaceSize(aSurfaceWidth, aSurfaceHeight) , mHasBGRA(0) , mUseExternalSurfaceSize(aUseExternalSurfaceSize) + , mTextures({0, 0, 0}) , mFrameInProgress(false) , mDestroyed(false) { @@ -279,9 +280,29 @@ CompositorOGL::AddPrograms(ShaderProgramType aType) } } +GLuint +CompositorOGL::GetTemporaryTexture(GLenum aTextureUnit) +{ + if (!mTextures[aTextureUnit - LOCAL_GL_TEXTURE0]) { + gl()->MakeCurrent(); + gl()->fGenTextures(1, &mTextures[aTextureUnit - LOCAL_GL_TEXTURE0]); + } + return mTextures[aTextureUnit - LOCAL_GL_TEXTURE0]; +} + void CompositorOGL::Destroy() { + if (gl()) { + gl()->MakeCurrent(); + gl()->fDeleteTextures(3, mTextures); + mTextures[0] = 0; + mTextures[1] = 0; + mTextures[2] = 0; + } else { + MOZ_ASSERT(!mTextures[0] && !mTextures[1] && !mTextures[2]); + } + if (!mDestroyed) { mDestroyed = true; CleanupResources(); diff --git a/gfx/layers/opengl/CompositorOGL.h b/gfx/layers/opengl/CompositorOGL.h index 666445efbd4..66374e2f529 100644 --- a/gfx/layers/opengl/CompositorOGL.h +++ b/gfx/layers/opengl/CompositorOGL.h @@ -134,6 +134,13 @@ public: gl::RGBARectLayerProgramType : gl::RGBALayerProgramType; } + /** + * The compositor provides with temporary textures for use with direct + * textruing like gralloc texture. + * Doing so lets us use gralloc the way it has been designed to be used + * (see https://wiki.mozilla.org/Platform/GFX/Gralloc) + */ + GLuint GetTemporaryTexture(GLenum aUnit); private: /** * Context target, nullptr when drawing directly to our swap chain. @@ -319,6 +326,9 @@ private: bool mDestroyed; nsAutoPtr mFPS; + // Textures used for direct texturing of buffers like gralloc. + // The index of the texture in this array must correspond to the texture unit. + GLuint mTextures[3]; static bool sDrawFPS; static bool sFrameCounter; }; diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp index cbc1fa4fbfc..7d4d6f7f54b 100644 --- a/gfx/layers/opengl/TextureHostOGL.cpp +++ b/gfx/layers/opengl/TextureHostOGL.cpp @@ -700,28 +700,29 @@ TextureTargetForAndroidPixelFormat(android::PixelFormat aFormat) } } +GrallocTextureHostOGL::GrallocTextureHostOGL() +: mCompositor(nullptr) +, mTextureTarget(0) +, mEGLImage(0) +{ +} + void GrallocTextureHostOGL::SetCompositor(Compositor* aCompositor) { CompositorOGL* glCompositor = static_cast(aCompositor); - if (mGL && !glCompositor) { + if (mCompositor && !glCompositor) { DeleteTextures(); } - mGL = glCompositor ? glCompositor->gl() : nullptr; + mCompositor = glCompositor; } void GrallocTextureHostOGL::DeleteTextures() { - if (mGLTexture || mEGLImage) { - mGL->MakeCurrent(); - if (mGLTexture) { - mGL->fDeleteTextures(1, &mGLTexture); - mGLTexture = 0; - } - if (mEGLImage) { - mGL->DestroyEGLImage(mEGLImage); - mEGLImage = 0; - } + if (mEGLImage) { + gl()->MakeCurrent(); + gl()->DestroyEGLImage(mEGLImage); + mEGLImage = 0; } } @@ -767,20 +768,43 @@ GrallocTextureHostOGL::SwapTexturesImpl(const SurfaceDescriptor& aImage, RegisterTextureHostAtGrallocBufferActor(this, aImage); } +gl::GLContext* +GrallocTextureHostOGL::gl() const +{ + return mCompositor ? mCompositor->gl() : nullptr; +} + void GrallocTextureHostOGL::BindTexture(GLenum aTextureUnit) { - MOZ_ASSERT(mGLTexture); + /* + * The job of this function is to ensure that the texture is tied to the + * android::GraphicBuffer, so that texturing will source the GraphicBuffer. + * + * To this effect we create an EGLImage wrapping this GraphicBuffer, + * using CreateEGLImageForNativeBuffer, and then we tie this EGLImage to our + * texture using fEGLImageTargetTexture2D. + * + * We try to avoid re-creating the EGLImage everytime, by keeping it around + * as the mEGLImage member of this class. + */ + MOZ_ASSERT(gl()); + gl()->MakeCurrent(); - mGL->MakeCurrent(); - mGL->fActiveTexture(aTextureUnit); - mGL->fBindTexture(mTextureTarget, mGLTexture); - mGL->fActiveTexture(LOCAL_GL_TEXTURE0); + GLuint tex = mCompositor->GetTemporaryTexture(aTextureUnit); + + gl()->fActiveTexture(aTextureUnit); + gl()->fBindTexture(mTextureTarget, tex); + if (!mEGLImage) { + mEGLImage = gl()->CreateEGLImageForNativeBuffer(mGraphicBuffer->getNativeBuffer()); + } + gl()->fEGLImageTargetTexture2D(mTextureTarget, mEGLImage); + gl()->fActiveTexture(LOCAL_GL_TEXTURE0); } bool GrallocTextureHostOGL::IsValid() const { - return !!mGL && !!mGraphicBuffer.get(); + return !!gl() && !!mGraphicBuffer.get(); } GrallocTextureHostOGL::~GrallocTextureHostOGL() @@ -798,65 +822,14 @@ GrallocTextureHostOGL::~GrallocTextureHostOGL() bool GrallocTextureHostOGL::Lock() { - if (!IsValid()) { - return false; - } - /* - * The job of this function is to ensure that the texture is tied to the - * android::GraphicBuffer, so that texturing will source the GraphicBuffer. - * - * To this effect we create an EGLImage wrapping this GraphicBuffer, - * using CreateEGLImageForNativeBuffer, and then we tie this EGLImage to our - * texture using fEGLImageTargetTexture2D. - * - * We try to avoid re-creating the EGLImage everytime, by keeping it around - * as the mEGLImage member of this class. - */ - MOZ_ASSERT(mGraphicBuffer.get()); - - mGL->MakeCurrent(); - - if (!mGLTexture) { - mGL->fGenTextures(1, &mGLTexture); - } - mGL->fActiveTexture(LOCAL_GL_TEXTURE0); - mGL->fBindTexture(mTextureTarget, mGLTexture); - if (!mEGLImage) { - mEGLImage = mGL->CreateEGLImageForNativeBuffer(mGraphicBuffer->getNativeBuffer()); - } - mGL->fEGLImageTargetTexture2D(mTextureTarget, mEGLImage); - return true; + // Lock/Unlock is done internally when binding the gralloc buffer to a gl texture + return IsValid(); } void GrallocTextureHostOGL::Unlock() { - /* - * The job of this function is to ensure that we release any read lock placed on - * our android::GraphicBuffer by any drawing code that sourced it via this TextureHost. - * - * Indeed, as soon as we draw with a texture that's tied to a android::GraphicBuffer, - * the GL may place read locks on it. We must ensure that we release them early enough, - * i.e. before the next time that we will try to acquire a write lock on the same buffer, - * because read and write locks on gralloc buffers are mutually exclusive. - */ - if (mGL->Renderer() == GLContext::RendererAdrenoTM205) { - /* XXX This is working around a driver bug exhibited on at least the - * Geeksphone Peak, where retargeting to a different EGL image is very - * slow. See Bug 869696. - */ - if (mGLTexture) { - mGL->MakeCurrent(); - mGL->fDeleteTextures(1, &mGLTexture); - mGLTexture = 0; - } - return; - } - - mGL->MakeCurrent(); - mGL->fActiveTexture(LOCAL_GL_TEXTURE0); - mGL->fBindTexture(mTextureTarget, mGLTexture); - mGL->fEGLImageTargetTexture2D(mTextureTarget, mGL->GetNullEGLImage()); + // Lock/Unlock is done internally when binding the gralloc buffer to a gl texture } gfx::SurfaceFormat @@ -877,7 +850,7 @@ GrallocTextureHostOGL::SetBuffer(SurfaceDescriptor* aBuffer, ISurfaceAllocator* RegisterTextureHostAtGrallocBufferActor(this, *mBuffer); } -#endif +#endif // MOZ_WIDGET_GONK already_AddRefed TextureImageTextureHostOGL::GetAsSurface() { @@ -932,10 +905,20 @@ TiledTextureHostOGL::GetAsSurface() { #ifdef MOZ_WIDGET_GONK already_AddRefed GrallocTextureHostOGL::GetAsSurface() { - nsRefPtr surf = IsValid() && mGLTexture ? - mGL->GetTexImage(mGLTexture, - false, - GetShaderProgram()) + gl()->MakeCurrent(); + + GLuint tex = mCompositor->GetTemporaryTexture(LOCAL_GL_TEXTURE0); + gl()->fActiveTexture(LOCAL_GL_TEXTURE0); + gl()->fBindTexture(mTextureTarget, tex); + if (!mEGLImage) { + mEGLImage = gl()->CreateEGLImageForNativeBuffer(mGraphicBuffer->getNativeBuffer()); + } + gl()->fEGLImageTargetTexture2D(mTextureTarget, mEGLImage); + + nsRefPtr surf = IsValid() ? + gl()->GetTexImage(tex, + false, + GetShaderProgram()) : nullptr; return surf.forget(); } diff --git a/gfx/layers/opengl/TextureHostOGL.h b/gfx/layers/opengl/TextureHostOGL.h index 049f408238b..bcebfa0a68a 100644 --- a/gfx/layers/opengl/TextureHostOGL.h +++ b/gfx/layers/opengl/TextureHostOGL.h @@ -21,6 +21,7 @@ namespace mozilla { namespace layers { class TextureImageTextureHostOGL; +class CompositorOGL; /* * TextureHost implementations for the OpenGL backend. @@ -568,23 +569,12 @@ class GrallocTextureHostOGL , public TextureSourceOGL { public: - GrallocTextureHostOGL() - : mGL(nullptr) - , mTextureTarget(0) - , mGLTexture(0) - , mEGLImage(0) - { - } + GrallocTextureHostOGL(); ~GrallocTextureHostOGL(); virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE; - virtual GLuint GetTextureHandle() - { - return mGLTexture; - } - virtual void UpdateImpl(const SurfaceDescriptor& aImage, nsIntRegion* aRegion = nullptr, nsIntPoint* aOffset = nullptr) MOZ_OVERRIDE; @@ -652,12 +642,13 @@ public: } private: + gl::GLContext* gl() const; + void DeleteTextures(); - RefPtr mGL; + RefPtr mCompositor; android::sp mGraphicBuffer; GLenum mTextureTarget; - GLuint mGLTexture; EGLImage mEGLImage; }; #endif From c9a158b2e5337970b405ce7dc11b76f0ab040301 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 4 Jun 2013 21:02:52 +0200 Subject: [PATCH 15/23] Bug 875211 - fix build on a CLOSED TREE --- gfx/layers/opengl/CompositorOGL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index af7b3f42319..ae266fe0dad 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -232,9 +232,9 @@ CompositorOGL::CompositorOGL(nsIWidget *aWidget, int aSurfaceWidth, , mSurfaceSize(aSurfaceWidth, aSurfaceHeight) , mHasBGRA(0) , mUseExternalSurfaceSize(aUseExternalSurfaceSize) - , mTextures({0, 0, 0}) , mFrameInProgress(false) , mDestroyed(false) + , mTextures({0, 0, 0}) { MOZ_COUNT_CTOR(CompositorOGL); sBackend = LAYERS_OPENGL; From 801ed2089362e9b5d201d7a73a72afeb21587046 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 4 Jun 2013 21:08:15 +0200 Subject: [PATCH 16/23] Bug 875211 - fix windows build on a CLOSED TREE --- gfx/layers/opengl/CompositorOGL.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index ae266fe0dad..ac244dc6346 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -234,9 +234,11 @@ CompositorOGL::CompositorOGL(nsIWidget *aWidget, int aSurfaceWidth, , mUseExternalSurfaceSize(aUseExternalSurfaceSize) , mFrameInProgress(false) , mDestroyed(false) - , mTextures({0, 0, 0}) { MOZ_COUNT_CTOR(CompositorOGL); + mTextures[0] = 0; + mTextures[1] = 0; + mTextures[2] = 0; sBackend = LAYERS_OPENGL; } From 2d2e3b0217fa9c81349ce86fbe809c6a08c26c26 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 4 Jun 2013 15:10:33 -0400 Subject: [PATCH 17/23] Backed out 4 changesets (bug 496923) for jsreftest failures on a CLOSED TREE. Backed out changeset 55796a799ea9 (bug 496923) Backed out changeset 05a46b5b3fec (bug 496923) Backed out changeset 0fde7e7ba61c (bug 496923) Backed out changeset 8dff0aaddd1c (bug 496923) --- js/src/tests/jstests.list | 23 - js/src/tests/supporting/sta.js | 901 ------------------ .../test262/ch10/10.1/10.1.1/10.1.1-1-s.js | 18 - .../test262/ch10/10.1/10.1.1/10.1.1-10-s.js | 18 - .../test262/ch10/10.1/10.1.1/10.1.1-11-s.js | 23 - .../test262/ch10/10.1/10.1.1/10.1.1-12-s.js | 17 - .../test262/ch10/10.1/10.1.1/10.1.1-13-s.js | 17 - .../test262/ch10/10.1/10.1.1/10.1.1-14-s.js | 22 - .../test262/ch10/10.1/10.1.1/10.1.1-15-s.js | 26 - .../test262/ch10/10.1/10.1.1/10.1.1-16-s.js | 24 - .../test262/ch10/10.1/10.1.1/10.1.1-17-s.js | 30 - .../test262/ch10/10.1/10.1.1/10.1.1-18-s.js | 31 - .../test262/ch10/10.1/10.1.1/10.1.1-19-s.js | 25 - .../test262/ch10/10.1/10.1.1/10.1.1-2-s.js | 23 - .../test262/ch10/10.1/10.1.1/10.1.1-20-s.js | 21 - .../test262/ch10/10.1/10.1.1/10.1.1-21-s.js | 21 - .../test262/ch10/10.1/10.1.1/10.1.1-22-s.js | 24 - .../test262/ch10/10.1/10.1.1/10.1.1-23-s.js | 20 - .../test262/ch10/10.1/10.1.1/10.1.1-24-s.js | 20 - .../test262/ch10/10.1/10.1.1/10.1.1-25-s.js | 29 - .../test262/ch10/10.1/10.1.1/10.1.1-26-s.js | 32 - .../test262/ch10/10.1/10.1.1/10.1.1-27-s.js | 24 - .../test262/ch10/10.1/10.1.1/10.1.1-28-s.js | 27 - .../test262/ch10/10.1/10.1.1/10.1.1-29-s.js | 19 - .../test262/ch10/10.1/10.1.1/10.1.1-2gs.js | 16 - .../test262/ch10/10.1/10.1.1/10.1.1-3-s.js | 19 - .../test262/ch10/10.1/10.1.1/10.1.1-30-s.js | 22 - .../test262/ch10/10.1/10.1.1/10.1.1-31-s.js | 18 - .../test262/ch10/10.1/10.1.1/10.1.1-32-s.js | 18 - .../test262/ch10/10.1/10.1.1/10.1.1-4-s.js | 18 - .../test262/ch10/10.1/10.1.1/10.1.1-5-s.js | 23 - .../test262/ch10/10.1/10.1.1/10.1.1-5gs.js | 16 - .../test262/ch10/10.1/10.1.1/10.1.1-6-s.js | 19 - .../test262/ch10/10.1/10.1.1/10.1.1-7-s.js | 18 - .../test262/ch10/10.1/10.1.1/10.1.1-8-s.js | 23 - .../test262/ch10/10.1/10.1.1/10.1.1-8gs.js | 17 - .../test262/ch10/10.1/10.1.1/10.1.1-9-s.js | 18 - .../tests/test262/ch10/10.1/10.1.1/browser.js | 0 .../tests/test262/ch10/10.1/10.1.1/shell.js | 0 .../tests/test262/ch10/10.1/S10.1.1_A1_T1.js | 18 - .../tests/test262/ch10/10.1/S10.1.1_A1_T2.js | 28 - .../tests/test262/ch10/10.1/S10.1.1_A1_T3.js | 16 - .../tests/test262/ch10/10.1/S10.1.1_A2_T1.js | 20 - .../tests/test262/ch10/10.1/S10.1.6_A1_T1.js | 20 - .../tests/test262/ch10/10.1/S10.1.6_A1_T2.js | 33 - .../tests/test262/ch10/10.1/S10.1.6_A1_T3.js | 20 - .../tests/test262/ch10/10.1/S10.1.7_A1_T1.js | 15 - js/src/tests/test262/ch10/10.1/browser.js | 0 js/src/tests/test262/ch10/10.1/shell.js | 0 .../10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js | 23 - .../10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js | 22 - .../10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js | 24 - .../10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js | 24 - .../10.2.1/10.2.1.1/10.2.1.1.3/browser.js | 0 .../10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js | 0 .../ch10/10.2/10.2.1/10.2.1.1/browser.js | 0 .../ch10/10.2/10.2.1/10.2.1.1/shell.js | 0 .../test262/ch10/10.2/10.2.1/S10.2.1_A1.js | 29 - .../test262/ch10/10.2/10.2.1/S10.2.1_A2.js | 37 - .../test262/ch10/10.2/10.2.1/S10.2.1_A3.js | 21 - .../test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js | 49 - .../test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js | 41 - .../ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js | 35 - .../ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js | 35 - .../ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js | 34 - .../tests/test262/ch10/10.2/10.2.1/browser.js | 0 .../tests/test262/ch10/10.2/10.2.1/shell.js | 0 .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js | 26 - .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js | 25 - .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js | 28 - .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js | 27 - .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js | 31 - .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js | 30 - .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js | 32 - .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js | 32 - .../test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js | 27 - .../tests/test262/ch10/10.2/10.2.2/browser.js | 0 .../tests/test262/ch10/10.2/10.2.2/shell.js | 0 .../ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js | 26 - .../ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js | 56 -- .../ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js | 87 -- .../ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js | 16 - .../ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js | 30 - .../ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js | 60 -- .../ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js | 90 -- .../ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js | 20 - .../ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js | 30 - .../ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js | 60 -- .../ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js | 90 -- .../ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js | 20 - .../ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js | 21 - .../ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js | 33 - .../ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js | 45 - .../ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js | 17 - .../ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js | 25 - .../ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js | 37 - .../ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js | 49 - .../ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js | 21 - .../ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js | 24 - .../ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js | 36 - .../ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js | 48 - .../ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js | 20 - .../tests/test262/ch10/10.2/10.2.3/browser.js | 0 .../tests/test262/ch10/10.2/10.2.3/shell.js | 0 js/src/tests/test262/ch10/10.2/browser.js | 0 js/src/tests/test262/ch10/10.2/shell.js | 0 .../test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js | 22 - .../test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js | 22 - .../tests/test262/ch10/10.4/10.4.1/browser.js | 0 .../tests/test262/ch10/10.4/10.4.1/shell.js | 0 .../test262/ch10/10.4/10.4.2/10.4.2-1-1.js | 26 - .../test262/ch10/10.4/10.4.2/10.4.2-1-2.js | 31 - .../test262/ch10/10.4/10.4.2/10.4.2-1-3.js | 34 - .../test262/ch10/10.4/10.4.2/10.4.2-1-4.js | 29 - .../test262/ch10/10.4/10.4.2/10.4.2-1-5.js | 27 - .../test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js | 20 - .../test262/ch10/10.4/10.4.2/10.4.2-2-s.js | 18 - .../ch10/10.4/10.4.2/10.4.2-3-c-1-s.js | 21 - .../ch10/10.4/10.4.2/10.4.2-3-c-2-s.js | 22 - .../test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js | 17 - .../test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js | 19 - .../test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js | 18 - .../test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js | 17 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js | 28 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js | 28 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js | 29 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js | 29 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js | 28 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js | 29 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js | 29 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js | 29 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js | 29 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js | 29 - .../ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js | 29 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js | 31 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js | 32 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js | 34 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js | 32 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js | 32 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js | 33 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js | 34 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js | 34 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js | 35 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js | 34 - .../ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js | 34 - .../tests/test262/ch10/10.4/10.4.2/browser.js | 0 .../tests/test262/ch10/10.4/10.4.2/shell.js | 0 .../test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js | 29 - .../test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js | 19 - .../ch10/10.4/10.4.3/10.4.3-1-100-s.js | 22 - .../ch10/10.4/10.4.3/10.4.3-1-100gs.js | 20 - .../ch10/10.4/10.4.3/10.4.3-1-101-s.js | 22 - .../ch10/10.4/10.4.3/10.4.3-1-101gs.js | 20 - .../ch10/10.4/10.4.3/10.4.3-1-102-s.js | 23 - .../ch10/10.4/10.4.3/10.4.3-1-102gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-103.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-104.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-105.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-106.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js | 14 - .../test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js | 29 - .../test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js | 27 - .../test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js | 29 - .../test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js | 22 - .../test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js | 32 - .../test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js | 21 - .../test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js | 20 - .../test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js | 18 - .../test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js | 19 - .../test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js | 17 - .../test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js | 16 - .../test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js | 15 - .../test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js | 18 - .../test262/ch10/10.4/10.4.3/S10.4.3_A1.js | 16 - .../tests/test262/ch10/10.4/10.4.3/browser.js | 0 .../tests/test262/ch10/10.4/10.4.3/shell.js | 0 .../tests/test262/ch10/10.4/S10.4A1.1_T2.js | 33 - .../tests/test262/ch10/10.4/S10.4_A1.1_T1.js | 31 - js/src/tests/test262/ch10/10.4/browser.js | 0 js/src/tests/test262/ch10/10.4/shell.js | 0 js/src/tests/test262/ch10/10.5/10.5-1-s.js | 24 - js/src/tests/test262/ch10/10.5/10.5-1gs.js | 20 - .../tests/test262/ch10/10.5/10.5-7-b-1-s.js | 23 - .../tests/test262/ch10/10.5/10.5-7-b-2-s.js | 23 - .../tests/test262/ch10/10.5/10.5-7-b-3-s.js | 23 - .../tests/test262/ch10/10.5/10.5-7-b-4-s.js | 24 - js/src/tests/test262/ch10/10.5/browser.js | 0 js/src/tests/test262/ch10/10.5/shell.js | 0 .../test262/ch10/10.6/10.6-10-c-ii-1-s.js | 22 - .../tests/test262/ch10/10.6/10.6-10-c-ii-1.js | 21 - .../test262/ch10/10.6/10.6-10-c-ii-2-s.js | 23 - .../tests/test262/ch10/10.6/10.6-10-c-ii-2.js | 22 - js/src/tests/test262/ch10/10.6/10.6-11-b-1.js | 54 -- js/src/tests/test262/ch10/10.6/10.6-12-1.js | 21 - js/src/tests/test262/ch10/10.6/10.6-12-2.js | 22 - js/src/tests/test262/ch10/10.6/10.6-13-1.js | 21 - js/src/tests/test262/ch10/10.6/10.6-13-a-1.js | 45 - js/src/tests/test262/ch10/10.6/10.6-13-a-2.js | 35 - js/src/tests/test262/ch10/10.6/10.6-13-a-3.js | 36 - .../tests/test262/ch10/10.6/10.6-13-b-1-s.js | 24 - .../tests/test262/ch10/10.6/10.6-13-b-2-s.js | 19 - .../tests/test262/ch10/10.6/10.6-13-b-3-s.js | 26 - .../tests/test262/ch10/10.6/10.6-13-c-1-s.js | 24 - .../tests/test262/ch10/10.6/10.6-13-c-2-s.js | 19 - .../tests/test262/ch10/10.6/10.6-13-c-3-s.js | 24 - js/src/tests/test262/ch10/10.6/10.6-14-1-s.js | 20 - .../tests/test262/ch10/10.6/10.6-14-b-1-s.js | 28 - .../tests/test262/ch10/10.6/10.6-14-b-4-s.js | 27 - .../tests/test262/ch10/10.6/10.6-14-c-1-s.js | 28 - .../tests/test262/ch10/10.6/10.6-14-c-4-s.js | 27 - js/src/tests/test262/ch10/10.6/10.6-1gs.js | 17 - js/src/tests/test262/ch10/10.6/10.6-2gs.js | 19 - js/src/tests/test262/ch10/10.6/10.6-5-1.js | 16 - js/src/tests/test262/ch10/10.6/10.6-6-1.js | 17 - js/src/tests/test262/ch10/10.6/10.6-6-2.js | 20 - js/src/tests/test262/ch10/10.6/10.6-6-3.js | 16 - js/src/tests/test262/ch10/10.6/10.6-6-4.js | 16 - js/src/tests/test262/ch10/10.6/10.6-7-1.js | 53 -- js/src/tests/test262/ch10/10.6/S10.6_A1.js | 35 - js/src/tests/test262/ch10/10.6/S10.6_A2.js | 36 - js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js | 35 - js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js | 49 - js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js | 40 - js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js | 42 - js/src/tests/test262/ch10/10.6/S10.6_A4.js | 38 - js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js | 35 - js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js | 49 - js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js | 39 - js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js | 41 - js/src/tests/test262/ch10/10.6/S10.6_A6.js | 67 -- js/src/tests/test262/ch10/10.6/S10.6_A7.js | 20 - js/src/tests/test262/ch10/10.6/browser.js | 0 js/src/tests/test262/ch10/10.6/shell.js | 0 js/src/tests/test262/ch10/browser.js | 0 js/src/tests/test262/ch10/shell.js | 0 js/src/tests/test262/shell.js | 901 ------------------ js/src/tests/update-test262.sh | 66 +- js/src/tests/update-test402.sh | 69 ++ 412 files changed, 89 insertions(+), 10555 deletions(-) delete mode 100644 js/src/tests/supporting/sta.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-10-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-11-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-12-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-13-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-14-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-15-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-16-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-18-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-19-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-20-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-21-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-22-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-23-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-24-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-25-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-26-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-27-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-28-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-29-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2gs.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-3-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-30-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-31-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-32-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-4-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5gs.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-6-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-7-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8gs.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-9-s.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/browser.js delete mode 100644 js/src/tests/test262/ch10/10.1/10.1.1/shell.js delete mode 100644 js/src/tests/test262/ch10/10.1/S10.1.1_A1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.1/S10.1.1_A1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.1/S10.1.1_A1_T3.js delete mode 100644 js/src/tests/test262/ch10/10.1/S10.1.1_A2_T1.js delete mode 100644 js/src/tests/test262/ch10/10.1/S10.1.6_A1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.1/S10.1.6_A1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.1/S10.1.6_A1_T3.js delete mode 100644 js/src/tests/test262/ch10/10.1/S10.1.7_A1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.1/browser.js delete mode 100644 js/src/tests/test262/ch10/10.1/shell.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A3.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/browser.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.1/shell.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/browser.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.2/shell.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/browser.js delete mode 100644 js/src/tests/test262/ch10/10.2/10.2.3/shell.js delete mode 100644 js/src/tests/test262/ch10/10.2/browser.js delete mode 100644 js/src/tests/test262/ch10/10.2/shell.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.1/browser.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.1/shell.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/browser.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.2/shell.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/browser.js delete mode 100644 js/src/tests/test262/ch10/10.4/10.4.3/shell.js delete mode 100644 js/src/tests/test262/ch10/10.4/S10.4A1.1_T2.js delete mode 100644 js/src/tests/test262/ch10/10.4/S10.4_A1.1_T1.js delete mode 100644 js/src/tests/test262/ch10/10.4/browser.js delete mode 100644 js/src/tests/test262/ch10/10.4/shell.js delete mode 100644 js/src/tests/test262/ch10/10.5/10.5-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.5/10.5-1gs.js delete mode 100644 js/src/tests/test262/ch10/10.5/10.5-7-b-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.5/10.5-7-b-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.5/10.5-7-b-3-s.js delete mode 100644 js/src/tests/test262/ch10/10.5/10.5-7-b-4-s.js delete mode 100644 js/src/tests/test262/ch10/10.5/browser.js delete mode 100644 js/src/tests/test262/ch10/10.5/shell.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-11-b-1.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-12-1.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-12-2.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-1.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-a-1.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-a-2.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-a-3.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-b-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-b-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-b-3-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-c-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-c-2-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-13-c-3-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-b-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-b-4-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-c-1-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-14-c-4-s.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-1gs.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-2gs.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-5-1.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-6-1.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-6-2.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-6-3.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-6-4.js delete mode 100644 js/src/tests/test262/ch10/10.6/10.6-7-1.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A1.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A2.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A4.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A6.js delete mode 100644 js/src/tests/test262/ch10/10.6/S10.6_A7.js delete mode 100644 js/src/tests/test262/ch10/10.6/browser.js delete mode 100644 js/src/tests/test262/ch10/10.6/shell.js delete mode 100644 js/src/tests/test262/ch10/browser.js delete mode 100644 js/src/tests/test262/ch10/shell.js create mode 100644 js/src/tests/update-test402.sh diff --git a/js/src/tests/jstests.list b/js/src/tests/jstests.list index a858d000bf1..c673c67023f 100644 --- a/js/src/tests/jstests.list +++ b/js/src/tests/jstests.list @@ -3,32 +3,9 @@ skip-if(!this.hasOwnProperty("Intl")) include test262/intl402/jstests.list # Intl is not enabled in all builds -################################################## -# Test262 tests skipped due to SpiderMonkey bugs # -################################################## - -skip script test262/ch10/10.4/10.4.3/10.4.3-1-104.js # bug 603201 -skip script test262/ch10/10.4/10.4.3/10.4.3-1-106.js # bug 603201 - skip script test262/intl402/ch10/10.1/10.1.1_a.js # bug 854320 skip script test262/intl402/ch10/10.1/10.1.1_13.js # bug 853704 skip script test262/intl402/ch10/10.1/10.1.1_19_c.js # bug 853704 skip script test262/intl402/ch11/11.1/11.1.1_a.js # bug 854320 skip script test262/intl402/ch11/11.3/11.3.2_TRP.js # bug 853706 skip script test262/intl402/ch12/12.1/12.1.1_a.js # bug 854320 - -####################################################################### -# Tests disabled due to jstest limitations wrt imported test262 tests # -####################################################################### - -# These tests are disabled because jstest doesn't understand @negative (without -# a pattern) yet. - -# These tests are disabled because jstest doesn't understand @negative with a -# pattern yet. -skip script test262/ch10/10.1/10.1.1/10.1.1-2gs.js -skip script test262/ch10/10.1/10.1.1/10.1.1-5gs.js -skip script test262/ch10/10.1/10.1.1/10.1.1-8gs.js -skip script test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js -skip script test262/ch10/10.5/10.5-1gs.js -skip script test262/ch10/10.6/10.6-2gs.js diff --git a/js/src/tests/supporting/sta.js b/js/src/tests/supporting/sta.js deleted file mode 100644 index 5380639e004..00000000000 --- a/js/src/tests/supporting/sta.js +++ /dev/null @@ -1,901 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -//----------------------------------------------------------------------------- -function compareArray(aExpected, aActual) { - if (aActual.length != aExpected.length) { - return false; - } - - aExpected.sort(); - aActual.sort(); - - var s; - for (var i = 0; i < aExpected.length; i++) { - if (aActual[i] !== aExpected[i]) { - return false; - } - } - return true; -} - -//----------------------------------------------------------------------------- -function arrayContains(arr, expected) { - var found; - for (var i = 0; i < expected.length; i++) { - found = false; - for (var j = 0; j < arr.length; j++) { - if (expected[i] === arr[j]) { - found = true; - break; - } - } - if (!found) { - return false; - } - } - return true; -} - -//----------------------------------------------------------------------------- -var supportsArrayIndexGettersOnArrays = undefined; -function fnSupportsArrayIndexGettersOnArrays() { - if (typeof supportsArrayIndexGettersOnArrays !== "undefined") { - return supportsArrayIndexGettersOnArrays; - } - - supportsArrayIndexGettersOnArrays = false; - - if (fnExists(Object.defineProperty)) { - var arr = []; - Object.defineProperty(arr, "0", { - get: function() { - supportsArrayIndexGettersOnArrays = true; - return 0; - } - }); - var res = arr[0]; - } - - return supportsArrayIndexGettersOnArrays; -} - -//----------------------------------------------------------------------------- -var supportsArrayIndexGettersOnObjects = undefined; -function fnSupportsArrayIndexGettersOnObjects() { - if (typeof supportsArrayIndexGettersOnObjects !== "undefined") - return supportsArrayIndexGettersOnObjects; - - supportsArrayIndexGettersOnObjects = false; - - if (fnExists(Object.defineProperty)) { - var obj = {}; - Object.defineProperty(obj, "0", { - get: function() { - supportsArrayIndexGettersOnObjects = true; - return 0; - } - }); - var res = obj[0]; - } - - return supportsArrayIndexGettersOnObjects; -} - -//----------------------------------------------------------------------------- -function ConvertToFileUrl(pathStr) { - return "file:" + pathStr.replace(/\\/g, "/"); -} - -//----------------------------------------------------------------------------- -function fnExists(/*arguments*/) { - for (var i = 0; i < arguments.length; i++) { - if (typeof (arguments[i]) !== "function") return false; - } - return true; -} - -//----------------------------------------------------------------------------- -var __globalObject = Function("return this;")(); -function fnGlobalObject() { - return __globalObject; -} - -//----------------------------------------------------------------------------- -function fnSupportsStrict() { - "use strict"; - try { - eval('with ({}) {}'); - return false; - } catch (e) { - return true; - } -} - -//----------------------------------------------------------------------------- -//Verify all attributes specified data property of given object: -//value, writable, enumerable, configurable -//If all attribute values are expected, return true, otherwise, return false -function dataPropertyAttributesAreCorrect(obj, - name, - value, - writable, - enumerable, - configurable) { - var attributesCorrect = true; - - if (obj[name] !== value) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof value === "number" && - isNaN(value)) { - // keep empty - } else { - attributesCorrect = false; - } - } - - try { - if (obj[name] === "oldValue") { - obj[name] = "newValue"; - } else { - obj[name] = "OldValue"; - } - } catch (we) { - } - - var overwrited = false; - if (obj[name] !== value) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof value === "number" && - isNaN(value)) { - // keep empty - } else { - overwrited = true; - } - } - if (overwrited !== writable) { - attributesCorrect = false; - } - - var enumerated = false; - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && prop === name) { - enumerated = true; - } - } - - if (enumerated !== enumerable) { - attributesCorrect = false; - } - - - var deleted = false; - - try { - delete obj[name]; - } catch (de) { - } - if (!obj.hasOwnProperty(name)) { - deleted = true; - } - if (deleted !== configurable) { - attributesCorrect = false; - } - - return attributesCorrect; -} - -//----------------------------------------------------------------------------- -//Verify all attributes specified accessor property of given object: -//get, set, enumerable, configurable -//If all attribute values are expected, return true, otherwise, return false -function accessorPropertyAttributesAreCorrect(obj, - name, - get, - set, - setVerifyHelpProp, - enumerable, - configurable) { - var attributesCorrect = true; - - if (get !== undefined) { - if (obj[name] !== get()) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof get() === "number" && - isNaN(get())) { - // keep empty - } else { - attributesCorrect = false; - } - } - } else { - if (obj[name] !== undefined) { - attributesCorrect = false; - } - } - - try { - var desc = Object.getOwnPropertyDescriptor(obj, name); - if (typeof desc.set === "undefined") { - if (typeof set !== "undefined") { - attributesCorrect = false; - } - } else { - obj[name] = "toBeSetValue"; - if (obj[setVerifyHelpProp] !== "toBeSetValue") { - attributesCorrect = false; - } - } - } catch (se) { - throw se; - } - - - var enumerated = false; - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && prop === name) { - enumerated = true; - } - } - - if (enumerated !== enumerable) { - attributesCorrect = false; - } - - - var deleted = false; - try { - delete obj[name]; - } catch (de) { - throw de; - } - if (!obj.hasOwnProperty(name)) { - deleted = true; - } - if (deleted !== configurable) { - attributesCorrect = false; - } - - return attributesCorrect; -} - -//----------------------------------------------------------------------------- -var NotEarlyErrorString = "NotEarlyError"; -var EarlyErrorRePat = "^((?!" + NotEarlyErrorString + ").)*$"; -var NotEarlyError = new Error(NotEarlyErrorString); - -//----------------------------------------------------------------------------- -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function Test262Error(message) { - if (message) this.message = message; -} - -Test262Error.prototype.toString = function () { - return "Test262 Error: " + this.message; -}; - -function testFailed(message) { - throw new Test262Error(message); -} - - -function testPrint(message) { - -} - - -//adaptors for Test262 framework -function $PRINT(message) { - -} - -function $INCLUDE(message) { } -function $ERROR(message) { - testFailed(message); -} - -function $FAIL(message) { - testFailed(message); -} - - - -//Sputnik library definitions -//Ultimately these should be namespaced some how and only made -//available to tests that explicitly include them. -//For now, we just define the globally - -//math_precision.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function getPrecision(num) { - //TODO: Create a table of prec's, - // because using Math for testing Math isn't that correct. - - var log2num = Math.log(Math.abs(num)) / Math.LN2; - var pernum = Math.ceil(log2num); - return (2 * Math.pow(2, -52 + pernum)); - //return(0); -} - - -//math_isequal.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -var prec; -function isEqual(num1, num2) { - if ((num1 === Infinity) && (num2 === Infinity)) { - return (true); - } - if ((num1 === -Infinity) && (num2 === -Infinity)) { - return (true); - } - prec = getPrecision(Math.min(Math.abs(num1), Math.abs(num2))); - return (Math.abs(num1 - num2) <= prec); - //return(num1 === num2); -} - -//numeric_conversion.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function ToInteger(p) { - var x = Number(p); - - if (isNaN(x)) { - return +0; - } - - if ((x === +0) - || (x === -0) - || (x === Number.POSITIVE_INFINITY) - || (x === Number.NEGATIVE_INFINITY)) { - return x; - } - - var sign = (x < 0) ? -1 : 1; - - return (sign * Math.floor(Math.abs(x))); -} - -//Date_constants.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -var HoursPerDay = 24; -var MinutesPerHour = 60; -var SecondsPerMinute = 60; - -var msPerDay = 86400000; -var msPerSecond = 1000; -var msPerMinute = 60000; -var msPerHour = 3600000; - -var date_1899_end = -2208988800001; -var date_1900_start = -2208988800000; -var date_1969_end = -1; -var date_1970_start = 0; -var date_1999_end = 946684799999; -var date_2000_start = 946684800000; -var date_2099_end = 4102444799999; -var date_2100_start = 4102444800000; - -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -//the following values are normally generated by the sputnik.py driver -var $LocalTZ, - $DST_start_month, - $DST_start_sunday, - $DST_start_hour, - $DST_start_minutes, - $DST_end_month, - $DST_end_sunday, - $DST_end_hour, - $DST_end_minutes; - -(function () { - /** - * Finds the first date, starting from |start|, where |predicate| - * holds. - */ - var findNearestDateBefore = function(start, predicate) { - var current = start; - var month = 1000 * 60 * 60 * 24 * 30; - for (var step = month; step > 0; step = Math.floor(step / 3)) { - if (!predicate(current)) { - while (!predicate(current)) - current = new Date(current.getTime() + step); - current = new Date(current.getTime() - step); - } - } - while (!predicate(current)) { - current = new Date(current.getTime() + 1); - } - return current; - }; - - var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0); - var decemberDate = new Date(2000, 11, 20, 0, 0, 0, 0); - var juneOffset = juneDate.getTimezoneOffset(); - var decemberOffset = decemberDate.getTimezoneOffset(); - var isSouthernHemisphere = (juneOffset > decemberOffset); - var winterTime = isSouthernHemisphere ? juneDate : decemberDate; - var summerTime = isSouthernHemisphere ? decemberDate : juneDate; - - var dstStart = findNearestDateBefore(winterTime, function (date) { - return date.getTimezoneOffset() == summerTime.getTimezoneOffset(); - }); - $DST_start_month = dstStart.getMonth(); - $DST_start_sunday = dstStart.getDate() > 15 ? '"last"' : '"first"'; - $DST_start_hour = dstStart.getHours(); - $DST_start_minutes = dstStart.getMinutes(); - - var dstEnd = findNearestDateBefore(summerTime, function (date) { - return date.getTimezoneOffset() == winterTime.getTimezoneOffset(); - }); - $DST_end_month = dstEnd.getMonth(); - $DST_end_sunday = dstEnd.getDate() > 15 ? '"last"' : '"first"'; - $DST_end_hour = dstEnd.getHours(); - $DST_end_minutes = dstEnd.getMinutes(); - - return; -})(); - - -//Date.library.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -//15.9.1.2 Day Number and Time within Day -function Day(t) { - return Math.floor(t/msPerDay); -} - -function TimeWithinDay(t) { - return t%msPerDay; -} - -//15.9.1.3 Year Number -function DaysInYear(y){ - if(y%4 != 0) return 365; - if(y%4 == 0 && y%100 != 0) return 366; - if(y%100 == 0 && y%400 != 0) return 365; - if(y%400 == 0) return 366; -} - -function DayFromYear(y) { - return (365*(y-1970) - + Math.floor((y-1969)/4) - - Math.floor((y-1901)/100) - + Math.floor((y-1601)/400)); -} - -function TimeFromYear(y){ - return msPerDay*DayFromYear(y); -} - -function YearFromTime(t) { - t = Number(t); - var sign = ( t < 0 ) ? -1 : 1; - var year = ( sign < 0 ) ? 1969 : 1970; - - for(var time = 0;;year += sign){ - time = TimeFromYear(year); - - if(sign > 0 && time > t){ - year -= sign; - break; - } - else if(sign < 0 && time <= t){ - break; - } - }; - return year; -} - -function InLeapYear(t){ - if(DaysInYear(YearFromTime(t)) == 365) - return 0; - - if(DaysInYear(YearFromTime(t)) == 366) - return 1; -} - -function DayWithinYear(t) { - return Day(t)-DayFromYear(YearFromTime(t)); -} - -//15.9.1.4 Month Number -function MonthFromTime(t){ - var day = DayWithinYear(t); - var leap = InLeapYear(t); - - if((0 <= day) && (day < 31)) return 0; - if((31 <= day) && (day < (59+leap))) return 1; - if(((59+leap) <= day) && (day < (90+leap))) return 2; - if(((90+leap) <= day) && (day < (120+leap))) return 3; - if(((120+leap) <= day) && (day < (151+leap))) return 4; - if(((151+leap) <= day) && (day < (181+leap))) return 5; - if(((181+leap) <= day) && (day < (212+leap))) return 6; - if(((212+leap) <= day) && (day < (243+leap))) return 7; - if(((243+leap) <= day) && (day < (273+leap))) return 8; - if(((273+leap) <= day) && (day < (304+leap))) return 9; - if(((304+leap) <= day) && (day < (334+leap))) return 10; - if(((334+leap) <= day) && (day < (365+leap))) return 11; -} - -//15.9.1.5 Date Number -function DateFromTime(t) { - var day = DayWithinYear(t); - var month = MonthFromTime(t); - var leap = InLeapYear(t); - - if(month == 0) return day+1; - if(month == 1) return day-30; - if(month == 2) return day-58-leap; - if(month == 3) return day-89-leap; - if(month == 4) return day-119-leap; - if(month == 5) return day-150-leap; - if(month == 6) return day-180-leap; - if(month == 7) return day-211-leap; - if(month == 8) return day-242-leap; - if(month == 9) return day-272-leap; - if(month == 10) return day-303-leap; - if(month == 11) return day-333-leap; -} - -//15.9.1.6 Week Day -function WeekDay(t) { - var weekday = (Day(t)+4)%7; - return (weekday < 0 ? 7+weekday : weekday); -} - -//15.9.1.9 Daylight Saving Time Adjustment -$LocalTZ = (new Date()).getTimezoneOffset() / -60; -if (DaylightSavingTA((new Date()).valueOf()) !== 0) { - $LocalTZ -= 1; -} -var LocalTZA = $LocalTZ*msPerHour; - -function DaysInMonth(m, leap) { - m = m%12; - - //April, June, Sept, Nov - if(m == 3 || m == 5 || m == 8 || m == 10 ) { - return 30; - } - - //Jan, March, May, July, Aug, Oct, Dec - if(m == 0 || m == 2 || m == 4 || m == 6 || m == 7 || m == 9 || m == 11){ - return 31; - } - - //Feb - return 28+leap; -} - -function GetSundayInMonth(t, m, count){ - var year = YearFromTime(t); - var tempDate; - - if (count==='"first"') { - for (var d=1; d <= DaysInMonth(m, InLeapYear(t)); d++) { - tempDate = new Date(year, m, d); - if (tempDate.getDay()===0) { - return tempDate.valueOf(); - } - } - } else if(count==='"last"') { - for (var d=DaysInMonth(m, InLeapYear(t)); d>0; d--) { - tempDate = new Date(year, m, d); - if (tempDate.getDay()===0) { - return tempDate.valueOf(); - } - } - } - throw new Error("Unsupported 'count' arg:" + count); -} -/* -function GetSundayInMonth(t, m, count){ - var year = YearFromTime(t); - var leap = InLeapYear(t); - var day = 0; - - if(m >= 1) day += DaysInMonth(0, leap); - if(m >= 2) day += DaysInMonth(1, leap); - if(m >= 3) day += DaysInMonth(2, leap); - if(m >= 4) day += DaysInMonth(3, leap); - if(m >= 5) day += DaysInMonth(4, leap); - if(m >= 6) day += DaysInMonth(5, leap); - if(m >= 7) day += DaysInMonth(6, leap); - if(m >= 8) day += DaysInMonth(7, leap); - if(m >= 9) day += DaysInMonth(8, leap); - if(m >= 10) day += DaysInMonth(9, leap); - if(m >= 11) day += DaysInMonth(10, leap); - - var month_start = TimeFromYear(year)+day*msPerDay; - var sunday = 0; - - if(count === "last"){ - for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay; - WeekDay(last_sunday)>0; - last_sunday -= msPerDay - ){}; - sunday = last_sunday; - } - else { - for(var first_sunday = month_start; - WeekDay(first_sunday)>0; - first_sunday += msPerDay - ){}; - sunday = first_sunday+7*msPerDay*(count-1); - } - - return sunday; -}*/ - -function DaylightSavingTA(t) { -// t = t-LocalTZA; - - var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) + - $DST_start_hour*msPerHour + - $DST_start_minutes*msPerMinute; - - var k = new Date(DST_start); - - var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) + - $DST_end_hour*msPerHour + - $DST_end_minutes*msPerMinute; - - if ( t >= DST_start && t < DST_end ) { - return msPerHour; - } else { - return 0; - } -} - -//15.9.1.9 Local Time -function LocalTime(t){ - return t+LocalTZA+DaylightSavingTA(t); -} - -function UTC(t) { - return t-LocalTZA-DaylightSavingTA(t-LocalTZA); -} - -//15.9.1.10 Hours, Minutes, Second, and Milliseconds -function HourFromTime(t){ - return Math.floor(t/msPerHour)%HoursPerDay; -} - -function MinFromTime(t){ - return Math.floor(t/msPerMinute)%MinutesPerHour; -} - -function SecFromTime(t){ - return Math.floor(t/msPerSecond)%SecondsPerMinute; -} - -function msFromTime(t){ - return t%msPerSecond; -} - -//15.9.1.11 MakeTime (hour, min, sec, ms) -function MakeTime(hour, min, sec, ms){ - if ( !isFinite(hour) || !isFinite(min) || !isFinite(sec) || !isFinite(ms)) { - return Number.NaN; - } - - hour = ToInteger(hour); - min = ToInteger(min); - sec = ToInteger(sec); - ms = ToInteger(ms); - - return ((hour*msPerHour) + (min*msPerMinute) + (sec*msPerSecond) + ms); -} - -//15.9.1.12 MakeDay (year, month, date) -function MakeDay(year, month, date) { - if ( !isFinite(year) || !isFinite(month) || !isFinite(date)) { - return Number.NaN; - } - - year = ToInteger(year); - month = ToInteger(month); - date = ToInteger(date ); - - var result5 = year + Math.floor(month/12); - var result6 = month%12; - - var sign = ( year < 1970 ) ? -1 : 1; - var t = ( year < 1970 ) ? 1 : 0; - var y = ( year < 1970 ) ? 1969 : 1970; - - if( sign == -1 ){ - for ( y = 1969; y >= year; y += sign ) { - t += sign * DaysInYear(y)*msPerDay; - } - } else { - for ( y = 1970 ; y < year; y += sign ) { - t += sign * DaysInYear(y)*msPerDay; - } - } - - var leap = 0; - for ( var m = 0; m < month; m++ ) { - //if year is changed, than we need to recalculate leep - leap = InLeapYear(t); - t += DaysInMonth(m, leap)*msPerDay; - } - - if ( YearFromTime(t) != result5 ) { - return Number.NaN; - } - if ( MonthFromTime(t) != result6 ) { - return Number.NaN; - } - if ( DateFromTime(t) != 1 ) { - return Number.NaN; - } - - return Day(t)+date-1; -} - -//15.9.1.13 MakeDate (day, time) -function MakeDate( day, time ) { - if(!isFinite(day) || !isFinite(time)) { - return Number.NaN; - } - - return day*msPerDay+time; -} - -//15.9.1.14 TimeClip (time) -function TimeClip(time) { - if(!isFinite(time) || Math.abs(time) > 8.64e15){ - return Number.NaN; - } - - return ToInteger(time); -} - -//Test Functions -//ConstructDate is considered deprecated, and should not be used directly from -//test262 tests as it's incredibly sensitive to DST start/end dates that -//vary with geographic location. -function ConstructDate(year, month, date, hours, minutes, seconds, ms){ - /* - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date); else use 1 - * 4. If hours is supplied use ToNumber(hours); else use 0 - * 5. If minutes is supplied use ToNumber(minutes); else use 0 - * 6. If seconds is supplied use ToNumber(seconds); else use 0 - * 7. If ms is supplied use ToNumber(ms); else use 0 - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to TimeClip(UTC(Result(11))) - */ - var r1 = Number(year); - var r2 = Number(month); - var r3 = ((date && arguments.length > 2) ? Number(date) : 1); - var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0); - var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0); - var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0); - var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0); - - var r8 = r1; - - if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99)) - r8 = 1900+r1; - - var r9 = MakeDay(r8, r2, r3); - var r10 = MakeTime(r4, r5, r6, r7); - var r11 = MakeDate(r9, r10); - - var retVal = TimeClip(UTC(r11)); - return retVal; -} - - - -/**** Python code for initialize the above constants -// We may want to replicate the following in JavaScript. -// However, using JS date operations to generate parameters that are then used to -// test those some date operations seems unsound. However, it isn't clear if there -//is a good interoperable alternative. - -# Copyright 2009 the Sputnik authors. All rights reserved. -# This code is governed by the BSD license found in the LICENSE file. - -def GetDaylightSavingsTimes(): -# Is the given floating-point time in DST? -def IsDst(t): -return time.localtime(t)[-1] -# Binary search to find an interval between the two times no greater than -# delta where DST switches, returning the midpoint. -def FindBetween(start, end, delta): -while end - start > delta: -middle = (end + start) / 2 -if IsDst(middle) == IsDst(start): -start = middle -else: -end = middle -return (start + end) / 2 -now = time.time() -one_month = (30 * 24 * 60 * 60) -# First find a date with different daylight savings. To avoid corner cases -# we try four months before and after today. -after = now + 4 * one_month -before = now - 4 * one_month -if IsDst(now) == IsDst(before) and IsDst(now) == IsDst(after): -logger.warning("Was unable to determine DST info.") -return None -# Determine when the change occurs between now and the date we just found -# in a different DST. -if IsDst(now) != IsDst(before): -first = FindBetween(before, now, 1) -else: -first = FindBetween(now, after, 1) -# Determine when the change occurs between three and nine months from the -# first. -second = FindBetween(first + 3 * one_month, first + 9 * one_month, 1) -# Find out which switch is into and which if out of DST -if IsDst(first - 1) and not IsDst(first + 1): -start = second -end = first -else: -start = first -end = second -return (start, end) - - -def GetDaylightSavingsAttribs(): -times = GetDaylightSavingsTimes() -if not times: -return None -(start, end) = times -def DstMonth(t): -return time.localtime(t)[1] - 1 -def DstHour(t): -return time.localtime(t - 1)[3] + 1 -def DstSunday(t): -if time.localtime(t)[2] > 15: -return "'last'" -else: -return "'first'" -def DstMinutes(t): -return (time.localtime(t - 1)[4] + 1) % 60 -attribs = { } -attribs['start_month'] = DstMonth(start) -attribs['end_month'] = DstMonth(end) -attribs['start_sunday'] = DstSunday(start) -attribs['end_sunday'] = DstSunday(end) -attribs['start_hour'] = DstHour(start) -attribs['end_hour'] = DstHour(end) -attribs['start_minutes'] = DstMinutes(start) -attribs['end_minutes'] = DstMinutes(end) -return attribs - -*********/ - -//--Test case registration----------------------------------------------------- -function runTestCase(testcase) { - if (testcase() !== true) { - $ERROR("Test case returned non-true value!"); - } -} diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-1-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-1-s.js deleted file mode 100644 index a9cf025bc8e..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-1-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-1-s.js - * @description Strict Mode - Use Strict Directive Prologue is 'use strict'; which contains two space between 'use' and 'strict' - * @noStrict - */ - - -function testcase() { - "use strict"; - var public = 1; - return public === 1; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-10-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-10-s.js deleted file mode 100644 index 51aa8ca7332..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-10-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-10-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''USE STRICT';' in which all characters are uppercase - * @noStrict - */ - - -function testcase() { - "USE STRICT"; - var public = 1; - return public === 1; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-11-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-11-s.js deleted file mode 100644 index 6d7794d9717..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-11-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-11-s.js - * @description Strict Mode - Eval code is strict code with a Use Strict Directive at the beginning of the block - * @noStrict - */ - - -function testcase() { - try { - eval("'use strict'; var public = 1; var anotherVariableNotReserveWord = 2;"); - - return false; - } catch (e) { - return e instanceof SyntaxError && typeof public === "undefined" && - typeof anotherVariableNotReserveWord === "undefined"; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-12-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-12-s.js deleted file mode 100644 index 09fdffe8420..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-12-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-12-s.js - * @description Strict Mode - Eval code is strict eval code with a Use Strict Directive in the middle of the block - * @noStrict - */ - - -function testcase() { - eval("var public = 1; 'use strict'; var anotherVariableNotReserveWord = 2;"); - return public === 1 && anotherVariableNotReserveWord === 2; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-13-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-13-s.js deleted file mode 100644 index 0a4ba30ffba..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-13-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-13-s.js - * @description Strict Mode - Eval code is strict eval code with a Use Strict Directive at the end of the block - * @noStrict - */ - - -function testcase() { - eval("var public = 1; var anotherVariableNotReserveWord = 2; 'use strict';"); - return public === 1 && anotherVariableNotReserveWord === 2; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-14-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-14-s.js deleted file mode 100644 index dff41336640..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-14-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-14-s.js - * @description Strict Mode - The call to eval function is contained in a Strict Mode block - * @noStrict - */ - - -function testcase() { - 'use strict'; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return true; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-15-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-15-s.js deleted file mode 100644 index b7f7664f543..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-15-s.js +++ /dev/null @@ -1,26 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-15-s.js - * @description Strict Mode - Function code that is part of a FunctionDeclaration is strict function code if FunctionDeclaration is contained in use strict - * @noStrict - */ - - -function testcase() { - "use strict"; - function fun() { - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } - - return fun(); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-16-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-16-s.js deleted file mode 100644 index 35ef8803fbb..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-16-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-16-s.js - * @description Strict Mode - Function code that is part of a FunctionExpression is strict function code if FunctionExpression is contained in use strict - * @noStrict - */ - - -function testcase() { - "use strict"; - return function () { - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } (); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js deleted file mode 100644 index 976e644fe11..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-17-s.js +++ /dev/null @@ -1,30 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-17-s.js - * @description Strict Mode - Function code that is part of a Accessor PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(getter) - * @noStrict - */ - - -function testcase() { - "use strict"; - try { - var obj = {}; - Object.defineProperty(obj, "accProperty", { - get: function () { - eval("public = 1;"); - return 11; - } - }); - - var temp = obj.accProperty === 11; - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-18-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-18-s.js deleted file mode 100644 index b384ebfe515..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-18-s.js +++ /dev/null @@ -1,31 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-18-s.js - * @description Strict Mode - Function code that is part of a Accessor PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(setter) - * @noStrict - */ - - -function testcase() { - "use strict"; - try { - var obj = {}; - var data = "data"; - Object.defineProperty(obj, "accProperty", { - set: function (value) { - eval("var public = 1;"); - data = value; - } - }); - - obj.accProperty = "overrideData"; - return false; - } catch (e) { - return e instanceof SyntaxError && data === "data"; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-19-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-19-s.js deleted file mode 100644 index 6643ec7f16f..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-19-s.js +++ /dev/null @@ -1,25 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-19-s.js - * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the start of the block - * @noStrict - */ - - -function testcase() { - function fun() { - "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } - return fun(); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2-s.js deleted file mode 100644 index 42e6bce785c..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-2-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';' - * @noStrict - */ - - -function testcase() { - "use strict" - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-20-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-20-s.js deleted file mode 100644 index cc30e88e6cf..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-20-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-20-s.js - * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears in the middle of the block - * @noStrict - */ - - -function testcase() { - function fun() { - eval("var public = 1;"); - "use strict"; - return public === 1; - } - return fun(); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-21-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-21-s.js deleted file mode 100644 index 6c0245461ee..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-21-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-21-s.js - * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the end of the block - * @noStrict - */ - - -function testcase() { - function fun() { - eval("var public = 1;"); - return public === 1; - "use strict"; - } - return fun(); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-22-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-22-s.js deleted file mode 100644 index 875ad9780c9..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-22-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-22-s.js - * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the start of the block - * @noStrict - */ - - -function testcase() { - return function () { - "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } (); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-23-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-23-s.js deleted file mode 100644 index 680e928cd7c..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-23-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-23-s.js - * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears in the middle of the block - * @noStrict - */ - - -function testcase() { - return function () { - eval("var public = 1;"); - return public === 1; - "use strict"; - } (); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-24-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-24-s.js deleted file mode 100644 index ef67dbe592a..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-24-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-24-s.js - * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the end of the block - * @noStrict - */ - - -function testcase() { - return function () { - eval("var public = 1;"); - "use strict"; - return public === 1; - } (); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-25-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-25-s.js deleted file mode 100644 index 206518f72b2..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-25-s.js +++ /dev/null @@ -1,29 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-25-s.js - * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the start of the block(getter) - * @noStrict - */ - - -function testcase() { - try { - var obj = {}; - Object.defineProperty(obj, "accProperty", { - get: function () { - "use strict"; - eval("var public = 1;"); - return 11; - } - }); - var temp = obj.accProperty === 11; - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-26-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-26-s.js deleted file mode 100644 index 9da18136bbd..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-26-s.js +++ /dev/null @@ -1,32 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-26-s.js - * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the start of the block(setter) - * @noStrict - */ - - -function testcase() { - try { - var obj = {}; - var data = "data"; - Object.defineProperty(obj, "accProperty", { - set: function (value) { - "use strict"; - eval("var public = 1;"); - data = value; - } - }); - - obj.accProperty = "overrideData"; - - return false; - } catch (e) { - return e instanceof SyntaxError && data === "data"; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-27-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-27-s.js deleted file mode 100644 index 94b01f5af87..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-27-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-27-s.js - * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears in the middle of the block(getter) - * @noStrict - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "accProperty", { - get: function () { - eval("public = 1;"); - "use strict"; - return 11; - } - }); - return obj.accProperty === 11 && public === 1; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-28-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-28-s.js deleted file mode 100644 index f3ebe7d11e1..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-28-s.js +++ /dev/null @@ -1,27 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-28-s.js - * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the end of the block(setter) - * @noStrict - */ - - -function testcase() { - var obj = {}; - var data; - - Object.defineProperty(obj, "accProperty", { - set: function (value) { - var _10_1_1_28_s = {a:1, a:2}; - data = value; - "use strict"; - } - }); - obj.accProperty = "overrideData"; - return data==="overrideData"; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-29-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-29-s.js deleted file mode 100644 index 9745777b181..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-29-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-29-s.js - * @description Strict Mode - The built-in Function constructor is contained in use strict code - * @noStrict - */ - - -function testcase() { - "use strict"; - var funObj = new Function("a", "eval('public = 1;');"); - funObj(); - return true; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2gs.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2gs.js deleted file mode 100644 index dd30cb215fb..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-2gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.1/10.1.1/10.1.1-2gs.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';' - * @noStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict" -throw NotEarlyError; -var public = 1; diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-3-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-3-s.js deleted file mode 100644 index 8c4e4fb5d4c..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-3-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-3-s.js - * @description Strict Mode - Use Strict Directive Prologue is '' use strict';' which the first character is space - * @noStrict - */ - - -function testcase() { - " use strict"; - var public = 1; - - return public === 1; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-30-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-30-s.js deleted file mode 100644 index 79c68e7c23c..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-30-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-30-s.js - * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the start of the block - * @noStrict - */ - - -function testcase() { - try { - var funObj = new Function("a", "'use strict'; eval('public = 1;');"); - funObj(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-31-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-31-s.js deleted file mode 100644 index 21c84976bcc..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-31-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-31-s.js - * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears in the middle of the block - * @noStrict - */ - - -function testcase() { - var funObj = new Function("a", "eval('public = 1;'); 'use strict'; anotherVariable = 2;"); - funObj(); - return public === 1 && anotherVariable === 2; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-32-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-32-s.js deleted file mode 100644 index a7cbc1d8c2e..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-32-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-32-s.js - * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the end of the block - * @noStrict - */ - - -function testcase() { - var funObj = new Function("a", "eval('public = 1;'); anotherVariable = 2; 'use strict';"); - funObj(); - return public === 1 && anotherVariable === 2; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-4-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-4-s.js deleted file mode 100644 index 3d7db186276..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-4-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-4-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict ';' which the last character is space - * @noStrict - */ - - -function testcase() { - "use strict "; - var public = 1; - return public === 1; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5-s.js deleted file mode 100644 index 6a9f07af477..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-5-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the beginning of the block - * @noStrict - */ - - -function testcase() { - "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5gs.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5gs.js deleted file mode 100644 index 63698e5e622..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-5gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.1/10.1.1/10.1.1-5gs.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the start of the code - * @noStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; -var public = 1; diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-6-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-6-s.js deleted file mode 100644 index 6434c251599..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-6-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-6-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears in the middle of the block - * @noStrict - */ - - -function testcase() { - var interface = 2; - "use strict"; - var public = 1; - return public === 1 && interface === 2; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-7-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-7-s.js deleted file mode 100644 index 42b5e1ee20a..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-7-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-7-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the end of the block - * @noStrict - */ - - -function testcase() { - var public = 1; - return public === 1; - "use strict"; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8-s.js deleted file mode 100644 index 3fc4df80e7a..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-8-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the directive prologue - * @noStrict - */ - - -function testcase() { - "use strict"; - "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8gs.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8gs.js deleted file mode 100644 index 88476ac4a78..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-8gs.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.1/10.1.1/10.1.1-8gs.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the code - * @noStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -"use strict"; -throw NotEarlyError; -var public = 1; diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-9-s.js b/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-9-s.js deleted file mode 100644 index b294ef1467d..00000000000 --- a/js/src/tests/test262/ch10/10.1/10.1.1/10.1.1-9-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-9-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''Use strict';' in which the first character is uppercase - * @noStrict - */ - - -function testcase() { - "Use strict"; - var public = 1; - return public === 1; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/browser.js b/js/src/tests/test262/ch10/10.1/10.1.1/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.1/10.1.1/shell.js b/js/src/tests/test262/ch10/10.1/10.1.1/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T1.js b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T1.js deleted file mode 100644 index 4085aa5ace9..00000000000 --- a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T1.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Program functions are defined in source text by a FunctionDeclaration or created dynamically either - * by using a FunctionExpression or by using the built-in Function object as a constructor - * - * @path ch10/10.1/S10.1.1_A1_T1.js - * @description Defining function by a FunctionDeclaration - */ - -//CHECK#1 -function f1(){ - return 1; -} -if(typeof(f1)!=="function") - $ERROR('#1: typeof(f1)!=="function"'); - diff --git a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T2.js b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T2.js deleted file mode 100644 index d453d6e5967..00000000000 --- a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T2.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Program functions are defined in source text by a FunctionDeclaration or created dynamically either - * by using a FunctionExpression or by using the built-in Function object as a constructor - * - * @path ch10/10.1/S10.1.1_A1_T2.js - * @description Creating function dynamically by using a FunctionExpression - */ - -//CHECK#1 -var x=function f1(){return 1;}(); -if(x!==1) - $ERROR('#1: Create function dynamically either by using a FunctionExpression'); - -//CHECK#2 -var y=function (){return 2;}(); -if(y!==2){ - $ERROR('#2: Create an anonymous function dynamically either by using a FunctionExpression'); -} - -//CHECK#2 -var z = (function(){return 3;})(); -if(z!==3){ - $ERROR('#3: Create an anonymous function dynamically either by using a FunctionExpression wrapped in a group operator'); -} - diff --git a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T3.js b/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T3.js deleted file mode 100644 index 5e49dcd5940..00000000000 --- a/js/src/tests/test262/ch10/10.1/S10.1.1_A1_T3.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Program functions are defined in source text by a FunctionDeclaration or created dynamically either - * by using a FunctionExpression or by using the built-in Function object as a constructor - * - * @path ch10/10.1/S10.1.1_A1_T3.js - * @description Creating function dynamically by using the built-in Function object as a constructor - */ - -//CHECK#1 -var x=new function f1(){return 1;}; -if(typeof(x.constructor)!=="function") - $ERROR('#1: typeof(x.constructor)!=="function"'); - diff --git a/js/src/tests/test262/ch10/10.1/S10.1.1_A2_T1.js b/js/src/tests/test262/ch10/10.1/S10.1.1_A2_T1.js deleted file mode 100644 index aa5701155db..00000000000 --- a/js/src/tests/test262/ch10/10.1/S10.1.1_A2_T1.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * There are two types of Function objects. Internal functions - * are built-in objects of the language, such as parseInt and Math.exp - * - * @path ch10/10.1/S10.1.1_A2_T1.js - * @description Checking types of parseInt and Math.exp - */ - -//CHECK#1 -if(typeof(Math.exp)!=="function") - $ERROR('#1: typeof(Math.exp(10))!=="function" '+typeof(Math.exp())); - -//CHECK#2 -if(typeof(parseInt)!=="function") - $ERROR('#2: typeof(parseInt())!=="function" '+typeof(parseInt())); - - diff --git a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T1.js b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T1.js deleted file mode 100644 index 5dee9bf43d8..00000000000 --- a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T1.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The activation object is initialised with a property with name arguments and attributes {DontDelete} - * - * @path ch10/10.1/S10.1.6_A1_T1.js - * @description Checking if deleting function parameter is possible - * @noStrict - */ - -//CHECK#1 -function f1(a){ - delete a; - return a; -} -if (f1(1) !== 1) - $ERROR('#1: Function parameter was deleted'); - - diff --git a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T2.js b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T2.js deleted file mode 100644 index 8747b2f110b..00000000000 --- a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T2.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The activation object is initialised with a property with name arguments and attributes {DontDelete} - * - * @path ch10/10.1/S10.1.6_A1_T2.js - * @description Checking funtion which returns property "arguments" - */ - -var ARG_STRING = "value of the argument property"; - -function f1() { - this.constructor.prototype.arguments = ARG_STRING; - return arguments; -} - -//CHECK#1 -if ((new f1(1,2,3,4,5)).length !== 5) - $ERROR('#1: (new f1(1,2,3,4,5)).length===5, where f1 returns "arguments" that is set to "'+ ARG_STRING + '"'); - -//CHECK#2 -if ((new f1(1,2,3,4,5))[3] !== 4) - $ERROR('#2: (new f1(1,2,3,4,5))[3]===4, where f1 returns "arguments" that is set to "'+ ARG_STRING + '"'); - -//CHECK#3 -var x = new f1(1,2,3,4,5); -if (delete x[3] !== true) - $ERROR('#3.1: Function parameters have attribute {DontDelete}'); - -if (x[3] === 4) - $ERROR('#3.2: Function parameters have attribute {DontDelete}'); - diff --git a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T3.js b/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T3.js deleted file mode 100644 index 95e1bf2ef38..00000000000 --- a/js/src/tests/test262/ch10/10.1/S10.1.6_A1_T3.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The activation object is initialised with a property with name arguments and attributes {DontDelete} - * - * @path ch10/10.1/S10.1.6_A1_T3.js - * @description Checking function which returns "this" - * @noStrict - */ - -function f1() { - if (delete arguments) { - $ERROR("#1: Function parameters have attribute {DontDelete}" + arguments); - } - return arguments; -} - -f1(); - diff --git a/js/src/tests/test262/ch10/10.1/S10.1.7_A1_T1.js b/js/src/tests/test262/ch10/10.1/S10.1.7_A1_T1.js deleted file mode 100644 index f7e7a0b0cca..00000000000 --- a/js/src/tests/test262/ch10/10.1/S10.1.7_A1_T1.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The this value associated with an executioncontext is immutable - * - * @path ch10/10.1/S10.1.7_A1_T1.js - * @description Checking if deleting "this" fails - */ - -//CHECK#1 -if (delete this !== true) - $ERROR('#1: The this value associated with an executioncontext is immutable. Actual: this was deleted'); - - diff --git a/js/src/tests/test262/ch10/10.1/browser.js b/js/src/tests/test262/ch10/10.1/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.1/shell.js b/js/src/tests/test262/ch10/10.1/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js deleted file mode 100644 index bfc1f5eced2..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js - * @description Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (NaN) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - NaN = 12; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js deleted file mode 100644 index e6083697876..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js - * @description Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (undefined) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - undefined = 12; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js deleted file mode 100644 index 9303b79b59c..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js - * @description Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Object) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var objBak = Object; - - try { - Object = 12; - return true; - } finally { - Object = objBak; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js deleted file mode 100644 index 9ecdf64a5e8..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js - * @description Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Number) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var numBak = Number; - try { - Number = 12; - return true; - } finally { - Number = numBak; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js b/js/src/tests/test262/ch10/10.2/10.2.1/10.2.1.1/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js deleted file mode 100644 index 6206633b248..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * If the caller supplies fewer parameter values than there are - * formal parameters, the extra formal parameters have value undefined - * - * @path ch10/10.2/10.2.1/S10.2.1_A1.js - * @description Calling function excluding a few parameters - */ - -//CHECK#1 -function f1(a, b){ - return (b === undefined); -} -if(!(f1(1, 2) === false)){ - $ERROR('#1: f1(1, 2) === false'); -} else if(!(f1(1) === true)){ - $ERROR('#1: f1(1) === true'); -} - -//CHECK#2 -function f2(a, b, c){ - return (b === undefined) && (c === undefined); -} -if(!(f2(1) === true)){ - $ERROR('#2: f2(1, 2) === true'); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js deleted file mode 100644 index e622c54626f..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A2.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * If two or more formal parameters share the same name, hence - * the same property, the corresponding property is given the value that was - * supplied for the last parameter with this name - * - * @path ch10/10.2/10.2.1/S10.2.1_A2.js - * @description Creating functions initialized with two or more formal parameters, which have the same name - * @noStrict - */ - -//CHECK#1 -function f1(x, x) { - return x; -} -if(!(f1(1, 2) === 2)) { - $ERROR("#1: f1(1, 2) === 2"); -} - -//CHECK#2 -function f2(x, x, x){ - return x*x*x; -} -if(!(f2(1, 2, 3) === 27)){ - $ERROR("f2(1, 2, 3) === 27"); -} - -//CHECK#3 -function f3(x, x) { - return 'a' + x; -} -if(!(f3(1, 2) === 'a2')){ - $ERROR("#3: f3(1, 2) === 'a2'"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A3.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A3.js deleted file mode 100644 index 1c15c0621d3..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A3.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * If the value of this last parameter (which has the same - * name as some previous parameters do) was not supplied by the - * caller, the value of the corresponding property is undefined - * - * @path ch10/10.2/10.2.1/S10.2.1_A3.js - * @description Creating functions with two or more formal parameters, - * that have the same name. Calling this function excluding a few last parameters - */ - -//CHECK#1 -function f1(x, a, b, x){ - return x; -} -if(!(f1(1, 2) === undefined)){ - $ERROR('#1: f1(1, 2) === undefined'); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js deleted file mode 100644 index a153af430f6..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T1.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Function declaration in function code - If the variable object - * already has a property with the name of Function Identifier, replace its - * value and attributes. Semantically, this step must follow the creation of - * FormalParameterList properties - * - * @path ch10/10.2/10.2.1/S10.2.1_A4_T1.js - * @description Checking existence of a function with passed parameter - * @noStrict - */ - -//CHECK#1 -function f1(x){ - return x; - - function x(){ - return 7; - } -} -if(!(f1().constructor.prototype === Function.prototype)){ - $ERROR('#1: f1() returns function'); -} - -//CHECK#2 -function f2(x){ - return typeof x; - - function x(){ - return 7; - } -} -if(!(f2() === "function")){ - $ERROR('#2: f2() === "function"'); -} - -//CHECK#3 -function f3() { - return typeof arguments; - function arguments() { - return 7; - } -} -if (!(f3() === "function")){ - $ERROR('#3: f3() === "function"'); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js deleted file mode 100644 index 16661df91db..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Function declaration in function code - If the variable object - * already has a property with the name of Function Identifier, replace its - * value and attributes. Semantically, this step must follow the creation of - * FormalParameterList properties - * - * @path ch10/10.2/10.2.1/S10.2.1_A4_T2.js - * @description Checking existence of a function with declared variable - */ - -//CHECK#1 -function f1(){ - var x; - - return x; - - function x(){ - return 7; - } -} -if(!(f1().constructor.prototype === Function.prototype)){ - $PRINT('#1: f1() returns function'); -} - -//CHECK#2 -function f2(){ - var x; - - return typeof x; - - function x(){ - return 7; - } -} -if(!(f2() === "function")){ - $PRINT('#2: f2() === "function"'); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js deleted file mode 100644 index 824aedeeec3..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * For each VariableDeclaration or VariableDeclarationNoIn in the - * code, create a property of the variable object whose name is the Identifier - * in the VariableDeclaration or VariableDeclarationNoIn, whose value is - * undefined and whose attributes are determined by the type of code - * - * @path ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js - * @description Checking variable existence only - */ - -//CHECK#1 -function f1(){ - var x; - - return typeof x; -} - -if(!(f1() === "undefined")){ - $PRINT('#1: f1() === "undefined"'); -} - -//CHECK#2 -function f2(){ - var x; - - return x; -} - -if(!(f2() === undefined)){ - $PRINT('#1: f2() === undefined'); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js deleted file mode 100644 index adef8b5c5d4..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * For each VariableDeclaration or VariableDeclarationNoIn in the - * code, create a property of the variable object whose name is the Identifier - * in the VariableDeclaration or VariableDeclarationNoIn, whose value is - * undefined and whose attributes are determined by the type of code - * - * @path ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js - * @description Checking existence of the variable object property with formal parameter - */ - -//CHECK#1 -function f1(x){ - var x; - - return typeof x; -} - -if(!(f1() === "undefined")){ - $PRINT('#1: f1(1) === "undefined"'); -} - -//CHECK#2 -function f2(x){ - var x; - - return x; -} - -if(!(f2() === undefined)){ - $PRINT('#1: f2(1) === undefined'); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js deleted file mode 100644 index d5321c9079a..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * If there is already a property of the variable object with the - * name of a declared variable, the value of the property and its attributes - * are not changed - * - * @path ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js - * @description Checking existence of the variable object property with formal parameter - */ - -//CHECK#1 -function f1(x){ - var x; - - return typeof x; -} - -if(!(f1(1) === "number")){ - $PRINT('#1: f1(1) === "number"'); -} - -//CHECK#2 -function f2(x){ - var x; - - return x; -} - -if(!(f2(1) === 1)){ - $PRINT('#1: f2(1) === 1'); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/browser.js b/js/src/tests/test262/ch10/10.2/10.2.1/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.1/shell.js b/js/src/tests/test262/ch10/10.2/10.2.1/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js deleted file mode 100644 index 7aba918d178..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T1.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T1.js - * @description Checking scope chain containing function declarations - */ - -var x = 0; - -function f1(){ - var x = 1; - function f2(){ - return x; - }; - return f2(); -} - -if(!(f1() === 1)){ - $ERROR("#1: Scope chain disturbed"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js deleted file mode 100644 index 33b47241881..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T2.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T2.js - * @description Checking scope chain containing function declarations - */ - -var x = 0; - -function f1(){ - function f2(){ - return x; - }; - return f2(); -} - -if(!(f1() === 0)){ - $ERROR("#1: Scope chain disturbed"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js deleted file mode 100644 index a9a85deff06..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T3.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T3.js - * @description Checking scope chain containing function declarations - */ - -var x = 0; - -function f1(){ - function f2(){ - return x; - }; - return f2(); - - var x = 1; -} - -if(!(f1() === undefined)){ - $ERROR("#1: Scope chain disturbed"); -} - - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js deleted file mode 100644 index e32ffac3525..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T4.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T4.js - * @description Checking scope chain containing function declarations - */ - -var x = 0; - -function f1(){ - function f2(){ - return x; - }; - - var x = 1; - return f2(); -} - -if(!(f1() === 1)){ - $ERROR("#1: Scope chain disturbed"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js deleted file mode 100644 index c71654f6fef..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T5.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T5.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ - -var x = 0; - -var myObj = {x : "obj"}; - -function f1(){ - var x = 1; - function f2(){ - with(myObj){ - return x; - } - }; - return f2(); -} - -if(!(f1() === "obj")){ - $ERROR("#1: Scope chain disturbed"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js deleted file mode 100644 index 990c27ef3c5..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T6.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T6.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ - -var x = 0; - -var myObj = {x : "obj"}; - -function f1(){ - function f2(){ - with(myObj){ - return x; - } - }; - return f2(); -} - -if(!(f1() === "obj")){ - $ERROR("#1: Scope chain disturbed"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js deleted file mode 100644 index cc719b5046c..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T7.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T7.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ - -var x = 0; - -var myObj = {x : "obj"}; - -function f1(){ - function f2(){ - with(myObj){ - return x; - } - }; - return f2(); - - var x = 1; -} - -if(!(f1() === "obj")){ - $ERROR("#1: Scope chain disturbed"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js deleted file mode 100644 index 3aaefcf14bc..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T8.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T8.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ - -var x = 0; - -var myObj = {x : "obj"}; - -function f1(){ - function f2(){ - with(myObj){ - return x; - } - }; - - var x = 1; - return f2(); -} - -if(!(f1() === "obj")){ - $ERROR("#1: Scope chain disturbed"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js b/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js deleted file mode 100644 index c03fdd1cf42..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.2/S10.2.2_A1_T9.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T9.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ - -var x = 0; - -var myObj = {x : "obj"}; - -function f1(){ - with(myObj){ - return x; - } -} - -if(!(f1() === "obj")){ - $ERROR("#1: Scope chain disturbed"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/browser.js b/js/src/tests/test262/ch10/10.2/10.2.2/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.2/shell.js b/js/src/tests/test262/ch10/10.2/10.2.2/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js deleted file mode 100644 index 6a133d78890..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js - * @description Global execution context - Value Properties - */ - -//CHECK#1 -if ( NaN === null ) { - $ERROR("#1: NaN === null"); -} - -//CHECK#2 -if ( Infinity === null ) { - $ERROR("#2: Infinity === null"); -} - -//CHECK#3 -if ( undefined === null ) { - $ERROR("#3: undefined === null"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js deleted file mode 100644 index 1fafadc99ff..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js - * @description Global execution context - Function Properties - */ - -//CHECK#4 -if ( eval === null ) { - $ERROR("#4: eval === null"); -} - -//CHECK#5 -if ( parseInt === null ) { - $ERROR("#5: parseInt === null"); -} - -//CHECK#6 -if ( parseFloat === null ) { - $ERROR("#6: parseFloat === null"); -} - -//CHECK#7 -if ( isNaN === null ) { - $ERROR("#7: isNaN === null"); -} - -//CHECK#8 -if ( isFinite === null ) { - $ERROR("#8: isFinite === null"); -} - -//CHECK#9 -if ( decodeURI === null ) { - $ERROR("#9: decodeURI === null"); -} - -//CHECK#10 -if ( decodeURIComponent === null ) { - $ERROR("#10: decodeURIComponent === null"); -} - -//CHECK#11 -if ( encodeURI === null ) { - $ERROR("#11: encodeURI === null"); -} - -//CHECK#12 -if ( encodeURIComponent === null ) { - $ERROR("#12: encodeURIComponent === null"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js deleted file mode 100644 index 3407039e883..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js - * @description Global execution context - Constructor Properties - */ - -//CHECK#13 -if ( Object === null ) { - $ERROR("#13: Object === null"); -} - -//CHECK#14 -if ( Function === null ) { - $ERROR("#14: Function === null"); -} - -//CHECK#15 -if ( String === null ) { - $ERROR("#15: String === null"); -} - -//CHECK#16 -if ( Number === null ) { - $ERROR("#16: Number === null"); -} - -//CHECK#17 -if ( Array === null ) { - $ERROR("#17: Array === null"); -} - -//CHECK#18 -if ( Boolean === null ) { - $ERROR("#20: Boolean === null"); -} - -//CHECK#18 -if ( Date === null ) { - $ERROR("#18: Date === null"); -} - -//CHECK#19 -if ( RegExp === null ) { - $ERROR("#19: RegExp === null"); -} - -//CHECK#20 -if ( Error === null ) { - $ERROR("#20: Error === null"); -} - -//CHECK#21 -if ( EvalError === null ) { - $ERROR("#21: EvalError === null"); -} - -//CHECK#22 -if ( RangeError === null ) { - $ERROR("#22: RangeError === null"); -} - -//CHECK#23 -if ( ReferenceError === null ) { - $ERROR("#23: ReferenceError === null"); -} - -//CHECK#24 -if ( SyntaxError === null ) { - $ERROR("#24: SyntaxError === null"); -} - -//CHECK#25 -if ( TypeError === null ) { - $ERROR("#25: TypeError === null"); -} - -//CHECK#26 -if ( URIError === null ) { - $ERROR("#26: URIError === null"); -} - - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js deleted file mode 100644 index f59cc646e9d..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js - * @description Global execution context - Other Properties - */ - -//CHECK#27 -if ( Math === null ) { - $ERROR("#27: Math === null"); -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js deleted file mode 100644 index a6b6c4bbf0d..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js - * @description Function execution context - Value Properties - */ - -function test() { - //CHECK#1 - if ( NaN === null ) { - $ERROR("#1: NaN === null"); - } - - //CHECK#2 - if ( Infinity === null ) { - $ERROR("#2: Infinity === null"); - } - - //CHECK#3 - if ( undefined === null ) { - $ERROR("#3: undefined === null"); - } -} - -test(); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js deleted file mode 100644 index 45ca89f3663..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js - * @description Function execution context - Function Properties - */ - -function test() { - //CHECK#4 - if ( eval === null ) { - $ERROR("#4: eval === null"); - } - - //CHECK#5 - if ( parseInt === null ) { - $ERROR("#5: parseInt === null"); - } - - //CHECK#6 - if ( parseFloat === null ) { - $ERROR("#6: parseFloat === null"); - } - - //CHECK#7 - if ( isNaN === null ) { - $ERROR("#7: isNaN === null"); - } - - //CHECK#8 - if ( isFinite === null ) { - $ERROR("#8: isFinite === null"); - } - - //CHECK#9 - if ( decodeURI === null ) { - $ERROR("#9: decodeURI === null"); - } - - //CHECK#10 - if ( decodeURIComponent === null ) { - $ERROR("#10: decodeURIComponent === null"); - } - - //CHECK#11 - if ( encodeURI === null ) { - $ERROR("#11: encodeURI === null"); - } - - //CHECK#12 - if ( encodeURIComponent === null ) { - $ERROR("#12: encodeURIComponent === null"); - } -} - -test(); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js deleted file mode 100644 index 295943cb75b..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js - * @description Function execution context - Constructor Properties - */ - -function test() { - //CHECK#13 - if ( Object === null ) { - $ERROR("#13: Object === null"); - } - - //CHECK#14 - if ( Function === null ) { - $ERROR("#14: Function === null"); - } - - //CHECK#15 - if ( String === null ) { - $ERROR("#15: String === null"); - } - - //CHECK#16 - if ( Number === null ) { - $ERROR("#16: Function === null"); - } - - //CHECK#17 - if ( Array === null ) { - $ERROR("#17: Array === null"); - } - - //CHECK#18 - if ( Boolean === null ) { - $ERROR("#20: Boolean === null"); - } - - //CHECK#18 - if ( Date === null ) { - $ERROR("#18: Date === null"); - } - - //CHECK#19 - if ( RegExp === null ) { - $ERROR("#19: RegExp === null"); - } - - //CHECK#20 - if ( Error === null ) { - $ERROR("#20: Error === null"); - } - - //CHECK#21 - if ( EvalError === null ) { - $ERROR("#21: EvalError === null"); - } - - //CHECK#22 - if ( RangeError === null ) { - $ERROR("#22: RangeError === null"); - } - - //CHECK#23 - if ( ReferenceError === null ) { - $ERROR("#23: ReferenceError === null"); - } - - //CHECK#24 - if ( SyntaxError === null ) { - $ERROR("#24: SyntaxError === null"); - } - - //CHECK#25 - if ( TypeError === null ) { - $ERROR("#25: TypeError === null"); - } - - //CHECK#26 - if ( URIError === null ) { - $ERROR("#26: URIError === null"); - } -} - -test(); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js deleted file mode 100644 index 01d02fb3938..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js - * @description Function execution context - Other Properties - */ - -function test() { - //CHECK#27 - if ( Math === null ) { - $ERROR("#27: Math === null"); - } -} - -test(); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js deleted file mode 100644 index 695f0acf5f0..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js - * @description Eval execution context - Value Properties - */ - -var evalStr = -'//CHECK#1\n'+ -'if ( NaN === null ) {\n'+ -' $ERROR("#1: NaN === null");\n'+ -'}\n'+ - -'//CHECK#2\n'+ -'if ( Infinity === null ) {\n'+ -' $ERROR("#2: Infinity === null");\n'+ -'}\n'+ - -'//CHECK#3\n'+ -'if ( undefined === null ) {\n'+ -' $ERROR("#3: undefined === null");\n'+ -'}\n'+ -';\n'; - -eval(evalStr); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js deleted file mode 100644 index 5afd0ef9356..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js - * @description Eval execution context - Function Properties - */ - -var evalStr = -'//CHECK#4\n'+ -'if ( eval === null ) {\n'+ -' $ERROR("#4: eval === null");\n'+ -'}\n'+ - -'//CHECK#5\n'+ -'if ( parseInt === null ) {\n'+ -' $ERROR("#5: parseInt === null");\n'+ -'}\n'+ - -'//CHECK#6\n'+ -'if ( parseFloat === null ) {\n'+ -' $ERROR("#6: parseFloat === null");\n'+ -'}\n'+ - -'//CHECK#7\n'+ -'if ( isNaN === null ) {\n'+ -' $ERROR("#7: isNaN === null");\n'+ -'}\n'+ - -'//CHECK#8\n'+ -'if ( isFinite === null ) {\n'+ -' $ERROR("#8: isFinite === null");\n'+ -'}\n'+ - -'//CHECK#9\n'+ -'if ( decodeURI === null ) {\n'+ -' $ERROR("#9: decodeURI === null");\n'+ -'}\n'+ - -'//CHECK#10\n'+ -'if ( decodeURIComponent === null ) {\n'+ -' $ERROR("#10: decodeURIComponent === null");\n'+ -'}\n'+ - -'//CHECK#11\n'+ -'if ( encodeURI === null ) {\n'+ -' $ERROR("#11: encodeURI === null");\n'+ -'}\n'+ - -'//CHECK#12\n'+ -'if ( encodeURIComponent === null ) {\n'+ -' $ERROR("#12: encodeURIComponent === null");\n'+ -'}\n'+ -';\n'; - -eval(evalStr); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js deleted file mode 100644 index b34b1e252eb..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js - * @description Eval execution context - Constructor Properties - */ - -var evalStr = -'//CHECK#13\n'+ -'if ( Object === null ) {\n'+ -' $ERROR("#13: Object === null");\n'+ -'}\n'+ - -'//CHECK#14\n'+ -'if ( Function === null ) {\n'+ -' $ERROR("#14: Function === null");\n'+ -'}\n'+ - -'//CHECK#15\n'+ -'if ( String === null ) {\n'+ -' $ERROR("#15: String === null");\n'+ -'}\n'+ - -'//CHECK#16\n'+ -'if ( Number === null ) {\n'+ -' $ERROR("#16: Function === null");\n'+ -'}\n'+ - -'//CHECK#17\n'+ -'if ( Array === null ) {\n'+ -' $ERROR("#17: Array === null");\n'+ -'}\n'+ - -'//CHECK#18\n'+ -'if ( Boolean === null ) {\n'+ -' $ERROR("#20: Boolean === null");\n'+ -'}\n'+ - -'//CHECK#18\n'+ -'if ( Date === null ) {\n'+ -' $ERROR("#18: Date === null");\n'+ -'}\n'+ - -'//CHECK#19\n'+ -'if ( RegExp === null ) {\n'+ -' $ERROR("#19: RegExp === null");\n'+ -'}\n'+ - -'//CHECK#20\n'+ -'if ( Error === null ) {\n'+ -' $ERROR("#20: Error === null");\n'+ -'}\n'+ - -'//CHECK#21\n'+ -'if ( EvalError === null ) {\n'+ -' $ERROR("#21: EvalError === null");\n'+ -'}\n'+ - -'//CHECK#22\n'+ -'if ( RangeError === null ) {\n'+ -' $ERROR("#22: RangeError === null");\n'+ -'}\n'+ - -'//CHECK#23\n'+ -'if ( ReferenceError === null ) {\n'+ -' $ERROR("#23: ReferenceError === null");\n'+ -'}\n'+ - -'//CHECK#24\n'+ -'if ( SyntaxError === null ) {\n'+ -' $ERROR("#24: SyntaxError === null");\n'+ -'}\n'+ - -'//CHECK#25\n'+ -'if ( TypeError === null ) {\n'+ -' $ERROR("#25: TypeError === null");\n'+ -'}\n'+ - -'//CHECK#26\n'+ -'if ( URIError === null ) {\n'+ -' $ERROR("#26: URIError === null");\n'+ -'}\n'+ -';\n'; - -eval(evalStr); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js deleted file mode 100644 index 054969ce2df..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js - * @description Eval execution context - Other Properties - */ - -var evalStr = -'//CHECK#27\n'+ -'if ( Math === null ) {\n'+ -' $ERROR("#27: Math === null");\n'+ -'}\n'+ -';\n'; - -eval(evalStr); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js deleted file mode 100644 index db57ad5baed..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js - * @description Global execution context - Value Properties - */ - -//CHECK#1 -for (var x in this) { - if ( x === 'NaN' ) { - $ERROR("#1: 'NaN' have attribute DontEnum"); - } else if ( x === 'Infinity' ) { - $ERROR("#1: 'Infinity' have attribute DontEnum"); - } else if ( x === 'undefined' ) { - $ERROR("#1: 'undefined' have attribute DontEnum"); - } -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js deleted file mode 100644 index 6a39d43a171..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js - * @description Global execution context - Function Properties - */ - -//CHECK#1 -for (var x in this) { - if ( x === 'eval' ) { - $ERROR("#1: 'eval' have attribute DontEnum"); - } else if ( x === 'parseInt' ) { - $ERROR("#1: 'parseInt' have attribute DontEnum"); - } else if ( x === 'parseFloat' ) { - $ERROR("#1: 'parseFloat' have attribute DontEnum"); - } else if ( x === 'isNaN' ) { - $ERROR("#1: 'isNaN' have attribute DontEnum"); - } else if ( x === 'isFinite' ) { - $ERROR("#1: 'isFinite' have attribute DontEnum"); - } else if ( x === 'decodeURI' ) { - $ERROR("#1: 'decodeURI' have attribute DontEnum"); - } else if ( x === 'decodeURIComponent' ) { - $ERROR("#1: 'decodeURIComponent' have attribute DontEnum"); - } else if ( x === 'encodeURI' ) { - $ERROR("#1: 'encodeURI' have attribute DontEnum"); - } else if ( x === 'encodeURIComponent' ) { - $ERROR("#1: 'encodeURIComponent' have attribute DontEnum"); - } -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js deleted file mode 100644 index c684a649a2a..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js - * @description Global execution context - Constructor Properties - */ - -//CHECK#1 -for (var x in this) { - if ( x === 'Object' ) { - $ERROR("#1: 'property 'Object' have attribute DontEnum"); - } else if ( x === 'Function') { - $ERROR("#1: 'Function' have attribute DontEnum"); - } else if ( x === 'String' ) { - $ERROR("#1: 'String' have attribute DontEnum"); - } else if ( x === 'Number' ) { - $ERROR("#1: 'Number' have attribute DontEnum"); - } else if ( x === 'Array' ) { - $ERROR("#1: 'Array' have attribute DontEnum"); - } else if ( x === 'Boolean' ) { - $ERROR("#1: 'Boolean' have attribute DontEnum"); - } else if ( x === 'Date' ) { - $ERROR("#1: 'Date' have attribute DontEnum"); - } else if ( x === 'RegExp' ) { - $ERROR("#1: 'RegExp' have attribute DontEnum"); - } else if ( x === 'Error' ) { - $ERROR("#1: 'Error' have attribute DontEnum"); - } else if ( x === 'EvalError' ) { - $ERROR("#1: 'EvalError' have attribute DontEnum"); - } else if ( x === 'RangeError' ) { - $ERROR("#1: 'RangeError' have attribute DontEnum"); - } else if ( x === 'ReferenceError' ) { - $ERROR("#1: 'ReferenceError' have attribute DontEnum"); - } else if ( x === 'SyntaxError' ) { - $ERROR("#1: 'SyntaxError' have attribute DontEnum"); - } else if ( x === 'TypeError' ) { - $ERROR("#1: 'TypeError' have attribute DontEnum"); - } else if ( x === 'URIError' ) { - $ERROR("#1: 'URIError' have attribute DontEnum"); - } -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js deleted file mode 100644 index cb575c5330f..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js - * @description Global execution context - Other Properties - */ - -//CHECK#1 -for (var x in this) { - if ( x === 'Math' ) { - $ERROR("#1: 'Math' have attribute DontEnum"); - } -} - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js deleted file mode 100644 index 808cc1b605a..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js - * @description Function execution context - Value Properties - */ - -function test() { - //CHECK#1 - for (var x in this) { - if ( x === 'NaN' ) { - $ERROR("#1: 'NaN' have attribute DontEnum"); - } else if ( x === 'Infinity' ) { - $ERROR("#1: 'Infinity' have attribute DontEnum"); - } else if ( x === 'undefined' ) { - $ERROR("#1: 'undefined' have attribute DontEnum"); - } - } -} - -test(); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js deleted file mode 100644 index ac87a58efd1..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js - * @description Function execution context - Function Properties - */ - -function test() { - //CHECK#1 - for (var x in this) { - if ( x === 'eval' ) { - $ERROR("#1: 'eval' have attribute DontEnum"); - } else if ( x === 'parseInt' ) { - $ERROR("#1: 'parseInt' have attribute DontEnum"); - } else if ( x === 'parseFloat' ) { - $ERROR("#1: 'parseFloat' have attribute DontEnum"); - } else if ( x === 'isNaN' ) { - $ERROR("#1: 'isNaN' have attribute DontEnum"); - } else if ( x === 'isFinite' ) { - $ERROR("#1: 'isFinite' have attribute DontEnum"); - } else if ( x === 'decodeURI' ) { - $ERROR("#1: 'decodeURI' have attribute DontEnum"); - } else if ( x === 'decodeURIComponent' ) { - $ERROR("#1: 'decodeURIComponent' have attribute DontEnum"); - } else if ( x === 'encodeURI' ) { - $ERROR("#1: 'encodeURI' have attribute DontEnum"); - } else if ( x === 'encodeURIComponent' ) { - $ERROR("#1: 'encodeURIComponent' have attribute DontEnum"); - } - } -} - -test(); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js deleted file mode 100644 index e6f5f4ac7b9..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js - * @description Function execution context - Constructor Properties - */ - -function test() { - //CHECK#1 - for (var x in this) { - if ( x === 'Object' ) { - $ERROR("#1: 'property 'Object' have attribute DontEnum"); - } else if ( x === 'Function') { - $ERROR("#1: 'Function' have attribute DontEnum"); - } else if ( x === 'String' ) { - $ERROR("#1: 'String' have attribute DontEnum"); - } else if ( x === 'Number' ) { - $ERROR("#1: 'Number' have attribute DontEnum"); - } else if ( x === 'Array' ) { - $ERROR("#1: 'Array' have attribute DontEnum"); - } else if ( x === 'Boolean' ) { - $ERROR("#1: 'Boolean' have attribute DontEnum"); - } else if ( x === 'Date' ) { - $ERROR("#1: 'Date' have attribute DontEnum"); - } else if ( x === 'RegExp' ) { - $ERROR("#1: 'RegExp' have attribute DontEnum"); - } else if ( x === 'Error' ) { - $ERROR("#1: 'Error' have attribute DontEnum"); - } else if ( x === 'EvalError' ) { - $ERROR("#1: 'EvalError' have attribute DontEnum"); - } else if ( x === 'RangeError' ) { - $ERROR("#1: 'RangeError' have attribute DontEnum"); - } else if ( x === 'ReferenceError' ) { - $ERROR("#1: 'ReferenceError' have attribute DontEnum"); - } else if ( x === 'SyntaxError' ) { - $ERROR("#1: 'SyntaxError' have attribute DontEnum"); - } else if ( x === 'TypeError' ) { - $ERROR("#1: 'TypeError' have attribute DontEnum"); - } else if ( x === 'URIError' ) { - $ERROR("#1: 'URIError' have attribute DontEnum"); - } - } -} - -test(); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js deleted file mode 100644 index 3a6afa5cc0c..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js - * @description Function execution context - Other Properties - */ - -function test() { - //CHECK#1 - for (var x in this) { - if ( x === 'Math' ) { - $ERROR("#1: 'Math' have attribute DontEnum"); - } - } -} - -test(); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js deleted file mode 100644 index f7f32c563eb..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js - * @description Global execution context - Value Properties - */ - -var evalStr = -'//CHECK#1\n'+ -'for (var x in this) {\n'+ -' if ( x === \'NaN\' ) {\n'+ -' $ERROR("#1: \'NaN\' have attribute DontEnum");\n'+ -' } else if ( x === \'Infinity\' ) {\n'+ -' $ERROR("#1: \'Infinity\' have attribute DontEnum");\n'+ -' } else if ( x === \'undefined\' ) {\n'+ -' $ERROR("#1: \'undefined\' have attribute DontEnum");\n'+ -' }\n'+ -'}\n'; - -eval(evalStr); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js deleted file mode 100644 index 8d3cfe7ee0a..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js - * @description Global execution context - Function Properties - */ - -var evalStr = -'//CHECK#1\n'+ -'for (var x in this) {\n'+ -' if ( x === \'eval\' ) {\n'+ -' $ERROR("#1: \'eval\' have attribute DontEnum");\n'+ -' } else if ( x === \'parseInt\' ) {\n'+ -' $ERROR("#1: \'parseInt\' have attribute DontEnum");\n'+ -' } else if ( x === \'parseFloat\' ) {\n'+ -' $ERROR("#1: \'parseFloat\' have attribute DontEnum");\n'+ -' } else if ( x === \'isNaN\' ) {\n'+ -' $ERROR("#1: \'isNaN\' have attribute DontEnum");\n'+ -' } else if ( x === \'isFinite\' ) {\n'+ -' $ERROR("#1: \'isFinite\' have attribute DontEnum");\n'+ -' } else if ( x === \'decodeURI\' ) {\n'+ -' $ERROR("#1: \'decodeURI\' have attribute DontEnum");\n'+ -' } else if ( x === \'decodeURIComponent\' ) {\n'+ -' $ERROR("#1: \'decodeURIComponent\' have attribute DontEnum");\n'+ -' } else if ( x === \'encodeURI\' ) {\n'+ -' $ERROR("#1: \'encodeURI\' have attribute DontEnum");\n'+ -' } else if ( x === \'encodeURIComponent\' ) {\n'+ -' $ERROR("#1: \'encodeURIComponent\' have attribute DontEnum");\n'+ -' }\n'+ -'}\n'; - -eval(evalStr); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js deleted file mode 100644 index 9ae75beb9ab..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js - * @description Global execution context - Constructor Properties - */ - -var evalStr = -'//CHECK#1\n'+ -'for (var x in this) {\n'+ -' if ( x === \'Object\' ) {\n'+ -' $ERROR("#1: \'Object\' have attribute DontEnum");\n'+ -' } else if ( x === \'Function\') {\n'+ -' $ERROR("#1: \'Function\' have attribute DontEnum");\n'+ -' } else if ( x === \'String\' ) {\n'+ -' $ERROR("#1: \'String\' have attribute DontEnum");\n'+ -' } else if ( x === \'Number\' ) {\n'+ -' $ERROR("#1: \'Number\' have attribute DontEnum");\n'+ -' } else if ( x === \'Array\' ) {\n'+ -' $ERROR("#1: \'Array\' have attribute DontEnum");\n'+ -' } else if ( x === \'Boolean\' ) {\n'+ -' $ERROR("#1: \'Boolean\' have attribute DontEnum");\n'+ -' } else if ( x === \'Date\' ) {\n'+ -' $ERROR("#1: \'Date\' have attribute DontEnum");\n'+ -' } else if ( x === \'RegExp\' ) {\n'+ -' $ERROR("#1: \'RegExp\' have attribute DontEnum");\n'+ -' } else if ( x === \'Error\' ) {\n'+ -' $ERROR("#1: \'Error\' have attribute DontEnum");\n'+ -' } else if ( x === \'EvalError\' ) {\n'+ -' $ERROR("#1: \'EvalError\' have attribute DontEnum");\n'+ -' } else if ( x === \'RangeError\' ) {\n'+ -' $ERROR("#1: \'RangeError\' have attribute DontEnum");\n'+ -' } else if ( x === \'ReferenceError\' ) {\n'+ -' $ERROR("#1: \'ReferenceError\' have attribute DontEnum");\n'+ -' } else if ( x === \'SyntaxError\' ) {\n'+ -' $ERROR("#1: \'SyntaxError\' have attribute DontEnum");\n'+ -' } else if ( x === \'TypeError\' ) {\n'+ -' $ERROR("#1: \'TypeError\' have attribute DontEnum");\n'+ -' } else if ( x === \'URIError\' ) {\n'+ -' $ERROR("#1: \'URIError\' have attribute DontEnum");\n'+ -' }\n'+ -'}\n'; - -eval(evalStr); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js deleted file mode 100644 index ed60835c9fd..00000000000 --- a/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js - * @description Global execution context - Other Properties - */ - -var evalStr = -'//CHECK#1\n'+ -'for (var x in this) {\n'+ -' if ( x === \'Math\' ) {\n'+ -' $ERROR("#1: \'Math\' have attribute DontEnum");\n'+ -' }\n'+ -'}\n'; - -eval(evalStr); - diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/browser.js b/js/src/tests/test262/ch10/10.2/10.2.3/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/10.2.3/shell.js b/js/src/tests/test262/ch10/10.2/10.2.3/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/browser.js b/js/src/tests/test262/ch10/10.2/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.2/shell.js b/js/src/tests/test262/ch10/10.2/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js b/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js deleted file mode 100644 index 04abf8bef31..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T1.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Variable instantiation is performed using the global object as - * the variable object and using property attributes { DontDelete } - * - * @path ch10/10.4/10.4.1/S10.4.1_A1_T1.js - * @description Checking if deleting variable x, that is defined as var x = 1, fails - * @noStrict - */ - -var x = 1; - -if (this.x !== 1) { - $ERROR("#1: variable x is a property of global object"); -} - -if(delete this.x !== false){ - $ERROR("#2: variable x has property attribute DontDelete"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js b/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js deleted file mode 100644 index 107381f2d44..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.1/S10.4.1_A1_T2.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Variable instantiation is performed using the global object as - * the variable object and using property attributes { DontDelete } - * - * @path ch10/10.4/10.4.1/S10.4.1_A1_T2.js - * @description Checking if deleting variable x, that is defined as x = 1, fails - * @noStrict - */ - -x = 1; - -if (this.x !== 1) { - $ERROR("#1: variable x is a property of global object"); -} - -if(delete this.x !== true){ - $ERROR("#2: variable x has property attribute DontDelete"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.1/browser.js b/js/src/tests/test262/ch10/10.4/10.4.1/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.4/10.4.1/shell.js b/js/src/tests/test262/ch10/10.4/10.4.1/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js deleted file mode 100644 index 233eac2c81f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js +++ /dev/null @@ -1,26 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-1.js - * @description Indirect call to eval has context set to global context - */ - -var __10_4_2_1_1_1 = "str"; -function testcase() { - try { - - var _eval = eval; - var __10_4_2_1_1_1 = "str1"; - if(_eval("\'str\' === __10_4_2_1_1_1") === true && // indirect eval - eval("\'str1\' === __10_4_2_1_1_1") === true) { // direct eval - return true; - } - return false; - } finally { - delete this.__10_4_2_1_1_1; - } -} -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js deleted file mode 100644 index 7c144f5529f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js +++ /dev/null @@ -1,31 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-2.js - * @description Indirect call to eval has context set to global context (nested function) - */ - -var __10_4_2_1_2 = "str"; -function testcase() { - try { - - var _eval = eval; - var __10_4_2_1_2 = "str1"; - function foo() { - var __10_4_2_1_2 = "str2"; - if(_eval("\'str\' === __10_4_2_1_2") === true && // indirect eval - eval("\'str2\' === __10_4_2_1_2") === true) { // direct eval - return true; - } else { - return false; - } - } - return foo(); - } finally { - delete this.__10_4_2_1_1_2; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js deleted file mode 100644 index 078ea21abf2..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js +++ /dev/null @@ -1,34 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-3.js - * @description Indirect call to eval has context set to global context (catch block) - */ - -var __10_4_2_1_3 = "str"; -function testcase() { - - try { - - var _eval = eval; - var __10_4_2_1_3 = "str1"; - try { - throw "error"; - } - catch (e) { - var __10_4_2_1_3 = "str2"; - if (_eval("\'str\' === __10_4_2_1_3") === true && // indirect eval - eval("\'str2\' === __10_4_2_1_3") === true) { // direct eval - return true; - } else { - return false; - } - } - } finally { - delete this.__10_4_2_1_3; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js deleted file mode 100644 index 8a025f0d9cd..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js +++ /dev/null @@ -1,29 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-4.js - * @description Indirect call to eval has context set to global context (with block) - */ - -var __10_4_2_1_4 = "str"; -function testcase() { - try { - var o = new Object(); - o.__10_4_2_1_4 = "str2"; - var _eval = eval; - var __10_4_2_1_4 = "str1"; - with (o) { - if (_eval("\'str\' === __10_4_2_1_4") === true && // indirect eval - eval("\'str2\' === __10_4_2_1_4") === true) { // direct eval - return true; - } - } - return false; - } finally { - delete this.__10_4_2_1_4; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js deleted file mode 100644 index 3808a9988db..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js +++ /dev/null @@ -1,27 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-5.js - * @description Indirect call to eval has context set to global context (inside another eval) - */ - -var __10_4_2_1_5 = "str"; -function testcase() { - try { - - var __10_4_2_1_5 = "str1"; - var r = eval("\ - var _eval = eval; \ - var __10_4_2_1_5 = \'str2\'; \ - _eval(\"\'str\' === __10_4_2_1_5 \") && \ - eval(\"\'str2\' === __10_4_2_1_5\")\ - "); - return r; - } finally { - delete this.__10_4_2_1_5; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js deleted file mode 100644 index 61d85cec014..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-2-c-1.js - * @description Direct val code in non-strict mode - can instantiate variable in calling context - */ - - -function testcase() { - var x = 0; - return function inner() { - eval("var x = 1"); - if (x === 1) - return true; - } (); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js deleted file mode 100644 index fb00b04f5a2..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-2-s.js - * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval - * @onlyStrict - */ - - -function testcase() { - "use strict"; - eval("(function fun(x){ return x })(10)"); - return typeof (fun) === "undefined"; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js deleted file mode 100644 index 57ee1912d0d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-3-c-1-s.js - * @description Direct eval code in strict mode - cannot instantiate variable in the variable environment of the calling context - * @onlyStrict - */ - - -function testcase() { - var _10_4_2_3_c_1_s = 0; - function _10_4_2_3_c_1_sFunc() { - eval("'use strict';var _10_4_2_3_c_1_s = 1"); - return _10_4_2_3_c_1_s===0; - } - return _10_4_2_3_c_1_sFunc(); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js deleted file mode 100644 index 91caa626b70..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-3-c-2-s.js - * @description Calling code in strict mode - eval cannot instantiate variable in the variable environment of the calling context - * @onlyStrict - */ - - -function testcase() { - var _10_4_2_3_c_2_s = 0; - function _10_4_2_3_c_2_sFunc() { - 'use strict'; - eval("var _10_4_2_3_c_2_s = 1"); - return _10_4_2_3_c_2_s===0; - } - return _10_4_2_3_c_2_sFunc(); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js deleted file mode 100644 index e0d77031f76..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.4/10.4.2/10.4.2.1-1gs.js - * @description Strict Mode - eval code cannot instantiate variable in the variable environment of the calling context that invoked the eval if the code of the calling context is strict code - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -eval("var x = 7;"); -x = 9; -throw NotEarlyError; diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js deleted file mode 100644 index 5fc76cb35cb..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2.1-2-s.js - * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - eval("function _10_4_2_1_2_fun(){}"); - return typeof _10_4_2_1_2_fun === "undefined"; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js deleted file mode 100644 index 89ce853994f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2.1-4-s.js - * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval which is contained in strict mode code - * @onlyStrict - */ - - -function testcase() { - - eval("'use strict'; function _10_4_2_1_4_fun(){}"); - return typeof _10_4_2_1_4_fun === "undefined"; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js deleted file mode 100644 index 3a3690ce936..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @path ch10/10.4/10.4.2/S10.4.2.1_A1.js - * @description Strict indirect eval should not leak top level - * declarations into the global scope - * @onlyStrict - */ - -"use strict"; -if (!('foo' in this)) { - (1,eval)('"use strict"; var foo = 88;'); - if ('foo' in this) { - $ERROR("Strict indirect eval leaked a top level declaration"); - } -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js deleted file mode 100644 index 077ae7be11f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; -x = 1; -y = 2; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js deleted file mode 100644 index 4903b5b3b9a..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; -var x = 1; -var y = 2; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js deleted file mode 100644 index fb7b1690e26..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - -this.x = 1; -this.y = 2; - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js deleted file mode 100644 index b7eb20df00d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - -var x = 1; -var y = 2; - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js deleted file mode 100644 index 3b32b2bc2d9..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; -this.x = 1; -this.y = 2; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js deleted file mode 100644 index c5e5d0a0465..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; -x = 1; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - -y = 2; - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js deleted file mode 100644 index 927a8007dfe..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; -var x = 1; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - -var y = 2; - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js deleted file mode 100644 index b9fb461f6c3..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; -this.x = 1; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - -this.y = 2; - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js deleted file mode 100644 index 93160490c4c..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; -x = 1; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - -var y = 2; - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js deleted file mode 100644 index 5376140af67..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; -this.x = 1; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - -var y = 2; - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js deleted file mode 100644 index 76d75b8f9cc..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js - * @description eval within global execution context - */ - -var i; -var j; -str1 = ''; -str2 = ''; - -for(i in this){ - str1+=i; -} - -eval('for(j in this){\nstr2+=j;\n}'); - -if(!(str1 === str2)){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - -x = 1; -y = 2; - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js deleted file mode 100644 index 229cfc63f82..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - x = 1; - y = 2; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - return (str1 === str2); -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js deleted file mode 100644 index 1707379cf28..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - var x = 1; - var y = 2; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js deleted file mode 100644 index b94f2aa56e2..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js - * @description eval within global execution context - * @noStrict - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); - - this.x = 1; - this.y = 2; -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js deleted file mode 100644 index 72611dc49a2..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); - var x = 1; - var y = 2; -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js deleted file mode 100644 index f3cd1b0bf62..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - this.x = 1; - this.y = 2; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js deleted file mode 100644 index cebe8f3a281..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - x = 1; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); - - y = 2; -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js deleted file mode 100644 index 80243484991..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - var x = 1; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); - - var y = 2; -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js deleted file mode 100644 index 275f8ce9878..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - this.x = 1; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); - - this.y = 2; -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js deleted file mode 100644 index 1870bc1fd63..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - x = 1; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); - - var y = 2; -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - - - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js deleted file mode 100644 index 8f128246018..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - this.x = 1; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); - - var y = 2; -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js deleted file mode 100644 index e77ca4323ff..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js - * @description eval within global execution context - */ - -function f(){ - var i; - var j; - str1 = ''; - str2 = ''; - - for(i in this){ - str1+=i; - } - - eval('for(j in this){\nstr2+=j;\n}'); - - return (str1 === str2); - - x = 1; - y = 2; -} - -if(!f()){ - $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); -} - - diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/browser.js b/js/src/tests/test262/ch10/10.4/10.4.2/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/shell.js b/js/src/tests/test262/ch10/10.4/10.4.2/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js deleted file mode 100644 index 9ed7152e401..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js +++ /dev/null @@ -1,29 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-1-s.js - * @description this is not coerced to an object in strict mode (Number) - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - - - return foo.call(1) === 'number' && bar.call(1) === 'object'; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js deleted file mode 100644 index d737cff1ac6..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-10-s.js - * @description Strict Mode - checking 'this' (FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f = function () { - "use strict"; - return typeof this; -} -return f() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js deleted file mode 100644 index 98deb941e53..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-100-s.js - * @description Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace from non-strict context) - * @onlyStrict - */ - -function testcase() { -var x = 3; - -function f() { - "use strict"; - x = this; - return "a"; -} -return ("ab".replace("b", f)==="aa") && (x===undefined); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js deleted file mode 100644 index b78f8166088..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-100gs.js - * @description Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace from non-strict context) - * @onlyStrict - */ -var x = 3; - -function f() { - "use strict"; - x = this; - return "a"; -} -if (("ab".replace("b", f)!=="aa") || (x!==undefined)) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js deleted file mode 100644 index bb7c2c7a97b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-101-s.js - * @description Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context) - * @noStrict - */ - -function testcase() { -var x = 3; - -function f() { - x = this; - return "a"; -} - -return (function() {"use strict"; return "ab".replace("b", f)==="aa";}()) && (x===fnGlobalObject()); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js deleted file mode 100644 index bc6eba526d8..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-101gs.js - * @description Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context) - * @noStrict - */ -var x = 3; - -function f() { - x = this; - return "a"; -} - -if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==fnGlobalObject())) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js deleted file mode 100644 index 0a11390eff7..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-102-s.js - * @description Strict Mode - checking 'this' (strict anonymous function passed as arg to String.prototype.replace from non-strict context) - * @onlyStrict - */ - -function testcase() { -var x = 3; - -return ("ab".replace("b", (function () { - "use strict"; - return function () { - x = this; - return "a"; - } - })())==="aa") && (x===undefined); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js deleted file mode 100644 index 90505a2fd7b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-102gs.js - * @description Strict Mode - checking 'this' (strict anonymous function passed as arg to String.prototype.replace from non-strict context) - * @onlyStrict - */ -var x = 3; -if ( ("ab".replace("b", (function () { - "use strict"; - return function () { - x = this; - return "a"; - } - })())!=="aa") || (x!==undefined)) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js deleted file mode 100644 index a0bc90873d9..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-103.js - * @description Non strict mode should ToObject thisArg if not an object. Abstract equality operator should succeed. - */ - -function testcase(){ - Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); - if((5).x == 0) return false; - if(!((5).x == 5)) return false; - return true; -} - -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js deleted file mode 100644 index 42f89deb3c9..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * - * @path ch10/10.4/10.4.3/10.4.3-1-104.js - * @onlyStrict - * @description Strict mode should not ToObject thisArg if not an object. Strict equality operator should succeed. - */ - - -function testcase(){ - Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } }); - if(!((5).x === 5)) return false; - return true; -} - -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js deleted file mode 100644 index a66b850cf26..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Created based on feedback in https://bugs.ecmascript.org/show_bug.cgi?id=333 - * - * @path ch10/10.4/10.4.3/10.4.3-1-105.js - * @description Non strict mode should ToObject thisArg if not an object. Return type should be object and strict equality should fail. - */ - - function testcase(){ - Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); - if((5).x === 5) return false; - if(!(typeof (5).x === "object")) return false; - return true; -} - -runTestCase(testcase); - diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js deleted file mode 100644 index 36afbda2add..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Created based on feedback in https://bugs.ecmascript.org/show_bug.cgi?id=333 - * - * @path ch10/10.4/10.4.3/10.4.3-1-106.js - * @onlyStrict - * @description Strict mode should not ToObject thisArg if not an object. Return type should be 'number'. - */ - - function testcase(){ - Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } }); - if(!(typeof (5).x === "number")) return false; - return true; -} - -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js deleted file mode 100644 index 74ee475ae6b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-10gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -var f = function () { - "use strict"; - return typeof this; -} -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js deleted file mode 100644 index 8f781333822..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-11-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (function () { - return typeof this; -})() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js deleted file mode 100644 index 3be7db62a08..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-11gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - */ - -"use strict"; -if ((function () { - return typeof this; -})() !== "undefined") { - throw "'this' had incorrect value!"; -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js deleted file mode 100644 index a88b4c03f92..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-12-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -return (function () { - "use strict"; - return typeof this; -})() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js deleted file mode 100644 index 0bb4a97811d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-12gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -if ((function () { - "use strict"; - return typeof this; -})() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js deleted file mode 100644 index c4ebc9d3905..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-13-s.js - * @description Strict Mode - checking 'this' (Function constructor defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f = Function("return typeof this;"); -return f() !== "undefined"; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js deleted file mode 100644 index d6c4d550aad..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-13gs.js - * @description Strict - checking 'this' from a global scope (Function constructor defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var f = Function("return typeof this;"); -if (f() === "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js deleted file mode 100644 index fe45b69317a..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-14-s.js - * @description Strict Mode - checking 'this' (Function constructor includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f = Function("\"use strict\";\nreturn typeof this;"); -return f() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js deleted file mode 100644 index cec5e66d823..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-14gs.js - * @description Strict - checking 'this' from a global scope (Function constructor includes strict directive prologue) - * @onlyStrict - */ - -var f = Function("\"use strict\";\nreturn typeof this;"); -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js deleted file mode 100644 index 961d55b6d78..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-15-s.js - * @description Strict Mode - checking 'this' (New'ed Function constructor defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f = new Function("return typeof this;"); -return f() !== "undefined"; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js deleted file mode 100644 index 26d75fa6413..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-15gs.js - * @description Strict - checking 'this' from a global scope (New'ed Function constructor defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var f = new Function("return typeof this;"); -if (f() === "undefined") { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js deleted file mode 100644 index 6167f4c4ac7..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-16-s.js - * @description Strict Mode - checking 'this' (New'ed Function constructor includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f = new Function("\"use strict\";\nreturn typeof this;"); -return f() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js deleted file mode 100644 index b7a2287e7b8..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-16gs.js - * @description Strict - checking 'this' from a global scope (New'ed Function constructor includes strict directive prologue) - * @onlyStrict - */ - -var f = new Function("\"use strict\";\nreturn typeof this;"); -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js deleted file mode 100644 index 4d2caf0635c..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-17-s.js - * @description Strict Mode - checking 'this' (eval used within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (eval("typeof this") === "undefined") && (eval("this") !== fnGlobalObject()); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js deleted file mode 100644 index f583c6e895a..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-17gs.js - * @description Strict - checking 'this' from a global scope (eval used within strict mode) - * @onlyStrict - */ - -"use strict"; -if (eval("this") !== fnGlobalObject()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js deleted file mode 100644 index e1d35e49763..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js +++ /dev/null @@ -1,14 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-18gs.js - * @description Strict - checking 'this' from a global scope (eval includes strict directive prologue) - * @onlyStrict - */ - -if (eval("\"use strict\";\nthis") !== fnGlobalObject()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js deleted file mode 100644 index c2d412838d5..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-19-s.js - * @description Strict Mode - checking 'this' (indirect eval used within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var my_eval = eval; -return my_eval("this") === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js deleted file mode 100644 index 2d1c35edcd6..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-19gs.js - * @description Strict - checking 'this' from a global scope (indirect eval used within strict mode) - * @onlyStrict - */ - -"use strict"; -var my_eval = eval; -if (my_eval("this") !== fnGlobalObject()) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js deleted file mode 100644 index 0efe7fd65dc..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js +++ /dev/null @@ -1,29 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-2-s.js - * @description this is not coerced to an object in strict mode (string) - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - - - return foo.call('1') === 'string' && bar.call('1') === 'object'; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js deleted file mode 100644 index 869bc53e4b0..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-20-s.js - * @description Strict Mode - checking 'this' (indirect eval includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var my_eval = eval; -return my_eval("\"use strict\";\nthis") === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js deleted file mode 100644 index 48544cb0ea0..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-20gs.js - * @description Strict - checking 'this' from a global scope (indirect eval includes strict directive prologue) - * @onlyStrict - */ - -var my_eval = eval; -if (my_eval("\"use strict\";\nthis") !== fnGlobalObject() ) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js deleted file mode 100644 index 915f54ce8b0..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-21-s.js - * @description Strict Mode - checking 'this' (New'ed object from FunctionDeclaration defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -function f() { - return this; -} -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js deleted file mode 100644 index b1263404900..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-21gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration defined within strict mode) - * @onlyStrict - */ - -"use strict"; -function f() { - return this; -} -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { - throw "'this' had incorrect value!"; -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js deleted file mode 100644 index 55d66e60c21..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-22-s.js - * @description Strict Mode - checking 'this' (New'ed object from FunctionDeclaration includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -function f() { - "use strict"; - return this; -} -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); - -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js deleted file mode 100644 index 1abde0e2f47..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-22gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration includes strict directive prologue) - * @onlyStrict - */ - -function f() { - "use strict"; - return this; -} -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { - throw "'this' had incorrect value!"; -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js deleted file mode 100644 index b2c40be4f0a..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-23-s.js - * @description Strict Mode - checking 'this' (New'ed object from FunctionExpression defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f = function () { - return this; -} -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); - -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js deleted file mode 100644 index 4aab842916e..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-23gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from FunctionExpression defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var f = function () { - return this; -} -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js deleted file mode 100644 index 3499abe4dd4..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-24-s.js - * @description Strict Mode - checking 'this' (New'ed object from FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f = function () { - "use strict"; - return this; -} -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js deleted file mode 100644 index 38d5e14909b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-24gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -var f = function () { - "use strict"; - return this; -} -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js deleted file mode 100644 index 138802f6485..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-25-s.js - * @description Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var obj = new (function () { - return this; -}); -return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js deleted file mode 100644 index 30ac917cbd6..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-25gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var obj = new (function () { - return this; -}); -if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { - throw "'this' had incorrect value!"; -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js deleted file mode 100644 index a015f4082f0..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-26-s.js - * @description Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var obj = new (function () { - "use strict"; - return this; -}); -return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js deleted file mode 100644 index e19bce342de..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-26gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -var obj = new (function () { - "use strict"; - return this; -}); -if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js deleted file mode 100644 index 54eda820f81..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-27-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -function f1() { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js deleted file mode 100644 index 0cb1cb4f27a..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-27gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -"use strict"; -function f1() { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js deleted file mode 100644 index c2a5578a84b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-28-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -function f1() { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js deleted file mode 100644 index 663a18e00c8..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-28gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -"use strict"; -function f1() { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js deleted file mode 100644 index 87ea431d7bc..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-29-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -function f1() { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js deleted file mode 100644 index 416f1b4f330..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-29gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -"use strict"; -function f1() { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js deleted file mode 100644 index 19bafdcff9d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js +++ /dev/null @@ -1,27 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-3-s.js - * @description this is not coerced to an object in strict mode (undefined) - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - return foo.call(undefined) === 'undefined' && bar.call() === 'object'; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js deleted file mode 100644 index b4085931b31..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-30-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f1 = function () { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js deleted file mode 100644 index ab3c6222d59..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-30gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -var f1 = function () { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js deleted file mode 100644 index dc32ca19ee3..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-31-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f1 = function () { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js deleted file mode 100644 index 1bbb2d1616a..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-31gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -var f1 = function () { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js deleted file mode 100644 index 4ba988920db..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-32-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f1 = function () { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js deleted file mode 100644 index 1cd2ad05ada..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-32gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -var f1 = function () { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js deleted file mode 100644 index 6c4d66e2e3f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-33-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (function () { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js deleted file mode 100644 index c288566cb6d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-33gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -if (! ((function () { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js deleted file mode 100644 index 9cf25b53dcf..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-34-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (function () { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js deleted file mode 100644 index 72980aa4118..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-34gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -if (! ((function () { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js deleted file mode 100644 index 8f7abb36fc5..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-35-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (function () { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js deleted file mode 100644 index ecee18fe320..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-35gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -if (! ((function () { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js deleted file mode 100644 index 08bea7cc437..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-36-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -function f1() { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js deleted file mode 100644 index 88fab9f20a7..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-36gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function f1() { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js deleted file mode 100644 index 93e7fde2880..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-37-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -function f1() { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js deleted file mode 100644 index 795b6032db9..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-37gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function f1() { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js deleted file mode 100644 index f496d4ed08e..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-38-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -function f1() { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js deleted file mode 100644 index 1c00b742e41..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-38gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function f1() { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js deleted file mode 100644 index 22478bc26d2..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-39-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f1 = function () { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js deleted file mode 100644 index 7ec3adf91a0..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-39gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -var f1 = function () { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js deleted file mode 100644 index 28bd8f05903..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js +++ /dev/null @@ -1,29 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-4-s.js - * @description this is not coerced to an object in strict mode (boolean) - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - - - return foo.call(true) === 'boolean' && bar.call(true) === 'object'; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js deleted file mode 100644 index b90817f6389..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-40-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f1 = function () { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js deleted file mode 100644 index 2d8fbf0ba98..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-40gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -var f1 = function () { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js deleted file mode 100644 index 48495e39292..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-41-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f1 = function () { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js deleted file mode 100644 index 43cba61c8e3..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-41gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -var f1 = function () { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js deleted file mode 100644 index c4f7058579a..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-42-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -return (function () { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js deleted file mode 100644 index b1802bf1602..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-42gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -if (! ((function () { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js deleted file mode 100644 index 6575e56b9d5..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-43-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -return (function () { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js deleted file mode 100644 index 0da4b787139..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-43gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -if (! ((function () { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js deleted file mode 100644 index b7ac11d8d85..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-44-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -return (function () { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js deleted file mode 100644 index 2300e4acba1..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-44gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -if (! ((function () { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js deleted file mode 100644 index e23f9fef051..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-45-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function testcase() { -function f1() { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js deleted file mode 100644 index ce99d65746c..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-45gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function f1() { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js deleted file mode 100644 index 5945b2b2153..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-46-s.js - * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function testcase() { -function f1() { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js deleted file mode 100644 index 3d0ddd895c7..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-46gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function f1() { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js deleted file mode 100644 index 6a5fe9d4071..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-47-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function testcase() { -function f1() { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js deleted file mode 100644 index 78884f8c6b4..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-47gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function f1() { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js deleted file mode 100644 index 3c4d49af4ce..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-48-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -function testcase() { -var f1 = function () { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js deleted file mode 100644 index b6d619176a1..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-48gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -var f1 = function () { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js deleted file mode 100644 index 3ae616eaa23..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-49-s.js - * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -function testcase() { -var f1 = function () { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js deleted file mode 100644 index d6aee3a9182..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-49gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -var f1 = function () { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js deleted file mode 100644 index 5d64cea6b72..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js +++ /dev/null @@ -1,32 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-5-s.js - * @description this is not coerced to an object in strict mode (function) - * @onlyStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - - function foobar() - { - } - - return foo.call(foobar) === 'function' && bar.call(foobar) === 'function'; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js deleted file mode 100644 index ad273ecb1fe..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-50-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -function testcase() { -var f1 = function () { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js deleted file mode 100644 index 21cd879efa8..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-50gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -var f1 = function () { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js deleted file mode 100644 index e8935366e05..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-51-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -function testcase() { -return (function () { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js deleted file mode 100644 index 52f8e35a6a2..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-51gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -if (! ((function () { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js deleted file mode 100644 index b2c3a00820c..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-52-s.js - * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -function testcase() { -return (function () { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js deleted file mode 100644 index cc617750d2d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-52gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -if (! ((function () { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js deleted file mode 100644 index 2324bf44f63..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-53-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -function testcase() { -return (function () { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js deleted file mode 100644 index 0c6581f2e19..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-53gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -if (! ((function () { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js deleted file mode 100644 index ac481d6109c..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-54-s.js - * @description Strict Mode - checking 'this' (Literal getter defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var o = { get foo() { return this; } } -return o.foo===o; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js deleted file mode 100644 index 571ad634e9e..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-54gs.js - * @description Strict - checking 'this' from a global scope (Literal getter defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var o = { get foo() { return this; } } -if (o.foo!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js deleted file mode 100644 index 49acc2d11bf..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-55-s.js - * @description Strict Mode - checking 'this' (Literal getter includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var o = { get foo() { "use strict"; return this; } } -return o.foo===o; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js deleted file mode 100644 index ab3ccbbc549..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-55gs.js - * @description Strict - checking 'this' from a global scope (Literal getter includes strict directive prologue) - * @onlyStrict - */ - -var o = { get foo() { "use strict"; return this; } } -if (o.foo!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js deleted file mode 100644 index 1a492c46209..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-56-s.js - * @description Strict Mode - checking 'this' (Literal setter defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var x = 2; -var o = { set foo(stuff) { x=this; } } -o.foo = 3; -return x===o; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js deleted file mode 100644 index 7ea7c7a3f52..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-56gs.js - * @description Strict - checking 'this' from a global scope (Literal setter defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var x = 2; -var o = { set foo(stuff) { x=this; } } -o.foo = 3; -if (x!==o) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js deleted file mode 100644 index bcd4ef62cf8..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-57-s.js - * @description Strict Mode - checking 'this' (Literal setter includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var x = 2; -var o = { set foo(stuff) { "use strict"; x=this; } } -o.foo = 3; -return x===o; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js deleted file mode 100644 index e59df33573e..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-57gs.js - * @description Strict - checking 'this' from a global scope (Literal setter includes strict directive prologue) - * @onlyStrict - */ - -var x = 2; -var o = { set foo(stuff) { "use strict"; x=this; } } -o.foo = 3; -if (x!==o) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js deleted file mode 100644 index 964f8d43580..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-58-s.js - * @description Strict Mode - checking 'this' (Injected getter defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var o = {}; -Object.defineProperty(o, "foo", { get: function() { return this; } }); -return o.foo===o; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js deleted file mode 100644 index 166e440795e..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-58gs.js - * @description Strict - checking 'this' from a global scope (Injected getter defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var o = {}; -Object.defineProperty(o, "foo", { get : function() { return this; } }); -if (o.foo!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js deleted file mode 100644 index 7d0afddf50b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-59-s.js - * @description Strict Mode - checking 'this' (Injected getter includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var o = {}; -Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); -return o.foo===o; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js deleted file mode 100644 index 09e1d064872..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-59gs.js - * @description Strict - checking 'this' from a global scope (Injected getter includes strict directive prologue) - * @onlyStrict - */ - -var o = {}; -Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); -if (o.foo!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js deleted file mode 100644 index 1bd803beec6..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-60-s.js - * @description Strict Mode - checking 'this' (Injected setter defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var o = {}; -var x = 2; -Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); -o.foo = 3; -return x===o; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js deleted file mode 100644 index 09053dbd186..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-60gs.js - * @description Strict - checking 'this' from a global scope (Injected setter defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var o = {}; -var x = 2; -Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); -o.foo = 3; -if (x!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js deleted file mode 100644 index 23586b25079..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-61-s.js - * @description Strict Mode - checking 'this' (Injected setter includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var o = {}; -var x = 2; -Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); -o.foo = 3; -return x===o; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js deleted file mode 100644 index 2d31c32d8aa..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-61gs.js - * @description Strict - checking 'this' from a global scope (Injected setter includes strict directive prologue) - * @onlyStrict - */ - -var o = {}; -var x = 2; -Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); -o.foo = 3; -if (x!==o) { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js deleted file mode 100644 index a2e3c0bb89a..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-62-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by non-strict function declaration) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this;}; -function foo() { return f();} -return foo()===undefined; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js deleted file mode 100644 index 9cd2ae0e76c..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-62gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict function declaration) - * @onlyStrict - */ - -function f() { "use strict"; return this;}; -function foo() { return f();} -if (foo()!==undefined){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js deleted file mode 100644 index 5b93d280bd8..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-63-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by non-strict eval) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return eval("f();"); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js deleted file mode 100644 index 07f7a9ceefe..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-63gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict eval) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! eval("f();")){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js deleted file mode 100644 index ddb042449c8..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-64-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by non-strict Function constructor) - * @onlyStrict - */ - -function testcase() { -fnGlobalObject().f = function() { "use strict"; return this===undefined;}; -return Function("return f();")(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js deleted file mode 100644 index 6877c83413c..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-64gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict Function constructor) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! (Function("return f();")())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js deleted file mode 100644 index 5b0f20a65f7..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-65-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by non-strict new'ed Function constructor) - * @onlyStrict - */ - -function testcase() { -fnGlobalObject().f = function() { "use strict"; return this===undefined;}; -return (new Function("return f();"))(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js deleted file mode 100644 index 567a1236043..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-65gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict new'ed Function constructor) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! ( (new Function("return f();")) () )){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js deleted file mode 100644 index 3b44018277b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-66-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.apply(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js deleted file mode 100644 index 29a609b7a92..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-66gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply()) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! f.apply()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js deleted file mode 100644 index baf57dc0c87..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-67-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(null)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===null;}; -return f.apply(null); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js deleted file mode 100644 index 9122b9fdec2..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-67gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(null)) - * @onlyStrict - */ - -function f() { "use strict"; return this===null;}; -if (! f.apply(null)){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js deleted file mode 100644 index 10a5294e109..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-68-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(undefined)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.apply(undefined); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js deleted file mode 100644 index 5bfeee3f05f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-68gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(undefined)) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! f.apply(undefined)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js deleted file mode 100644 index 8db3b94ce70..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-69-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(someObject)) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { "use strict"; return this===o;}; -return f.apply(o); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js deleted file mode 100644 index f32b45575ca..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-69gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(someObject)) - * @onlyStrict - */ - -var o = {}; -function f() { "use strict"; return this===o;}; -if (! f.apply(o)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js deleted file mode 100644 index ae370f766eb..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-7-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within strict mode) - * @onlyStrict - */ - - -function testcase() { -"use strict"; -function f() { - return typeof this; -} -return f() === "undefined"; -} -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js deleted file mode 100644 index d1bf918ee8f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-70-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(globalObject)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this;}; -return f.apply(fnGlobalObject()) === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js deleted file mode 100644 index 0044b8afd7b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-70gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(globalObject)) - * @onlyStrict - */ - -function f() { "use strict"; return this;}; -if (f.apply(fnGlobalObject()) !== fnGlobalObject()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js deleted file mode 100644 index 5fe5dcba304..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-71-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.call(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js deleted file mode 100644 index c978be9ad81..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-71gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call()) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! f.call()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js deleted file mode 100644 index b9c669291c0..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-72-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(null)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===null;}; -return f.call(null); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js deleted file mode 100644 index 49ca243d1ff..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-72gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(null)) - * @onlyStrict - */ - -function f() { "use strict"; return this===null;}; -if (! f.call(null)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js deleted file mode 100644 index e04b5d7be5f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-73-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(undefined)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.call(undefined); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js deleted file mode 100644 index 10a3176db89..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-73gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(undefined)) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! f.call(undefined)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js deleted file mode 100644 index 7e2d746e3a3..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-74-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(someObject)) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { "use strict"; return this===o;}; -return f.call(o); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js deleted file mode 100644 index 27a73d67f86..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-74gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(someObject)) - * @onlyStrict - */ - -var o = {}; -function f() { "use strict"; return this===o;}; -if (! f.call(o)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js deleted file mode 100644 index fa8f4d4b082..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-75-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(globalObject)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this;}; -return f.call(fnGlobalObject()) === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js deleted file mode 100644 index 3df699177b4..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-75gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(globalObject)) - * @onlyStrict - */ - -function f() { "use strict"; return this;}; -if (f.call(fnGlobalObject()) !== fnGlobalObject()){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js deleted file mode 100644 index 7918f0dfae7..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-76-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind()()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.bind()(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js deleted file mode 100644 index f61d0e324e1..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-76gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind()()) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! (f.bind()())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js deleted file mode 100644 index fb5614dd9ab..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-77-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(null)()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===null;}; -return f.bind(null)(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js deleted file mode 100644 index 51d38c39858..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-77gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(null)()) - * @onlyStrict - */ - -function f() { "use strict"; return this===null;}; -if (! (f.bind(null)())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js deleted file mode 100644 index 3d50f279c96..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-78-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(undefined)()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.bind(undefined)(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js deleted file mode 100644 index 8d67642faf2..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-78gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(undefined)()) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! (f.bind(undefined)())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js deleted file mode 100644 index 5dace0a4593..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-79-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(someObject)()) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { "use strict"; return this===o;}; -return f.bind(o)(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js deleted file mode 100644 index a347c004a8b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-79gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(someObject)()) - * @onlyStrict - */ - -var o = {}; -function f() { "use strict"; return this===o;}; -if (! (f.bind(o)())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js deleted file mode 100644 index 23b1c05839f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-7gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within strict mode) - * @onlyStrict - */ - -"use strict"; -function f() { - return typeof this; -} -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js deleted file mode 100644 index 7d6beaa1acd..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-8-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration includes strict directive prologue) - * @onlyStrict - */ - - -function testcase() { -function f() { - "use strict"; - return typeof this; -} -return f() === "undefined"; -} -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js deleted file mode 100644 index 86951b61acc..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-80-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(globalObject)()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this;}; -return f.bind(fnGlobalObject())() === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js deleted file mode 100644 index e3ed02e6a90..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-80gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(globalObject)()) - * @onlyStrict - */ - -function f() { "use strict"; return this;}; -if (f.bind(fnGlobalObject())() !== fnGlobalObject()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js deleted file mode 100644 index 61be6b784f0..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-81-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict function declaration) - * @noStrict - */ - -function testcase() { -function f() { return this!==undefined;}; -function foo() { "use strict"; return f();} -return foo(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js deleted file mode 100644 index 0544e0cd762..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-81gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict function declaration) - * @noStrict - */ - -function f() { return this!==undefined;}; -function foo() { "use strict"; return f();} -if (! foo()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js deleted file mode 100644 index 0a2b166005e..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-82-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict eval) - * @noStrict - */ - -function testcase() { -function f() { return this!==undefined;}; -return (function () {"use strict"; return eval("f();");})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js deleted file mode 100644 index 305435eebbe..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-82gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict eval) - * @noStrict - */ - -function f() { return this!==undefined;}; -if (! ((function () {"use strict"; return eval("f();");})()) ){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js deleted file mode 100644 index f03adeff567..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-83-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function constructor) - * @noStrict - */ - -function testcase() { -fnGlobalObject().f = function() {return this!==undefined;}; -return (function () {return Function("\"use strict\";return f();")();})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js deleted file mode 100644 index dfe59d84e71..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-83gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function constructor) - * @noStrict - */ - -function f() {return this!==undefined;}; -if (! ((function () {return Function("\"use strict\";return f();")();})()) ){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js deleted file mode 100644 index 80781784629..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-84-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict new'ed Function constructor) - * @noStrict - */ - -function testcase() { -fnGlobalObject().f = function() { return this!==undefined;}; -return (function () {return new Function("\"use strict\";return f();")();})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js deleted file mode 100644 index 23a20910d82..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-84gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict new'ed Function constructor) - * @noStrict - */ - -function f() { return this!==undefined;}; -if (! ((function () {return new Function("\"use strict\";return f();")();})()) ){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js deleted file mode 100644 index abdb33b92a9..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-85-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply()) - * @noStrict - */ - -function testcase() { -function f() { return this!==undefined;}; -return (function () {"use strict"; return f.apply();})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js deleted file mode 100644 index 093115f32f3..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-85gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply()) - * @noStrict - */ - -function f() { return this!==undefined;}; -if (! ((function () {"use strict"; return f.apply();})())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js deleted file mode 100644 index fca8007f335..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-86-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(null)) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.apply(null);})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js deleted file mode 100644 index f1e23cce2b6..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-86gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(null)) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.apply(null);})())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js deleted file mode 100644 index be4505ace2b..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-87-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(undefined)) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject()}; -return (function () {"use strict"; return f.apply(undefined);})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js deleted file mode 100644 index af76c9a8bea..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-87gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(undefined)) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.apply(undefined);})())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js deleted file mode 100644 index 72c42456787..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-88-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(someObject)) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { return this===o;}; -return (function () {"use strict"; return f.apply(o);})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js deleted file mode 100644 index 8b85f6993e5..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-88gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(someObject)) - * @onlyStrict - */ - -var o = {}; -function f() { return this===o;}; -if (! ((function () {"use strict"; return f.apply(o);})())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js deleted file mode 100644 index 451851d5b55..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-89-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(globalObject)) - * @onlyStrict - */ - -function testcase() { -function f() { return this;}; -return (function () {"use strict"; return f.apply(fnGlobalObject()); })() === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js deleted file mode 100644 index 68f415a642d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-89gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(globalObject)) - * @onlyStrict - */ - -function f() { return this;}; -if ((function () {"use strict"; return f.apply(fnGlobalObject());})() !== fnGlobalObject()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js deleted file mode 100644 index 814fb7ec71d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-8gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration includes strict directive prologue) - * @onlyStrict - */ - -function f() { - "use strict"; - return typeof this; -} -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js deleted file mode 100644 index 38ca374e73c..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-9-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f = function () { - return typeof this; -} -return f() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js deleted file mode 100644 index 0b6a4b3f12d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-90-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call()) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.call(); })(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js deleted file mode 100644 index 78a91247fa3..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-90gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call()) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call();})())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js deleted file mode 100644 index 2dc4007e9a9..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-91-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(null)) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.call(null); })(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js deleted file mode 100644 index c1052a773f6..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-91gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(null)) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call(null); })())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js deleted file mode 100644 index 3a04a7b6fa9..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-92-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(undefined)) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.call(undefined);})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js deleted file mode 100644 index 4517302f35d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-92gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(undefined)) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call(undefined);})())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js deleted file mode 100644 index e8da599e75d..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-93-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(someObject)) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { return this===o;}; -return (function () {"use strict"; return f.call(o); })(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js deleted file mode 100644 index 44bd495b4f5..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-93gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(someObject)) - * @onlyStrict - */ - -var o = {}; -function f() { return this===o;}; -if (! ((function () {"use strict"; return f.call(o); })())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js deleted file mode 100644 index 655ac9e76d4..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-94-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(globalObject)) - * @onlyStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.call(fnGlobalObject());})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js deleted file mode 100644 index e752c688e93..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-94gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(globalObject)) - * @onlyStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call(fnGlobalObject());})())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js deleted file mode 100644 index db48e89d9c5..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-95-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind()()) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.bind()(); })(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js deleted file mode 100644 index 5d5fc09b802..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-95gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind()()) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind()(); })())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js deleted file mode 100644 index 3c4e652c3cd..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-96-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(null)()) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.bind(null)(); })(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js deleted file mode 100644 index cbfe417c4b4..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-96gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(null)()) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind(null)(); })())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js deleted file mode 100644 index feac73bd634..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-97-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(undefined)()) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.bind(undefined)();})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js deleted file mode 100644 index 1e79dd96e14..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-97gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(undefined)()) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind(undefined)(); })())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js deleted file mode 100644 index 1c07cafc693..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-98-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(someObject)()) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { return this===o;}; -return (function () {"use strict"; return f.bind(o)();})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js deleted file mode 100644 index c72e9dcc6f5..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-98gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(someObject)()) - * @onlyStrict - */ - -var o = {}; -function f() { return this===o;}; -if (! ((function () {"use strict"; return f.bind(o)();})())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js deleted file mode 100644 index 47b1dac4d2f..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-99-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(globalObject)()) - * @onlyStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.bind(fnGlobalObject())();})(); -} -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js deleted file mode 100644 index 5e9730d9f35..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js +++ /dev/null @@ -1,15 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-99gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(globalObject)()) - * @onlyStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind(fnGlobalObject())();})())){ - throw "'this' had incorrect value!"; -} diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js deleted file mode 100644 index 56c150c8972..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js +++ /dev/null @@ -1,18 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-9gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var f = function () { - return typeof this; -} -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js b/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js deleted file mode 100644 index ea2432219a5..00000000000 --- a/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2011 Google, Inc. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * @path ch10/10.4/10.4.3/S10.4.3_A1.js - * @description When calling a strict anonymous function as a - * function, "this" should be bound to undefined. - * @onlyStrict - */ - -"use strict"; -var that = (function() { return this; })(); -if (that !== undefined) { - $ERROR('#1: "this" leaked as: ' + that); -} - diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/browser.js b/js/src/tests/test262/ch10/10.4/10.4.3/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/shell.js b/js/src/tests/test262/ch10/10.4/10.4.3/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.4/S10.4A1.1_T2.js b/js/src/tests/test262/ch10/10.4/S10.4A1.1_T2.js deleted file mode 100644 index 080aad06abe..00000000000 --- a/js/src/tests/test262/ch10/10.4/S10.4A1.1_T2.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every function call enters a new execution context - * - * @path ch10/10.4/S10.4A1.1_T2.js - * @description Recursive function call - */ - -var y; - -function f(a){ - var x; - - if (a === 1) - return x; - else { - if(x === undefined) { - x = 0; - } else { - x = 1; - } - return f(1); - } -} - -y = f(0); - -if(!(y === undefined)){ - $ERROR("#1: Recursive function calls shares execution context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/S10.4_A1.1_T1.js b/js/src/tests/test262/ch10/10.4/S10.4_A1.1_T1.js deleted file mode 100644 index 408d5077069..00000000000 --- a/js/src/tests/test262/ch10/10.4/S10.4_A1.1_T1.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Every function call enters a new execution context - * - * @path ch10/10.4/S10.4_A1.1_T1.js - * @description Sequence of function calls - */ - -var y; - -function f(){ - var x; - - if(x === undefined) { - x = 0; - } else { - x = 1; - } - - return x; -} - -y = f(); -y = f(); - -if(!(y === 0)){ - $ERROR("#1: Sequenced function calls shares execution context"); -} - diff --git a/js/src/tests/test262/ch10/10.4/browser.js b/js/src/tests/test262/ch10/10.4/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.4/shell.js b/js/src/tests/test262/ch10/10.4/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.5/10.5-1-s.js b/js/src/tests/test262/ch10/10.5/10.5-1-s.js deleted file mode 100644 index fc841a5e40a..00000000000 --- a/js/src/tests/test262/ch10/10.5/10.5-1-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-1-s.js - * @description Strict Mode - arguments object is immutable - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - (function fun() { - eval("arguments = 10"); - })(30); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/10.5-1gs.js b/js/src/tests/test262/ch10/10.5/10.5-1gs.js deleted file mode 100644 index aafbeb3339e..00000000000 --- a/js/src/tests/test262/ch10/10.5/10.5-1gs.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.5/10.5-1gs.js - * @description Strict Mode - arguments cannot be assigned to in a strict function - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; - -function f_10_5_1_gs(){ - arguments = 7; -} - diff --git a/js/src/tests/test262/ch10/10.5/10.5-7-b-1-s.js b/js/src/tests/test262/ch10/10.5/10.5-7-b-1-s.js deleted file mode 100644 index e1855c7c66e..00000000000 --- a/js/src/tests/test262/ch10/10.5/10.5-7-b-1-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-7-b-1-s.js - * @description Strict Mode - arguments object is immutable in eval'ed functions - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("(function _10_5_7_b_1_fun() { arguments = 10;} ());"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/10.5-7-b-2-s.js b/js/src/tests/test262/ch10/10.5/10.5-7-b-2-s.js deleted file mode 100644 index 47820009e16..00000000000 --- a/js/src/tests/test262/ch10/10.5/10.5-7-b-2-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-7-b-2-s.js - * @description Strict Mode - arguments object index assignment is allowed - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - function _10_5_7_b_2_fun() { - arguments[7] = 12; - return arguments[7] === 12; - }; - - return _10_5_7_b_2_fun(30); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/10.5-7-b-3-s.js b/js/src/tests/test262/ch10/10.5/10.5-7-b-3-s.js deleted file mode 100644 index 4f4a66dcd68..00000000000 --- a/js/src/tests/test262/ch10/10.5/10.5-7-b-3-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-7-b-3-s.js - * @description Strict Mode - Adding property to the arguments object successful under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - function _10_5_7_b_3_fun() { - arguments[1] = 12; - return arguments[0] = 30 && arguments[1] === 12; - }; - - return _10_5_7_b_3_fun(30); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/10.5-7-b-4-s.js b/js/src/tests/test262/ch10/10.5/10.5-7-b-4-s.js deleted file mode 100644 index c695446b41e..00000000000 --- a/js/src/tests/test262/ch10/10.5/10.5-7-b-4-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-7-b-4-s.js - * @description Strict Mode - Deleting property of the arguments object successful under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - function _10_5_7_b_4_fun() { - var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12; - delete arguments[1]; - var _10_5_7_b_4_2 = arguments[0] === 30 && typeof arguments[1] === "undefined"; - return _10_5_7_b_4_1 && _10_5_7_b_4_2; - }; - return _10_5_7_b_4_fun(30, 12); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.5/browser.js b/js/src/tests/test262/ch10/10.5/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.5/shell.js b/js/src/tests/test262/ch10/10.5/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1-s.js deleted file mode 100644 index dcc3c49f904..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1-s.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-10-c-ii-1-s.js - * @description arguments[i] remains same after changing actual parameters in strict mode - * @onlyStrict - */ - - -function testcase() { - function foo(a,b,c) - { - 'use strict'; - a = 1; b = 'str'; c = 2.1; - return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1); - } - return foo(10, 'sss', 1); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1.js b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1.js deleted file mode 100644 index f0db64ee245..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-1.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-10-c-ii-1.js - * @description arguments[i] change with actual parameters - */ - - -function testcase() { - function foo(a,b,c) - { - a = 1; b = 'str'; c = 2.1; - if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1) - return true; - } - return foo(10,'sss',1); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2-s.js b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2-s.js deleted file mode 100644 index 58143f84167..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2-s.js +++ /dev/null @@ -1,23 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-10-c-ii-2-s.js - * @description arguments[i] doesn't map to actual parameters in strict mode - * @onlyStrict - */ - - -function testcase() { - - function foo(a,b,c) - { - 'use strict'; - arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; - return 10 === a && 'sss' === b && 1 === c; - } - return foo(10,'sss',1); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2.js b/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2.js deleted file mode 100644 index 5891dfe3b2c..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-10-c-ii-2.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-10-c-ii-2.js - * @description arguments[i] map to actual parameter - */ - - -function testcase() { - - function foo(a,b,c) - { - arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; - if(1 === a && 'str' === b && 2.1 === c) - return true; - } - return foo(10,'sss',1); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-11-b-1.js b/js/src/tests/test262/ch10/10.6/10.6-11-b-1.js deleted file mode 100644 index bcf937d63ae..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-11-b-1.js +++ /dev/null @@ -1,54 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-11-b-1.js - * @description Arguments Object has index property '0' as its own property, it shoulde be writable, enumerable, configurable and does not invoke the setter defined on Object.prototype[0] (Step 11.b) - */ - - -function testcase() { - try { - var data = "data"; - var getFunc = function () { - return data; - }; - - var setFunc = function (value) { - data = value; - }; - - Object.defineProperty(Object.prototype, "0", { - get: getFunc, - set: setFunc, - configurable: true - }); - - var argObj = (function () { return arguments })(1); - - var verifyValue = false; - verifyValue = (argObj[0] === 1); - - var verifyEnumerable = false; - for (var p in argObj) { - if (p === "0" && argObj.hasOwnProperty("0")) { - verifyEnumerable = true; - } - } - - var verifyWritable = false; - argObj[0] = 1001; - verifyWritable = (argObj[0] === 1001); - - var verifyConfigurable = false; - delete argObj[0]; - verifyConfigurable = argObj.hasOwnProperty("0"); - - return verifyValue && verifyWritable && verifyEnumerable && !verifyConfigurable && data === "data"; - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-12-1.js b/js/src/tests/test262/ch10/10.6/10.6-12-1.js deleted file mode 100644 index 12746eb1ed4..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-12-1.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-12-1.js - * @description Accessing callee property of Arguments object is allowed - */ - - -function testcase() { - try - { - arguments.callee; - return true; - } - catch (e) { - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-12-2.js b/js/src/tests/test262/ch10/10.6/10.6-12-2.js deleted file mode 100644 index 11a1793f41e..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-12-2.js +++ /dev/null @@ -1,22 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-12-2.js - * @description arguments.callee has correct attributes - */ - - -function testcase() { - - var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); - if(desc.configurable === true && - desc.enumerable === false && - desc.writable === true && - desc.hasOwnProperty('get') == false && - desc.hasOwnProperty('put') == false) - return true; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-1.js b/js/src/tests/test262/ch10/10.6/10.6-13-1.js deleted file mode 100644 index d871a9ccba0..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-1.js +++ /dev/null @@ -1,21 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-1.js - * @description Accessing caller property of Arguments object is allowed - */ - - -function testcase() { - try - { - arguments.caller; - return true; - } - catch (e) { - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-a-1.js b/js/src/tests/test262/ch10/10.6/10.6-13-a-1.js deleted file mode 100644 index a7b3f2ee6a9..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-a-1.js +++ /dev/null @@ -1,45 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-a-1.js - * @description In non-strict mode, arguments object should have its own 'callee' property defined (Step 13.a) - */ - - -function testcase() { - try { - Object.defineProperty(Object.prototype, "callee", { - value: 1, - writable: false, - configurable: true - }); - - var argObj = (function () { return arguments })(); - - var verifyValue = false; - verifyValue = typeof argObj.callee === "function"; - - var verifyWritable = false; - argObj.callee = 1001; - verifyWritable = (argObj.callee === 1001); - - var verifyEnumerable = false; - for (var p in argObj) { - if (p === "callee" && argObj.hasOwnProperty("callee")) { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete argObj.callee; - verifyConfigurable = argObj.hasOwnProperty("callee"); - - return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable; - } finally { - delete Object.prototype.callee; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-a-2.js b/js/src/tests/test262/ch10/10.6/10.6-13-a-2.js deleted file mode 100644 index b681712589f..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-a-2.js +++ /dev/null @@ -1,35 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-a-2.js - * @description A direct call to arguments.callee.caller should work - */ - - -function testcase() { - var called = false; - - function test1(flag) { - if (flag!==true) { - test2(); - } else { - called = true; - } - } - - function test2() { - if(arguments.callee.caller===undefined) { - called=true; // Extension not supported - fake it - } else { - arguments.callee.caller(true); - } - } - - test1(); - return called; -} - -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-a-3.js b/js/src/tests/test262/ch10/10.6/10.6-13-a-3.js deleted file mode 100644 index ddd03a68c49..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-a-3.js +++ /dev/null @@ -1,36 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-a-3.js - * @description An indirect call to arguments.callee.caller should work - */ - - -function testcase() { - var called = false; - - function test1(flag) { - if (flag!==true) { - test2(); - } else { - called = true; - } - } - - function test2() { - if (arguments.callee.caller===undefined) { - called = true; //Extension not supported - fake it - } else { - var explicit = arguments.callee.caller; - explicit(true); - } - } - - test1(); - return called; -} - -runTestCase(testcase); \ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-b-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-b-1-s.js deleted file mode 100644 index d44b475afd3..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-b-1-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-b-1-s.js - * @description Accessing caller property of Arguments object throws TypeError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - try - { - arguments.caller; - } - catch (e) { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-b-2-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-b-2-s.js deleted file mode 100644 index 0f1b2b76446..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-b-2-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-b-2-s.js - * @description arguments.caller exists in strict mode - * @onlyStrict - */ - - -function testcase() { - - 'use strict'; - var desc = Object.getOwnPropertyDescriptor(arguments,"caller"); - return desc!== undefined; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-b-3-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-b-3-s.js deleted file mode 100644 index d85e084f16b..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-b-3-s.js +++ /dev/null @@ -1,26 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-b-3-s.js - * @description arguments.caller is non-configurable in strict mode - * @onlyStrict - */ - - -function testcase() { - - 'use strict'; - var desc = Object.getOwnPropertyDescriptor(arguments,"caller"); - - return (desc.configurable === false && - desc.enumerable === false && - desc.hasOwnProperty('value') == false && - desc.hasOwnProperty('writable') == false && - desc.hasOwnProperty('get') == true && - desc.hasOwnProperty('set') == true); - - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-c-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-c-1-s.js deleted file mode 100644 index f17a9b37bb9..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-c-1-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-c-1-s.js - * @description Accessing callee property of Arguments object throws TypeError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - try - { - arguments.callee; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-c-2-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-c-2-s.js deleted file mode 100644 index e08e7700312..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-c-2-s.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-c-2-s.js - * @description arguments.callee is exists in strict mode - * @onlyStrict - */ - - -function testcase() { - - 'use strict'; - var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); - return desc !== undefined; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-13-c-3-s.js b/js/src/tests/test262/ch10/10.6/10.6-13-c-3-s.js deleted file mode 100644 index 8122932bd82..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-13-c-3-s.js +++ /dev/null @@ -1,24 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-c-3-s.js - * @description arguments.callee is non-configurable in strict mode - * @onlyStrict - */ - - -function testcase() { - - 'use strict'; - var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); - return (desc.configurable === false && - desc.enumerable === false && - desc.hasOwnProperty('value') == false && - desc.hasOwnProperty('writable') == false && - desc.hasOwnProperty('get') == true && - desc.hasOwnProperty('set') == true); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-1-s.js deleted file mode 100644 index aebc6fa1c68..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-14-1-s.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-1-s.js - * @description Strict Mode - 'callee' exists and 'caller' exists under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var argObj = function () { - return arguments; - } (); - return argObj.hasOwnProperty("callee") && argObj.hasOwnProperty("caller"); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-b-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-b-1-s.js deleted file mode 100644 index 51cbfff4dbe..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-14-b-1-s.js +++ /dev/null @@ -1,28 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-b-1-s.js - * @description Strict Mode - [[Enumerable]] attribute value in 'caller' is false under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var argObj = function () { - return arguments; - } (); - - var verifyEnumerable = false; - for (var _10_6_14_b_1 in argObj) { - if (argObj.hasOwnProperty(_10_6_14_b_1) && _10_6_14_b_1 === "caller") { - verifyEnumerable = true; - } - } - return !verifyEnumerable && argObj.hasOwnProperty("caller"); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-b-4-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-b-4-s.js deleted file mode 100644 index 748c630a9e3..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-14-b-4-s.js +++ /dev/null @@ -1,27 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-b-4-s.js - * @description Strict Mode - TypeError is thrown when accessing the [[Set]] attribute in 'caller' under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var argObj = function () { - return arguments; - } (); - - try { - argObj.caller = {}; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-c-1-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-c-1-s.js deleted file mode 100644 index cade0a5377d..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-14-c-1-s.js +++ /dev/null @@ -1,28 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-c-1-s.js - * @description Strict Mode - [[Enumerable]] attribute value in 'callee' is false under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var argObj = function () { - return arguments; - } (); - - var verifyEnumerable = false; - for (var _10_6_14_c_1 in argObj) { - if (argObj.hasOwnProperty(_10_6_14_c_1) && _10_6_14_c_1 === "callee") { - verifyEnumerable = true; - } - } - return !verifyEnumerable && argObj.hasOwnProperty("callee"); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-14-c-4-s.js b/js/src/tests/test262/ch10/10.6/10.6-14-c-4-s.js deleted file mode 100644 index 1238570c4fb..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-14-c-4-s.js +++ /dev/null @@ -1,27 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-c-4-s.js - * @description Strict Mode - TypeError is thrown when accessing the [[Set]] attribute in 'callee' under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var argObj = function () { - return arguments; - } (); - - try { - argObj.callee = {}; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-1gs.js b/js/src/tests/test262/ch10/10.6/10.6-1gs.js deleted file mode 100644 index f77fd3c57e1..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-1gs.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.6/10.6-1gs.js - * @description Strict Mode - arguments.callee cannot be accessed in a strict function, but does not throw an early error - * @onlyStrict - */ - -"use strict"; -function f_10_6_1_gs(){ - return arguments.callee; -} - diff --git a/js/src/tests/test262/ch10/10.6/10.6-2gs.js b/js/src/tests/test262/ch10/10.6/10.6-2gs.js deleted file mode 100644 index e13cc02f5ce..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-2gs.js +++ /dev/null @@ -1,19 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.6/10.6-2gs.js - * @description Strict Mode - arguments.callee cannot be accessed in a strict function - * @onlyStrict - * @negative . - */ - -"use strict"; -function f_10_6_1_gs(){ - return arguments.callee; -} -f_10_6_1_gs(); - diff --git a/js/src/tests/test262/ch10/10.6/10.6-5-1.js b/js/src/tests/test262/ch10/10.6/10.6-5-1.js deleted file mode 100644 index f058239fe9d..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-5-1.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-5-1.js - * @description [[Prototype]] property of Arguments is set to Object prototype object - */ - - -function testcase() { - if(Object.getPrototypeOf(arguments) === Object.getPrototypeOf({})) - return true; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-6-1.js b/js/src/tests/test262/ch10/10.6/10.6-6-1.js deleted file mode 100644 index d0ec15e2732..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-6-1.js +++ /dev/null @@ -1,17 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-6-1.js - * @description 'length property of arguments object exists - */ - - -function testcase() { - - var desc = Object.getOwnPropertyDescriptor(arguments,"length"); - return desc !== undefined - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-6-2.js b/js/src/tests/test262/ch10/10.6/10.6-6-2.js deleted file mode 100644 index afad35fd027..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-6-2.js +++ /dev/null @@ -1,20 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-6-2.js - * @description 'length' property of arguments object has correct attributes - */ - - -function testcase() { - - var desc = Object.getOwnPropertyDescriptor(arguments,"length"); - if(desc.configurable === true && - desc.enumerable === false && - desc.writable === true ) - return true; - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-6-3.js b/js/src/tests/test262/ch10/10.6/10.6-6-3.js deleted file mode 100644 index e7838e8a41b..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-6-3.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-6-3.js - * @description 'length' property of arguments object for 0 argument function exists - */ - - -function testcase() { - var arguments= undefined; - return (function () {return arguments.length !== undefined})(); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-6-4.js b/js/src/tests/test262/ch10/10.6/10.6-6-4.js deleted file mode 100644 index 6a3a77b2329..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-6-4.js +++ /dev/null @@ -1,16 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-6-4.js - * @description 'length' property of arguments object for 0 argument function call is 0 even with formal parameters - */ - - -function testcase() { - var arguments= undefined; - return (function (a,b,c) {return arguments.length === 0})(); - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/10.6-7-1.js b/js/src/tests/test262/ch10/10.6/10.6-7-1.js deleted file mode 100644 index 30fd4f373a7..00000000000 --- a/js/src/tests/test262/ch10/10.6/10.6-7-1.js +++ /dev/null @@ -1,53 +0,0 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-7-1.js - * @description Arguments Object has length as its own property and does not invoke the setter defined on Object.prototype.length (Step 7) - */ - - -function testcase() { - try { - var data = "data"; - var getFunc = function () { - return 12; - }; - - var setFunc = function (value) { - data = value; - }; - - Object.defineProperty(Object.prototype, "length", { - get: getFunc, - set: setFunc, - configurable: true - }); - - var verifyValue = false; - var argObj = (function () { return arguments })(); - verifyValue = (argObj.length === 0); - - var verifyWritable = false; - argObj.length = 1001; - verifyWritable = (argObj.length === 1001); - - var verifyEnumerable = false; - for (var p in argObj) { - if (p === "length") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete argObj.length; - verifyConfigurable = argObj.hasOwnProperty("length"); - - return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable && data === "data"; - } finally { - delete Object.prototype.length; - } - } -runTestCase(testcase); diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A1.js b/js/src/tests/test262/ch10/10.6/S10.6_A1.js deleted file mode 100644 index 89df9c4dd3c..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A1.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * When control enters an execution context for function code, - * an arguments object is created and initialised - * - * @path ch10/10.6/S10.6_A1.js - * @description Executing function which uses arguments object - */ - -//CHECK#1 -function f1(){ - return arguments; -} - -try{ - var x = f1(); -} -catch(e){ - $ERROR("#1: arguments doesn't exists"); -} - -//CHECK#2 -var f2 = function(){ - return arguments; -} - -try{ - var x = f2(); -} -catch(e){ - $ERROR("#2: arguments doesn't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A2.js b/js/src/tests/test262/ch10/10.6/S10.6_A2.js deleted file mode 100644 index 18698be004f..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A2.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The value of the internal [[Prototype]] property of the - * created arguments object is the original Object prototype object, the one - * that is the initial value of Object.prototype - * - * @path ch10/10.6/S10.6_A2.js - * @description Checking arguments.constructor.prototype===Object.prototype - */ - -//CHECK#1 -function f1(){ - return arguments.constructor.prototype; -} -try{ - if(f1() !== Object.prototype){ - $ERROR('#1: arguments.constructor.prototype === Object.prototype'); - } -} -catch(e){ - $ERROR("#1: arguments doesn't exists"); -} - -//CHECK#2 -var f2 = function(){return arguments.constructor.prototype;}; -try{ - if(f2() !== Object.prototype){ - $ERROR('#2: arguments.constructor.prototype === Object.prototype'); - } -} -catch(e){ - $ERROR("#2: arguments doesn't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js b/js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js deleted file mode 100644 index 234d6ad1aeb..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A3_T1.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * A property is created with name callee with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A3_T1.js - * @description Checking existence of arguments.callee property - */ - -//CHECK#1 -function f1(){ - return arguments.hasOwnProperty("callee"); -} -try{ - if(f1() !== true){ - $ERROR("#1: arguments object doesn't contains property 'callee'"); - } -} -catch(e){ - $ERROR("#1: arguments object doesn't exists"); -} - -//CHECK#2 -var f2 = function(){return arguments.hasOwnProperty("callee");}; -try{ - if(f2() !== true){ - $ERROR("#2: arguments object doesn't contains property 'callee'"); - } -} -catch(e){ - $ERROR("#2: arguments object doesn't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js b/js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js deleted file mode 100644 index 327e5cf3650..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A3_T2.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * A property is created with name callee with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A3_T2.js - * @description Checking if enumerating the arguments.callee property fails - */ - -//CHECK#1 -function f1(){ - for(var x in arguments){ - if (x === "callee"){ - return false; - } - } - return true; -} - -try{ - if(!f1()){ - $ERROR("#1: A property callee don't have attribute { DontEnum }"); - } -} -catch(e){ - $ERROR("#1: arguments object don't exists"); -} - -//CHECK#2 -var f2 = function(){ - for(var x in arguments){ - if (x === "callee"){ - return false; - } - } - return true; -} - -try{ - if(!f2()){ - $ERROR("#2: A property callee don't have attribute { DontEnum }"); - } -} -catch(e){ - $ERROR("#2: arguments object don't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js b/js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js deleted file mode 100644 index 4b262657024..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A3_T3.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * A property is created with name callee with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A3_T3.js - * @description Checking if deleting arguments.callee property fails - * @noStrict - */ - -//CHECK#1 -function f1(){ - return (delete arguments.callee); -} - -try{ - if(!f1()){ - $ERROR("#1: A property callee have attribute { DontDelete }"); - } -} -catch(e){ - $ERROR("#1: arguments object don't exists"); -} - -//CHECK#2 -var f2 = function(){ - return (delete arguments.callee); -} - -try{ - if(!f2()){ - $ERROR("#2: A property callee have attribute { DontDelete }"); - } -} -catch(e){ - $ERROR("#2: arguments object don't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js b/js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js deleted file mode 100644 index c83983507d1..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A3_T4.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * A property is created with name callee with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A3_T4.js - * @description Overriding arguments.callee property - * @noStrict - */ - -var str = "something different"; -//CHECK#1 -function f1(){ - arguments.callee = str; - return arguments; -} - -try{ - if(f1().callee !== str){ - $ERROR("#1: A property callee have attribute { ReadOnly }"); - } -} -catch(e){ - $ERROR("#1: arguments object don't exists"); -} - -//CHECK#2 -var f2 = function(){ - arguments.callee = str; - return arguments; - } -try{ - if(f2().callee !== str){ - $ERROR("#2: A property callee have attribute { ReadOnly }"); - } -} -catch(e){ - $ERROR("#2: arguments object don't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A4.js b/js/src/tests/test262/ch10/10.6/S10.6_A4.js deleted file mode 100644 index b49902a45e3..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A4.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The initial value of the created property callee is the - * Function object being executed - * - * @path ch10/10.6/S10.6_A4.js - * @description Checking that arguments.callee === function object - * @noStrict - */ - -//CHECK#1 -function f1(){ - return arguments.callee; -} - -try{ - if(f1 !== f1()){ - $ERROR('#1: arguments.callee === f1'); - } -} -catch(e){ - $ERROR("#1: arguments object doesn't exists"); -} - -//CHECK#2 -var f2 = function(){return arguments.callee;}; - -try{ - if(f2 !== f2()){ - $ERROR('#2: arguments.callee === f2'); - } -} -catch(e){ - $ERROR("#1: arguments object doesn't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js b/js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js deleted file mode 100644 index a76e58d47bd..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A5_T1.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * A property is created with name length with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A5_T1.js - * @description Checking existence of arguments.length property - */ - -//CHECK#1 -function f1(){ - return arguments.hasOwnProperty("length"); -} -try{ - if(f1() !== true){ - $ERROR("#1: arguments object doesn't contains property 'length'"); - } -} -catch(e){ - $ERROR("#1: arguments object doesn't exists"); -} - -//CHECK#2 -var f2 = function(){return arguments.hasOwnProperty("length");}; -try{ - if(f2() !== true){ - $ERROR("#2: arguments object doesn't contains property 'length'"); - } -} -catch(e){ - $ERROR("#2: arguments object doesn't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js b/js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js deleted file mode 100644 index a0f4df7a9ea..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A5_T2.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * A property is created with name length with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A5_T2.js - * @description Checking if enumerating the arguments.length property fails - */ - -//CHECK#1 -function f1(){ - for(var x in arguments){ - if (x === "length"){ - return false; - } - } - return true; -} - -try{ - if(!f1()){ - $ERROR("#1: A property length don't have attribute { DontEnum }"); - } -} -catch(e){ - $ERROR("#1: arguments object don't exists"); -} - -//CHECK#2 -var f2 = function(){ - for(var x in arguments){ - if (x === "length"){ - return false; - } - } - return true; -} - -try{ - if(!f2()){ - $ERROR("#2: A property length don't have attribute { DontEnum }"); - } -} -catch(e){ - $ERROR("#2: arguments object don't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js b/js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js deleted file mode 100644 index c8187fac853..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A5_T3.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * A property is created with name length with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A5_T3.js - * @description Checking if deleting arguments.length property fails - */ - -//CHECK#1 -function f1(){ - return (delete arguments.length); -} - -try{ - if(!f1()){ - $ERROR("#1: A property length have attribute { DontDelete }"); - } -} -catch(e){ - $ERROR("#1: arguments object don't exists"); -} - -//CHECK#2 -var f2 = function(){ - return (delete arguments.length); -} - -try{ - if(!f2()){ - $ERROR("#2: A property length have attribute { DontDelete }"); - } -} -catch(e){ - $ERROR("#2: arguments object don't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js b/js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js deleted file mode 100644 index 7178bf4240a..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * A property is created with name length with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A5_T4.js - * @description Overriding arguments.length property - */ - -var str = "something different"; -//CHECK#1 -function f1(){ - arguments.length = str; - return arguments; -} - -try{ - if(f1().length !== str){ - $ERROR("#1: A property length have attribute { ReadOnly }"); - } -} -catch(e){ - $ERROR("#1: arguments object don't exists"); -} - -//CHECK#2 -var f2 = function(){ - arguments.length = str; - return arguments; - }; -try{ - if(f2().length !== str){ - $ERROR("#2: A property length have attribute { ReadOnly }"); - } -} -catch(e){ - $ERROR("#2: arguments object don't exists"); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A6.js b/js/src/tests/test262/ch10/10.6/S10.6_A6.js deleted file mode 100644 index 3f1d0d1c1dd..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A6.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * The initial value of the created property length is the number - * of actual parameter values supplied by the caller - * - * @path ch10/10.6/S10.6_A6.js - * @description Create function, that returned arguments.length - */ - -function f1(){ - return arguments.length; -} - -//CHECK#1 -if(!(f1() === 0)){ - $ERROR('#1: argument.length === 0'); -} - -//CHECK#2 -if(!(f1(0) === 1)){ - $ERROR('#2: argument.length === 1'); -} - -//CHECK#3 -if(!(f1(0, 1) === 2)){ - $ERROR('#3: argument.length === 2'); -} - -//CHECK#4 -if(!(f1(0, 1, 2) === 3)){ - $ERROR('#4: argument.length === 3'); -} - -//CHECK#5 -if(!(f1(0, 1, 2, 3) === 4)){ - $ERROR('#5: argument.length === 4'); -} - -var f2 = function(){return arguments.length;}; - -//CHECK#6 -if(!(f2() === 0)){ - $ERROR('#6: argument.length === 0'); -} - -//CHECK#7 -if(!(f2(0) === 1)){ - $ERROR('#7: argument.length === 1'); -} - -//CHECK#8 -if(!(f2(0, 1) === 2)){ - $ERROR('#8: argument.length === 2'); -} - -//CHECK#9 -if(!(f2(0, 1, 2) === 3)){ - $ERROR('#9: argument.length === 3'); -} - -//CHECK#10 -if(!(f2(0, 1, 2, 3) === 4)){ - $ERROR('#10: argument.length === 4'); -} - diff --git a/js/src/tests/test262/ch10/10.6/S10.6_A7.js b/js/src/tests/test262/ch10/10.6/S10.6_A7.js deleted file mode 100644 index f013ba01336..00000000000 --- a/js/src/tests/test262/ch10/10.6/S10.6_A7.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/** - * Get arguments of function - * - * @path ch10/10.6/S10.6_A7.js - * @description Use property arguments - */ - -function f1() { - return arguments; -} - -//CHECK#1-5 -for(var i = 1; i < 5; i++){ -if (f1(1,2,3,4,5)[i] !== (i+1)) - $ERROR("#"+i+": Returning function's arguments work wrong, f1(1,2,3,4,5)["+i+"] !== "+(i+1)); -} - diff --git a/js/src/tests/test262/ch10/10.6/browser.js b/js/src/tests/test262/ch10/10.6/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/10.6/shell.js b/js/src/tests/test262/ch10/10.6/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/browser.js b/js/src/tests/test262/ch10/browser.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/ch10/shell.js b/js/src/tests/test262/ch10/shell.js deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/js/src/tests/test262/shell.js b/js/src/tests/test262/shell.js index 696171bb633..4f1af7fb5d8 100644 --- a/js/src/tests/test262/shell.js +++ b/js/src/tests/test262/shell.js @@ -1,904 +1,3 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -//----------------------------------------------------------------------------- -function compareArray(aExpected, aActual) { - if (aActual.length != aExpected.length) { - return false; - } - - aExpected.sort(); - aActual.sort(); - - var s; - for (var i = 0; i < aExpected.length; i++) { - if (aActual[i] !== aExpected[i]) { - return false; - } - } - return true; -} - -//----------------------------------------------------------------------------- -function arrayContains(arr, expected) { - var found; - for (var i = 0; i < expected.length; i++) { - found = false; - for (var j = 0; j < arr.length; j++) { - if (expected[i] === arr[j]) { - found = true; - break; - } - } - if (!found) { - return false; - } - } - return true; -} - -//----------------------------------------------------------------------------- -var supportsArrayIndexGettersOnArrays = undefined; -function fnSupportsArrayIndexGettersOnArrays() { - if (typeof supportsArrayIndexGettersOnArrays !== "undefined") { - return supportsArrayIndexGettersOnArrays; - } - - supportsArrayIndexGettersOnArrays = false; - - if (fnExists(Object.defineProperty)) { - var arr = []; - Object.defineProperty(arr, "0", { - get: function() { - supportsArrayIndexGettersOnArrays = true; - return 0; - } - }); - var res = arr[0]; - } - - return supportsArrayIndexGettersOnArrays; -} - -//----------------------------------------------------------------------------- -var supportsArrayIndexGettersOnObjects = undefined; -function fnSupportsArrayIndexGettersOnObjects() { - if (typeof supportsArrayIndexGettersOnObjects !== "undefined") - return supportsArrayIndexGettersOnObjects; - - supportsArrayIndexGettersOnObjects = false; - - if (fnExists(Object.defineProperty)) { - var obj = {}; - Object.defineProperty(obj, "0", { - get: function() { - supportsArrayIndexGettersOnObjects = true; - return 0; - } - }); - var res = obj[0]; - } - - return supportsArrayIndexGettersOnObjects; -} - -//----------------------------------------------------------------------------- -function ConvertToFileUrl(pathStr) { - return "file:" + pathStr.replace(/\\/g, "/"); -} - -//----------------------------------------------------------------------------- -function fnExists(/*arguments*/) { - for (var i = 0; i < arguments.length; i++) { - if (typeof (arguments[i]) !== "function") return false; - } - return true; -} - -//----------------------------------------------------------------------------- -var __globalObject = Function("return this;")(); -function fnGlobalObject() { - return __globalObject; -} - -//----------------------------------------------------------------------------- -function fnSupportsStrict() { - "use strict"; - try { - eval('with ({}) {}'); - return false; - } catch (e) { - return true; - } -} - -//----------------------------------------------------------------------------- -//Verify all attributes specified data property of given object: -//value, writable, enumerable, configurable -//If all attribute values are expected, return true, otherwise, return false -function dataPropertyAttributesAreCorrect(obj, - name, - value, - writable, - enumerable, - configurable) { - var attributesCorrect = true; - - if (obj[name] !== value) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof value === "number" && - isNaN(value)) { - // keep empty - } else { - attributesCorrect = false; - } - } - - try { - if (obj[name] === "oldValue") { - obj[name] = "newValue"; - } else { - obj[name] = "OldValue"; - } - } catch (we) { - } - - var overwrited = false; - if (obj[name] !== value) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof value === "number" && - isNaN(value)) { - // keep empty - } else { - overwrited = true; - } - } - if (overwrited !== writable) { - attributesCorrect = false; - } - - var enumerated = false; - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && prop === name) { - enumerated = true; - } - } - - if (enumerated !== enumerable) { - attributesCorrect = false; - } - - - var deleted = false; - - try { - delete obj[name]; - } catch (de) { - } - if (!obj.hasOwnProperty(name)) { - deleted = true; - } - if (deleted !== configurable) { - attributesCorrect = false; - } - - return attributesCorrect; -} - -//----------------------------------------------------------------------------- -//Verify all attributes specified accessor property of given object: -//get, set, enumerable, configurable -//If all attribute values are expected, return true, otherwise, return false -function accessorPropertyAttributesAreCorrect(obj, - name, - get, - set, - setVerifyHelpProp, - enumerable, - configurable) { - var attributesCorrect = true; - - if (get !== undefined) { - if (obj[name] !== get()) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof get() === "number" && - isNaN(get())) { - // keep empty - } else { - attributesCorrect = false; - } - } - } else { - if (obj[name] !== undefined) { - attributesCorrect = false; - } - } - - try { - var desc = Object.getOwnPropertyDescriptor(obj, name); - if (typeof desc.set === "undefined") { - if (typeof set !== "undefined") { - attributesCorrect = false; - } - } else { - obj[name] = "toBeSetValue"; - if (obj[setVerifyHelpProp] !== "toBeSetValue") { - attributesCorrect = false; - } - } - } catch (se) { - throw se; - } - - - var enumerated = false; - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && prop === name) { - enumerated = true; - } - } - - if (enumerated !== enumerable) { - attributesCorrect = false; - } - - - var deleted = false; - try { - delete obj[name]; - } catch (de) { - throw de; - } - if (!obj.hasOwnProperty(name)) { - deleted = true; - } - if (deleted !== configurable) { - attributesCorrect = false; - } - - return attributesCorrect; -} - -//----------------------------------------------------------------------------- -var NotEarlyErrorString = "NotEarlyError"; -var EarlyErrorRePat = "^((?!" + NotEarlyErrorString + ").)*$"; -var NotEarlyError = new Error(NotEarlyErrorString); - -//----------------------------------------------------------------------------- -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function Test262Error(message) { - if (message) this.message = message; -} - -Test262Error.prototype.toString = function () { - return "Test262 Error: " + this.message; -}; - -function testFailed(message) { - throw new Test262Error(message); -} - - -function testPrint(message) { - -} - - -//adaptors for Test262 framework -function $PRINT(message) { - -} - -function $INCLUDE(message) { } -function $ERROR(message) { - testFailed(message); -} - -function $FAIL(message) { - testFailed(message); -} - - - -//Sputnik library definitions -//Ultimately these should be namespaced some how and only made -//available to tests that explicitly include them. -//For now, we just define the globally - -//math_precision.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function getPrecision(num) { - //TODO: Create a table of prec's, - // because using Math for testing Math isn't that correct. - - var log2num = Math.log(Math.abs(num)) / Math.LN2; - var pernum = Math.ceil(log2num); - return (2 * Math.pow(2, -52 + pernum)); - //return(0); -} - - -//math_isequal.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -var prec; -function isEqual(num1, num2) { - if ((num1 === Infinity) && (num2 === Infinity)) { - return (true); - } - if ((num1 === -Infinity) && (num2 === -Infinity)) { - return (true); - } - prec = getPrecision(Math.min(Math.abs(num1), Math.abs(num2))); - return (Math.abs(num1 - num2) <= prec); - //return(num1 === num2); -} - -//numeric_conversion.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function ToInteger(p) { - var x = Number(p); - - if (isNaN(x)) { - return +0; - } - - if ((x === +0) - || (x === -0) - || (x === Number.POSITIVE_INFINITY) - || (x === Number.NEGATIVE_INFINITY)) { - return x; - } - - var sign = (x < 0) ? -1 : 1; - - return (sign * Math.floor(Math.abs(x))); -} - -//Date_constants.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -var HoursPerDay = 24; -var MinutesPerHour = 60; -var SecondsPerMinute = 60; - -var msPerDay = 86400000; -var msPerSecond = 1000; -var msPerMinute = 60000; -var msPerHour = 3600000; - -var date_1899_end = -2208988800001; -var date_1900_start = -2208988800000; -var date_1969_end = -1; -var date_1970_start = 0; -var date_1999_end = 946684799999; -var date_2000_start = 946684800000; -var date_2099_end = 4102444799999; -var date_2100_start = 4102444800000; - -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -//the following values are normally generated by the sputnik.py driver -var $LocalTZ, - $DST_start_month, - $DST_start_sunday, - $DST_start_hour, - $DST_start_minutes, - $DST_end_month, - $DST_end_sunday, - $DST_end_hour, - $DST_end_minutes; - -(function () { - /** - * Finds the first date, starting from |start|, where |predicate| - * holds. - */ - var findNearestDateBefore = function(start, predicate) { - var current = start; - var month = 1000 * 60 * 60 * 24 * 30; - for (var step = month; step > 0; step = Math.floor(step / 3)) { - if (!predicate(current)) { - while (!predicate(current)) - current = new Date(current.getTime() + step); - current = new Date(current.getTime() - step); - } - } - while (!predicate(current)) { - current = new Date(current.getTime() + 1); - } - return current; - }; - - var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0); - var decemberDate = new Date(2000, 11, 20, 0, 0, 0, 0); - var juneOffset = juneDate.getTimezoneOffset(); - var decemberOffset = decemberDate.getTimezoneOffset(); - var isSouthernHemisphere = (juneOffset > decemberOffset); - var winterTime = isSouthernHemisphere ? juneDate : decemberDate; - var summerTime = isSouthernHemisphere ? decemberDate : juneDate; - - var dstStart = findNearestDateBefore(winterTime, function (date) { - return date.getTimezoneOffset() == summerTime.getTimezoneOffset(); - }); - $DST_start_month = dstStart.getMonth(); - $DST_start_sunday = dstStart.getDate() > 15 ? '"last"' : '"first"'; - $DST_start_hour = dstStart.getHours(); - $DST_start_minutes = dstStart.getMinutes(); - - var dstEnd = findNearestDateBefore(summerTime, function (date) { - return date.getTimezoneOffset() == winterTime.getTimezoneOffset(); - }); - $DST_end_month = dstEnd.getMonth(); - $DST_end_sunday = dstEnd.getDate() > 15 ? '"last"' : '"first"'; - $DST_end_hour = dstEnd.getHours(); - $DST_end_minutes = dstEnd.getMinutes(); - - return; -})(); - - -//Date.library.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -//15.9.1.2 Day Number and Time within Day -function Day(t) { - return Math.floor(t/msPerDay); -} - -function TimeWithinDay(t) { - return t%msPerDay; -} - -//15.9.1.3 Year Number -function DaysInYear(y){ - if(y%4 != 0) return 365; - if(y%4 == 0 && y%100 != 0) return 366; - if(y%100 == 0 && y%400 != 0) return 365; - if(y%400 == 0) return 366; -} - -function DayFromYear(y) { - return (365*(y-1970) - + Math.floor((y-1969)/4) - - Math.floor((y-1901)/100) - + Math.floor((y-1601)/400)); -} - -function TimeFromYear(y){ - return msPerDay*DayFromYear(y); -} - -function YearFromTime(t) { - t = Number(t); - var sign = ( t < 0 ) ? -1 : 1; - var year = ( sign < 0 ) ? 1969 : 1970; - - for(var time = 0;;year += sign){ - time = TimeFromYear(year); - - if(sign > 0 && time > t){ - year -= sign; - break; - } - else if(sign < 0 && time <= t){ - break; - } - }; - return year; -} - -function InLeapYear(t){ - if(DaysInYear(YearFromTime(t)) == 365) - return 0; - - if(DaysInYear(YearFromTime(t)) == 366) - return 1; -} - -function DayWithinYear(t) { - return Day(t)-DayFromYear(YearFromTime(t)); -} - -//15.9.1.4 Month Number -function MonthFromTime(t){ - var day = DayWithinYear(t); - var leap = InLeapYear(t); - - if((0 <= day) && (day < 31)) return 0; - if((31 <= day) && (day < (59+leap))) return 1; - if(((59+leap) <= day) && (day < (90+leap))) return 2; - if(((90+leap) <= day) && (day < (120+leap))) return 3; - if(((120+leap) <= day) && (day < (151+leap))) return 4; - if(((151+leap) <= day) && (day < (181+leap))) return 5; - if(((181+leap) <= day) && (day < (212+leap))) return 6; - if(((212+leap) <= day) && (day < (243+leap))) return 7; - if(((243+leap) <= day) && (day < (273+leap))) return 8; - if(((273+leap) <= day) && (day < (304+leap))) return 9; - if(((304+leap) <= day) && (day < (334+leap))) return 10; - if(((334+leap) <= day) && (day < (365+leap))) return 11; -} - -//15.9.1.5 Date Number -function DateFromTime(t) { - var day = DayWithinYear(t); - var month = MonthFromTime(t); - var leap = InLeapYear(t); - - if(month == 0) return day+1; - if(month == 1) return day-30; - if(month == 2) return day-58-leap; - if(month == 3) return day-89-leap; - if(month == 4) return day-119-leap; - if(month == 5) return day-150-leap; - if(month == 6) return day-180-leap; - if(month == 7) return day-211-leap; - if(month == 8) return day-242-leap; - if(month == 9) return day-272-leap; - if(month == 10) return day-303-leap; - if(month == 11) return day-333-leap; -} - -//15.9.1.6 Week Day -function WeekDay(t) { - var weekday = (Day(t)+4)%7; - return (weekday < 0 ? 7+weekday : weekday); -} - -//15.9.1.9 Daylight Saving Time Adjustment -$LocalTZ = (new Date()).getTimezoneOffset() / -60; -if (DaylightSavingTA((new Date()).valueOf()) !== 0) { - $LocalTZ -= 1; -} -var LocalTZA = $LocalTZ*msPerHour; - -function DaysInMonth(m, leap) { - m = m%12; - - //April, June, Sept, Nov - if(m == 3 || m == 5 || m == 8 || m == 10 ) { - return 30; - } - - //Jan, March, May, July, Aug, Oct, Dec - if(m == 0 || m == 2 || m == 4 || m == 6 || m == 7 || m == 9 || m == 11){ - return 31; - } - - //Feb - return 28+leap; -} - -function GetSundayInMonth(t, m, count){ - var year = YearFromTime(t); - var tempDate; - - if (count==='"first"') { - for (var d=1; d <= DaysInMonth(m, InLeapYear(t)); d++) { - tempDate = new Date(year, m, d); - if (tempDate.getDay()===0) { - return tempDate.valueOf(); - } - } - } else if(count==='"last"') { - for (var d=DaysInMonth(m, InLeapYear(t)); d>0; d--) { - tempDate = new Date(year, m, d); - if (tempDate.getDay()===0) { - return tempDate.valueOf(); - } - } - } - throw new Error("Unsupported 'count' arg:" + count); -} -/* -function GetSundayInMonth(t, m, count){ - var year = YearFromTime(t); - var leap = InLeapYear(t); - var day = 0; - - if(m >= 1) day += DaysInMonth(0, leap); - if(m >= 2) day += DaysInMonth(1, leap); - if(m >= 3) day += DaysInMonth(2, leap); - if(m >= 4) day += DaysInMonth(3, leap); - if(m >= 5) day += DaysInMonth(4, leap); - if(m >= 6) day += DaysInMonth(5, leap); - if(m >= 7) day += DaysInMonth(6, leap); - if(m >= 8) day += DaysInMonth(7, leap); - if(m >= 9) day += DaysInMonth(8, leap); - if(m >= 10) day += DaysInMonth(9, leap); - if(m >= 11) day += DaysInMonth(10, leap); - - var month_start = TimeFromYear(year)+day*msPerDay; - var sunday = 0; - - if(count === "last"){ - for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay; - WeekDay(last_sunday)>0; - last_sunday -= msPerDay - ){}; - sunday = last_sunday; - } - else { - for(var first_sunday = month_start; - WeekDay(first_sunday)>0; - first_sunday += msPerDay - ){}; - sunday = first_sunday+7*msPerDay*(count-1); - } - - return sunday; -}*/ - -function DaylightSavingTA(t) { -// t = t-LocalTZA; - - var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) + - $DST_start_hour*msPerHour + - $DST_start_minutes*msPerMinute; - - var k = new Date(DST_start); - - var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) + - $DST_end_hour*msPerHour + - $DST_end_minutes*msPerMinute; - - if ( t >= DST_start && t < DST_end ) { - return msPerHour; - } else { - return 0; - } -} - -//15.9.1.9 Local Time -function LocalTime(t){ - return t+LocalTZA+DaylightSavingTA(t); -} - -function UTC(t) { - return t-LocalTZA-DaylightSavingTA(t-LocalTZA); -} - -//15.9.1.10 Hours, Minutes, Second, and Milliseconds -function HourFromTime(t){ - return Math.floor(t/msPerHour)%HoursPerDay; -} - -function MinFromTime(t){ - return Math.floor(t/msPerMinute)%MinutesPerHour; -} - -function SecFromTime(t){ - return Math.floor(t/msPerSecond)%SecondsPerMinute; -} - -function msFromTime(t){ - return t%msPerSecond; -} - -//15.9.1.11 MakeTime (hour, min, sec, ms) -function MakeTime(hour, min, sec, ms){ - if ( !isFinite(hour) || !isFinite(min) || !isFinite(sec) || !isFinite(ms)) { - return Number.NaN; - } - - hour = ToInteger(hour); - min = ToInteger(min); - sec = ToInteger(sec); - ms = ToInteger(ms); - - return ((hour*msPerHour) + (min*msPerMinute) + (sec*msPerSecond) + ms); -} - -//15.9.1.12 MakeDay (year, month, date) -function MakeDay(year, month, date) { - if ( !isFinite(year) || !isFinite(month) || !isFinite(date)) { - return Number.NaN; - } - - year = ToInteger(year); - month = ToInteger(month); - date = ToInteger(date ); - - var result5 = year + Math.floor(month/12); - var result6 = month%12; - - var sign = ( year < 1970 ) ? -1 : 1; - var t = ( year < 1970 ) ? 1 : 0; - var y = ( year < 1970 ) ? 1969 : 1970; - - if( sign == -1 ){ - for ( y = 1969; y >= year; y += sign ) { - t += sign * DaysInYear(y)*msPerDay; - } - } else { - for ( y = 1970 ; y < year; y += sign ) { - t += sign * DaysInYear(y)*msPerDay; - } - } - - var leap = 0; - for ( var m = 0; m < month; m++ ) { - //if year is changed, than we need to recalculate leep - leap = InLeapYear(t); - t += DaysInMonth(m, leap)*msPerDay; - } - - if ( YearFromTime(t) != result5 ) { - return Number.NaN; - } - if ( MonthFromTime(t) != result6 ) { - return Number.NaN; - } - if ( DateFromTime(t) != 1 ) { - return Number.NaN; - } - - return Day(t)+date-1; -} - -//15.9.1.13 MakeDate (day, time) -function MakeDate( day, time ) { - if(!isFinite(day) || !isFinite(time)) { - return Number.NaN; - } - - return day*msPerDay+time; -} - -//15.9.1.14 TimeClip (time) -function TimeClip(time) { - if(!isFinite(time) || Math.abs(time) > 8.64e15){ - return Number.NaN; - } - - return ToInteger(time); -} - -//Test Functions -//ConstructDate is considered deprecated, and should not be used directly from -//test262 tests as it's incredibly sensitive to DST start/end dates that -//vary with geographic location. -function ConstructDate(year, month, date, hours, minutes, seconds, ms){ - /* - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date); else use 1 - * 4. If hours is supplied use ToNumber(hours); else use 0 - * 5. If minutes is supplied use ToNumber(minutes); else use 0 - * 6. If seconds is supplied use ToNumber(seconds); else use 0 - * 7. If ms is supplied use ToNumber(ms); else use 0 - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to TimeClip(UTC(Result(11))) - */ - var r1 = Number(year); - var r2 = Number(month); - var r3 = ((date && arguments.length > 2) ? Number(date) : 1); - var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0); - var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0); - var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0); - var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0); - - var r8 = r1; - - if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99)) - r8 = 1900+r1; - - var r9 = MakeDay(r8, r2, r3); - var r10 = MakeTime(r4, r5, r6, r7); - var r11 = MakeDate(r9, r10); - - var retVal = TimeClip(UTC(r11)); - return retVal; -} - - - -/**** Python code for initialize the above constants -// We may want to replicate the following in JavaScript. -// However, using JS date operations to generate parameters that are then used to -// test those some date operations seems unsound. However, it isn't clear if there -//is a good interoperable alternative. - -# Copyright 2009 the Sputnik authors. All rights reserved. -# This code is governed by the BSD license found in the LICENSE file. - -def GetDaylightSavingsTimes(): -# Is the given floating-point time in DST? -def IsDst(t): -return time.localtime(t)[-1] -# Binary search to find an interval between the two times no greater than -# delta where DST switches, returning the midpoint. -def FindBetween(start, end, delta): -while end - start > delta: -middle = (end + start) / 2 -if IsDst(middle) == IsDst(start): -start = middle -else: -end = middle -return (start + end) / 2 -now = time.time() -one_month = (30 * 24 * 60 * 60) -# First find a date with different daylight savings. To avoid corner cases -# we try four months before and after today. -after = now + 4 * one_month -before = now - 4 * one_month -if IsDst(now) == IsDst(before) and IsDst(now) == IsDst(after): -logger.warning("Was unable to determine DST info.") -return None -# Determine when the change occurs between now and the date we just found -# in a different DST. -if IsDst(now) != IsDst(before): -first = FindBetween(before, now, 1) -else: -first = FindBetween(now, after, 1) -# Determine when the change occurs between three and nine months from the -# first. -second = FindBetween(first + 3 * one_month, first + 9 * one_month, 1) -# Find out which switch is into and which if out of DST -if IsDst(first - 1) and not IsDst(first + 1): -start = second -end = first -else: -start = first -end = second -return (start, end) - - -def GetDaylightSavingsAttribs(): -times = GetDaylightSavingsTimes() -if not times: -return None -(start, end) = times -def DstMonth(t): -return time.localtime(t)[1] - 1 -def DstHour(t): -return time.localtime(t - 1)[3] + 1 -def DstSunday(t): -if time.localtime(t)[2] > 15: -return "'last'" -else: -return "'first'" -def DstMinutes(t): -return (time.localtime(t - 1)[4] + 1) % 60 -attribs = { } -attribs['start_month'] = DstMonth(start) -attribs['end_month'] = DstMonth(end) -attribs['start_sunday'] = DstSunday(start) -attribs['end_sunday'] = DstSunday(end) -attribs['start_hour'] = DstHour(start) -attribs['end_hour'] = DstHour(end) -attribs['start_minutes'] = DstMinutes(start) -attribs['end_minutes'] = DstMinutes(end) -return attribs - -*********/ - -//--Test case registration----------------------------------------------------- -function runTestCase(testcase) { - if (testcase() !== true) { - $ERROR("Test case returned non-true value!"); - } -} /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ diff --git a/js/src/tests/update-test262.sh b/js/src/tests/update-test262.sh index 75ba1a48b66..23fa0af047a 100755 --- a/js/src/tests/update-test262.sh +++ b/js/src/tests/update-test262.sh @@ -9,51 +9,27 @@ set -e # Updates the jstests copy of the test cases of Test262, the conformance test # suite for ECMA-262 and ECMA-402, ECMAScript and its Internationalization API. -function usage() -{ - echo "Usage: update-test262.sh [clone | copy]" - echo "" - echo "The URL will most commonly be http://hg.ecmascript.org/tests/test262/ " - echo "but may also be a local clone. Don't use a local clone when generating" - echo "the final import patch"\!" test262/HG-INFO will record the wrong URL" - echo "if you do so. Local cloning is only useful when editing this script to" - echo "import a larger test262 subset." - echo "" - echo "If a local clone is specified, the optional clone/copy argument will" - echo "either clone into a temporary directory, or directly copy from the" - echo "clone's checkout. 'clone' semantics are the default." - exit 1 -} - if [ $# -lt 1 ]; then - usage -elif [ $# -eq 1 -o "$2" == "clone" ]; then - # Beware! 'copy' support requires that the clone performed here *never* be - # altered. If it were altered, those changes wouldn't appear in the final - # set of changes as determined by the 'copy' path below. - - # Mercurial doesn't have a way to download just a part of a repository, or to - # just get the working copy - we have to clone the entire thing. We use a - # temporary test262 directory for that. - unique_dir=`mktemp -d /tmp/test262.XXXX` || exit 1 - tmp_dir=${unique_dir}/test262 - - # Remove the temporary test262 directory on exit. - function cleanupTempFiles() - { - rm -rf ${unique_dir} - } - trap cleanupTempFiles EXIT - - echo "Feel free to get some coffee - this could take a few minutes..." - hg clone $1 ${tmp_dir} -elif [ "$2" == "copy" ]; then - echo "Copying directly from $1; be sure this repository is updated to tip"\! - tmp_dir="$1" -else - usage + echo "Usage: update-test262.sh " + exit 1 fi +# Mercurial doesn't have a way to download just a part of a repository, or to +# just get the working copy - we have to clone the entire thing. We use a +# temporary test262 directory for that. +unique_dir=`mktemp -d /tmp/test262.XXXX` || exit 1 +tmp_dir=${unique_dir}/test262 + +# Remove the temporary test262 directory on exit. +function cleanupTempFiles() +{ + rm -rf ${unique_dir} +} +trap cleanupTempFiles EXIT + +echo "Feel free to get some coffee - this could take a few minutes..." +hg clone $1 ${tmp_dir} + # Now to the actual test262 directory. js_src_tests_dir=`dirname $0` test262_dir=${js_src_tests_dir}/test262 @@ -80,7 +56,6 @@ cp ${tmp_dir}/LICENSE ${test262_dir} # ...we instead individually import folders whose tests we pass. (Well, mostly # pass -- see the comment at the end of this script.) cp -r ${tmp_dir}/test/suite/ch06 ${test262_dir}/ch06 -cp -r ${tmp_dir}/test/suite/ch10 ${test262_dir}/ch10 # The test402 tests are in test/suite/intl402/. For now there are no # "bestPractice" tests to omit. The remaining tests are in chNN directories, @@ -92,7 +67,6 @@ mkdir ${test262_dir}/intl402 cp -r ${tmp_dir}/test/suite/intl402/ch* ${test262_dir}/intl402 # Copy over harness supporting files needed by the test402 tests. -cp ${tmp_dir}/test/harness/sta.js ${js_src_tests_dir}/supporting/ cp ${tmp_dir}/test/harness/testBuiltInObject.js ${js_src_tests_dir}/supporting/ cp ${tmp_dir}/test/harness/testIntl.js ${js_src_tests_dir}/supporting/ @@ -103,9 +77,9 @@ for dir in `find ${test262_dir} ${test262_dir}/ch* ${test262_dir}/intl402/ch* -t touch $dir/shell.js done -# Construct the test262 tests' jstests adapter files. +# Restore the test262 tests' jstests adapter files. cp ${js_src_tests_dir}/supporting/test262-browser.js ${test262_dir}/browser.js -cat ${js_src_tests_dir}/supporting/sta.js ${js_src_tests_dir}/supporting/test262-shell.js > ${test262_dir}/shell.js +cp ${js_src_tests_dir}/supporting/test262-shell.js ${test262_dir}/shell.js # Restore the Intl tests' jstests adapter files. cp ${js_src_tests_dir}/supporting/test402-browser.js ${test262_dir}/intl402/browser.js diff --git a/js/src/tests/update-test402.sh b/js/src/tests/update-test402.sh new file mode 100644 index 00000000000..29e9d2a9b82 --- /dev/null +++ b/js/src/tests/update-test402.sh @@ -0,0 +1,69 @@ +#!/bin/sh +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# Updates the jstests copy of the test cases of Test402, the conformance test +# suite for standard ECMA-402, ECMAScript Internationalization API +# Specification. + +# Usage: update-test402.sh +# E.g.: update-test402.sh http://hg.ecmascript.org/tests/test262/ +# Note that test402 is part of the test262 repository. + +# Abort when an error occurs. +set -e + +if [ $# -lt 1 ]; then + echo "Usage: update-test402.sh " + exit 1 +fi + +# Test402 in its original form uses the harness of Test262, the conformance +# test suite for standard ECMA-262, ECMAScript Language Specification, and its +# test cases are part of the test262 repository. +# Mercurial doesn't have a way to download just a part of a repository, or to +# just get the working copy - we have to clone the entire thing. We use a +# temporary test262 directory for that. +tmp_dir=`mktemp -d /tmp/test402.XXXX`/test262 || exit 1 +echo "Feel free to get some coffee - this could take a few minutes..." +hg clone $1 ${tmp_dir} + +# Now to the actual test402 directory. +test402_dir=`dirname $0`/test402 +rm -rf ${test402_dir} +mkdir ${test402_dir} +mkdir ${test402_dir}/lib + +# Copy over the test402 tests, the supporting JavaScript library files, and +# the license. +cp -r ${tmp_dir}/test/suite/intl402/ch* ${test402_dir} +cp ${tmp_dir}/test/harness/testBuiltInObject.js ${test402_dir}/lib +cp ${tmp_dir}/test/harness/testIntl.js ${test402_dir}/lib +cp ${tmp_dir}/LICENSE ${test402_dir} + +# Create empty browser.js and shell.js in each test directory to keep +# jstests happy. +for dir in `find test402/ch* -type d -print` ; do + touch $dir/browser.js + touch $dir/shell.js +done + +# Restore our own jstests adapter files. +cp supporting/test402-browser.js test402/browser.js +cp supporting/test402-shell.js test402/shell.js + +# Keep a record of what we imported. +echo "URL: $1" > ${test402_dir}/HG-INFO +hg -R ${tmp_dir} log -r. >> ${test402_dir}/HG-INFO + +# Update for the patch. +hg addremove ${test402_dir} + +# Get rid of the Test262 clone. +rm -rf ${tmp_dir} + +# The alert reader may now be wondering: what about test402 tests we don't +# currently pass? We disable such tests in js/src/tests/jstests.list, one by +# one. This has the moderate benefit that if a bug is fixed, only that one file +# must be updated, and we don't have to rerun this script. From 4fe433eb5b3e559bcb6d484f1025b20fee0d1bd7 Mon Sep 17 00:00:00 2001 From: Markus Flaig Date: Tue, 4 Jun 2013 15:43:27 -0400 Subject: [PATCH 18/23] Bug 875297 - Move the contents of the initialize method into the constructor of the search-textbox binding. r=mconley --- browser/components/search/content/search.xml | 161 +++++++++---------- 1 file changed, 78 insertions(+), 83 deletions(-) diff --git a/browser/components/search/content/search.xml b/browser/components/search/content/search.xml index 9a5296b915c..324ae0aedca 100644 --- a/browser/components/search/content/search.xml +++ b/browser/components/search/content/search.xml @@ -539,11 +539,88 @@ extends="chrome://global/content/bindings/autocomplete.xml#autocomplete"> - - - - - + #endif #ifdef MOZ_WEBRTC From 446e740f2f7ad76f8f5455e5f866218b1cbd0eb3 Mon Sep 17 00:00:00 2001 From: Nikhil Marathe Date: Tue, 4 Jun 2013 13:30:03 -0700 Subject: [PATCH 21/23] Bug 867868 - Implement nsITimer based alarms in HAL fallback. r=jlebar --- hal/fallback/FallbackAlarm.cpp | 56 ++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/hal/fallback/FallbackAlarm.cpp b/hal/fallback/FallbackAlarm.cpp index 0ccc6140d43..006fdc29b9c 100644 --- a/hal/fallback/FallbackAlarm.cpp +++ b/hal/fallback/FallbackAlarm.cpp @@ -4,24 +4,76 @@ #include "Hal.h" +#include + +#include + +#include "mozilla/ClearOnShutdown.h" +#include "mozilla/StaticPtr.h" +#include "nsThreadUtils.h" + namespace mozilla { namespace hal_impl { +static void +TimerCallbackFunc(nsITimer *aTimer, void *aClosure) +{ + hal::NotifyAlarmFired(); +} + +static StaticRefPtr sTimer; + bool EnableAlarm() { - return false; + static bool initialized = false; + if (!initialized) { + initialized = true; + ClearOnShutdown(&sTimer); + } + + nsCOMPtr timer = do_CreateInstance("@mozilla.org/timer;1"); + sTimer = timer; + MOZ_ASSERT(sTimer); + return true; } void DisableAlarm() { + /* + * DisableAlarm() may be called after sTimer has been set to null by + * ClearOnShutdown(). + */ + if (sTimer) { + sTimer->Cancel(); + } } bool SetAlarm(int32_t aSeconds, int32_t aNanoseconds) { - return false; + if (!sTimer) { + HAL_LOG(("We should have enabled the alarm")); + MOZ_ASSERT(false); + return false; + } + + // Do the math to convert aSeconds and aNanoseconds into milliseconds since + // the epoch. + int64_t milliseconds = static_cast(aSeconds) * 1000 + + static_cast(aNanoseconds) / 1000000; + + // nsITimer expects relative milliseconds. + int64_t relMilliseconds = milliseconds - PR_Now() / 1000; + + // If the alarm time is in the past relative to PR_Now(), + // we choose to immediately fire the alarm. Passing 0 means nsITimer will + // queue a timeout event immediately. + sTimer->InitWithFuncCallback(TimerCallbackFunc, nullptr, + clamped(relMilliseconds, 0, INT32_MAX), + nsITimer::TYPE_ONE_SHOT); + return true; } } // hal_impl From 1c58ac8302a5d409144208b6678e7c43aaf854d4 Mon Sep 17 00:00:00 2001 From: Nikhil Marathe Date: Tue, 4 Jun 2013 13:30:06 -0700 Subject: [PATCH 22/23] Bug 867868 - Alarms tests. r=jlebar --- hal/Makefile.in | 6 ++ hal/moz.build | 1 + hal/tests/Makefile.in | 18 ++++ hal/tests/browser_alarms.js | 187 ++++++++++++++++++++++++++++++++++++ hal/tests/moz.build | 3 + 5 files changed, 215 insertions(+) create mode 100644 hal/tests/Makefile.in create mode 100644 hal/tests/browser_alarms.js create mode 100644 hal/tests/moz.build diff --git a/hal/Makefile.in b/hal/Makefile.in index 7d3b8d44399..7d6fd4d4a66 100644 --- a/hal/Makefile.in +++ b/hal/Makefile.in @@ -17,6 +17,8 @@ VPATH = \ $(srcdir)/cocoa \ $(NULL) +relativesrcdir = @relativesrcdir@ + include $(DEPTH)/config/autoconf.mk LIBRARY_NAME = hal_s @@ -25,6 +27,10 @@ LIBXUL_LIBRARY = 1 EXPORT_LIBRARY = 1 FAIL_ON_WARNINGS = 1 +MOCHITEST_BROWSER_FILES += \ + tests/browser_alarms.js \ + $(NULL) + ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) CMMSRCS += \ CocoaSensor.mm \ diff --git a/hal/moz.build b/hal/moz.build index 4c47584ec55..6ebc069421e 100644 --- a/hal/moz.build +++ b/hal/moz.build @@ -19,6 +19,7 @@ EXPORTS.mozilla += [ 'HalWakeLock.h', ] +TEST_DIRS += ['tests'] CPP_SOURCES += [ 'Hal.cpp', 'HalWakeLock.cpp', diff --git a/hal/tests/Makefile.in b/hal/tests/Makefile.in new file mode 100644 index 00000000000..9243c8a21f9 --- /dev/null +++ b/hal/tests/Makefile.in @@ -0,0 +1,18 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +DEPTH = @DEPTH@ +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = @relativesrcdir@ + +include $(DEPTH)/config/autoconf.mk + +MOCHITEST_BROWSER_FILES = \ + browser_alarms.js \ + $(NULL) + +include $(topsrcdir)/config/rules.mk + diff --git a/hal/tests/browser_alarms.js b/hal/tests/browser_alarms.js new file mode 100644 index 00000000000..fa0bcfc3200 --- /dev/null +++ b/hal/tests/browser_alarms.js @@ -0,0 +1,187 @@ +XPCOMUtils.defineLazyModuleGetter(this, "AlarmService", + "resource://gre/modules/AlarmService.jsm"); + +/* + * Tests for Bug 867868 and related Alarm API bugs. + * + * NOTE: These tests pass the alarm time to AlarmService as a number and not as + * a date. See bug 810973 about Date truncating milliseconds. AlarmService does + * not officially allow a integer, but nor does it disallow it. Of course this + * test will break if AlarmService adds a type check, hence this note. + * FIXME: when bug 810973 is fixed. + */ + +function add_alarm_future(cb) { + let alarmId = undefined; + AlarmService.add({ + date: Date.now() + 143, + ignoreTimezone: true + }, + function onAlarmFired(aAlarm) { + ok(alarmId === aAlarm.id, "Future alarm fired successfully."); + cb(); + }, + function onSuccess(aAlarmId) { + alarmId = aAlarmId; + }, + function onError(error) { + ok(false, "Unexpected error adding future alarm " + error); + cb(); + }); +} + +function add_alarm_present(cb) { + let self = this; + let alarmId = undefined; + AlarmService.add({ + date: Date.now(), + ignoreTimezone: true + }, + function onAlarmFired(aAlarm) { + ok(alarmId === aAlarm.id, "Present alarm fired successfully."); + cb(); + }, + function onSuccess(aAlarmId) { + alarmId = aAlarmId; + }, function onError(error) { + ok(false, "Unexpected error adding alarm for current time " + error); + cb(); + }); +} + +function add_alarm_past(cb) { + let self = this; + let alarmId = undefined; + AlarmService.add({ + date: Date.now() - 5, + ignoreTimezone: true + }, + function onAlarmFired(aAlarm) { + ok(alarmId === aAlarm.id, "Past alarm fired successfully."); + cb(); + }, + function onSuccess(aAlarmId) { + alarmId = aAlarmId; + }, + function onError(error) { + ok(false, "Unexpected error adding alarm for time in the past " + error); + cb(); + }); +} + +function trigger_all_alarms(cb) { + let n = 10; + let counter = 0; + let date = Date.now() + 57; + function onAlarmFired() { + counter++; + info("trigger_all_alarms count " + counter); + if (counter == n) { + ok(true, "All " + n + " alarms set to a particular time fired."); + cb(); + } + } + + for (let i = 0; i < n; i++) { + AlarmService.add( + { + date: date, + ignoreTimezone: true + }, + onAlarmFired + ); + } +} + +function multiple_handlers(cb) { + let d = Date.now() + 100; + let called = 0; + + function done() { + if (called == 2) { + ok(true, "Two alarms for the same time fired."); + cb(); + } + } + + function handler1() { + called++; + done(); + } + + function handler2() { + called++; + done(); + } + + AlarmService.add( + { + date: d, + ignoreTimezone: true + }, + handler1 + ); + AlarmService.add( + { + date: d, + ignoreTimezone: true + }, + handler2 + ); +} + +function same_time_alarms(cb) { + var fired = 0; + var delay = Date.now() + 100; + + function check() { + fired++; + if (fired == 4) { + ok(true, "All alarms set for the same time fired."); + cb(); + } + } + + function addImmediateAlarm() { + fired++; + AlarmService.add({ + date: delay, + ignoreTimezone: true + }, check); + } + + AlarmService.add({ + date: delay, + ignoreTimezone: true + }, addImmediateAlarm); + + AlarmService.add({ + date: delay, + ignoreTimezone: true + }, addImmediateAlarm); +} + +function test() { + var tests = [ + add_alarm_future, + add_alarm_present, + add_alarm_past, + trigger_all_alarms, + multiple_handlers, + same_time_alarms + ] + + var testIndex = -1; + function nextTest() { + testIndex++; + if (testIndex >= tests.length) + return; + + waitForExplicitFinish(); + tests[testIndex](function() { + finish(); + nextTest(); + }); + } + nextTest(); +} diff --git a/hal/tests/moz.build b/hal/tests/moz.build new file mode 100644 index 00000000000..6fbe8159b2d --- /dev/null +++ b/hal/tests/moz.build @@ -0,0 +1,3 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. From 2b401cac9b0a176e393a814ac8a0f32de1d20453 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 4 Jun 2013 23:14:24 +0200 Subject: [PATCH 23/23] Backout c0213576a3b7 and 780d65e3ebfa (bug 874984) because it was slowing down HTML rendering --- b2g/chrome/content/content.css | 175 +++++++++++++++---------------- layout/reftests/svg/reftest.list | 2 +- 2 files changed, 88 insertions(+), 89 deletions(-) diff --git a/b2g/chrome/content/content.css b/b2g/chrome/content/content.css index fccae58983a..f42ca3e81c4 100644 --- a/b2g/chrome/content/content.css +++ b/b2g/chrome/content/content.css @@ -61,7 +61,6 @@ xul|scrollbarbutton[sbattr="scrollbar-bottom-top"] { } xul|thumb { - -moz-appearance: none !important; background-color: rgba(0, 0, 0, 0.4) !important; -moz-border-top-colors: none !important; -moz-border-bottom-colors: none !important; @@ -76,30 +75,30 @@ xul|thumb { -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#touchControls"); } -html select:not([size]):not([multiple]) > xul|scrollbar, -html select[size="1"] > xul|scrollbar, -html select:not([size]):not([multiple]) xul|scrollbarbutton, -html select[size="1"] xul|scrollbarbutton { +select:not([size]):not([multiple]) > xul|scrollbar, +select[size="1"] > xul|scrollbar, +select:not([size]):not([multiple]) xul|scrollbarbutton, +select[size="1"] xul|scrollbarbutton { display: block; margin-left: 0; min-width: 16px; } /* Override inverse OS themes */ -html select, -html textarea, -html button, -html xul|button, -html * > input:not([type="image"]) { +select, +textarea, +button, +xul|button, +* > input:not([type="image"]) { -moz-appearance: none !important; /* See bug 598421 for fixing the platform */ border-radius: 3px; } -html select[size], -html select[multiple], -html select[size][multiple], -html textarea, -html * > input:not([type="image"]) { +select[size], +select[multiple], +select[size][multiple], +textarea, +* > input:not([type="image"]) { border-style: solid; border-color: #7d7d7d; color: #414141; @@ -107,70 +106,70 @@ html * > input:not([type="image"]) { } /* Selects are handled by the form helper, see bug 685197 */ -html select option, html select optgroup { +select option, select optgroup { pointer-events: none; } -html select:not([size]):not([multiple]), -html select[size="0"], -html select[size="1"], -html * > input[type="button"], -html * > input[type="submit"], -html * > input[type="reset"], -html button { +select:not([size]):not([multiple]), +select[size="0"], +select[size="1"], +* > input[type="button"], +* > input[type="submit"], +* > input[type="reset"], +button { border-style: solid; border-color: #7d7d7d; color: #414141; background: white linear-gradient(rgba(255,255,255,0.2) 0, rgba(215,215,215,0.5) 18px, rgba(115,115,115,0.5) 100%); } -html input[type="checkbox"] { +input[type="checkbox"] { background: white linear-gradient(rgba(115,115,115,0.5) 0, rgba(215,215,215,0.5) 2px, rgba(255,255,255,0.2) 6px); } -html input[type="radio"] { +input[type="radio"] { background: radial-gradient(at 6px 6px, rgba(255,255,255,0.2) 3px, rgba(195,195,195,0.5) 5px, rgba(115,115,115,0.5) 100%); } -html select { +select { border-width: 1px; padding: 1px; } -html select:not([size]):not([multiple]), -html select[size="0"], -html select[size="1"] { +select:not([size]):not([multiple]), +select[size="0"], +select[size="1"] { padding: 0 1px 0 1px; } -html * > input:not([type="image"]) { +* > input:not([type="image"]) { border-width: 1px; padding: 1px; } -html textarea { +textarea { resize: none; border-width: 1px; padding: 2px 1px 2px 1px; } -html input[type="button"], -html input[type="submit"], -html input[type="reset"], -html button { +input[type="button"], +input[type="submit"], +input[type="reset"], +button { border-width: 1px; padding: 0 7px 0 7px; } -html input[type="radio"], -html input[type="checkbox"] { +input[type="radio"], +input[type="checkbox"] { max-width: 14px; max-height: 14px; border: 1px solid #a7a7a7 !important; padding: 2px 1px 2px 1px; } -html select > button { +select > button { border-width: 0px !important; margin: 0px !important; padding: 0px !important; @@ -188,54 +187,54 @@ html select > button { font-size: inherit; } -html select[size]:focus, -html select[multiple]:focus, -html select[size][multiple]:focus, -html textarea:focus, -html input[type="file"]:focus > input[type="text"], -html * > input:not([type="image"]):focus { +select[size]:focus, +select[multiple]:focus, +select[size][multiple]:focus, +textarea:focus, +input[type="file"]:focus > input[type="text"], +* > input:not([type="image"]):focus { outline: 0px !important; border-style: solid; border-color: rgb(94,128,153); background: white linear-gradient(rgba(27,113,177,0.5) 0, rgba(198,225,246,0.2) 3px, rgba(255,255,255,0.2) 16px); } -html select:not([size]):not([multiple]):focus, -html select[size="0"]:focus, -html select[size="1"]:focus, -html input[type="button"]:focus, -html input[type="submit"]:focus, -html input[type="reset"]:focus, -html button:focus { +select:not([size]):not([multiple]):focus, +select[size="0"]:focus, +select[size="1"]:focus, +input[type="button"]:focus, +input[type="submit"]:focus, +input[type="reset"]:focus, +button:focus { outline: 0px !important; border-style: solid; border-color: rgb(94,128,153); background: white linear-gradient(rgba(255,255,255,0.2) 0, rgba(198,225,256,0.2) 18px, rgba(27,113,177,0.5) 100%); } -html input[type="checkbox"]:focus, -html input[type="radio"]:focus { +input[type="checkbox"]:focus, +input[type="radio"]:focus { border-color: #99c6e0 !important; } -html input[type="checkbox"]:focus { +input[type="checkbox"]:focus { background: white linear-gradient(rgba(27,113,177,0.5) 0, rgba(198,225,246,0.2) 2px, rgba(255,255,255,0.2) 6px); } -html input[type="radio"]:focus { +input[type="radio"]:focus { background: radial-gradient(at 6px 6px, rgba(255,255,255,0.2) 3px, rgba(198,225,246,0.2) 5px, rgba(27,113,177,0.5) 100%); } /* we need to be specific for selects because the above rules are specific too */ -html textarea[disabled], -html select[size][disabled], -html select[multiple][disabled], -html select[size][multiple][disabled], -html select:not([size]):not([multiple])[disabled], -html select[size="0"][disabled], -html select[size="1"][disabled], -html button[disabled], -html * > input:not([type="image"])[disabled] { +textarea[disabled], +select[size][disabled], +select[multiple][disabled], +select[size][multiple][disabled], +select:not([size]):not([multiple])[disabled], +select[size="0"][disabled], +select[size="1"][disabled], +button[disabled], +* > input:not([type="image"])[disabled] { color: rgba(0,0,0,0.3); border-color: rgba(125,125,125,0.4); border-style: solid; @@ -243,44 +242,44 @@ html * > input:not([type="image"])[disabled] { background: transparent linear-gradient(rgba(185,185,185,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(255,255,255,0.4) 100%); } -html select:not([size]):not([multiple])[disabled], -html select[size="0"][disabled], -html select[size="1"][disabled] { +select:not([size]):not([multiple])[disabled], +select[size="0"][disabled], +select[size="1"][disabled] { background: transparent linear-gradient(rgba(255,255,255,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(185,185,185,0.4) 100%); } -html input[type="button"][disabled], -html input[type="submit"][disabled], -html input[type="reset"][disabled], -html button[disabled="true"] { +input[type="button"][disabled], +input[type="submit"][disabled], +input[type="reset"][disabled], +button[disabled="true"] { padding: 0 7px 0 7px; background: transparent linear-gradient(rgba(255,255,255,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(185,185,185,0.4) 100%); } -html input[type="radio"][disabled], -html input[type="radio"][disabled]:active, -html input[type="radio"][disabled]:hover, -html input[type="radio"][disabled]:hover:active, -html input[type="checkbox"][disabled], -html input[type="checkbox"][disabled]:active, -html input[type="checkbox"][disabled]:hover, -html input[type="checkbox"][disabled]:hover:active { +input[type="radio"][disabled], +input[type="radio"][disabled]:active, +input[type="radio"][disabled]:hover, +input[type="radio"][disabled]:hover:active, +input[type="checkbox"][disabled], +input[type="checkbox"][disabled]:active, +input[type="checkbox"][disabled]:hover, +input[type="checkbox"][disabled]:hover:active { border:1px solid rgba(125,125,125,0.4) !important; } -html select[disabled] > button { +select[disabled] > button { opacity: 0.6; padding: 1px 7px 1px 7px; } -html *:-moz-any-link:active, -html *[role=button]:active, -html button:active, -html input:active, -html option:active, -html select:active, -html label:active, -html textarea:active { +*:-moz-any-link:active, +*[role=button]:active, +button:active, +input:active, +option:active, +select:active, +label:active, +textarea:active { background-color: rgba(141, 184, 216, 0.5); } diff --git a/layout/reftests/svg/reftest.list b/layout/reftests/svg/reftest.list index 04b27651a28..e5b40586b8a 100644 --- a/layout/reftests/svg/reftest.list +++ b/layout/reftests/svg/reftest.list @@ -158,7 +158,7 @@ skip-if(B2G) == filter-scaled-02.html filter-scaled-02-ref.html skip-if(B2G) == foreignObject-ancestor-style-change-01.svg foreignObject-ancestor-style-change-01-ref.svg skip-if(B2G) == foreignObject-change-transform-01.svg pass.svg == foreignObject-display-01.svg pass.svg -fails-if(B2G) == foreignObject-form-theme.svg foreignObject-form-theme-ref.html +== foreignObject-form-theme.svg foreignObject-form-theme-ref.html == foreignObject-img-form-theme.html foreignObject-img-form-theme-ref.html skip-if(B2G) == foreignObject-move-repaint-01.svg pass.svg == foreignObject-overflow-01.svg pass.svg