2001-09-25 22:53:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
1999-04-15 07:01:24 +00:00
|
|
|
|
|
|
|
#ifndef __TextEditorTest_h__
|
|
|
|
#define __TextEditorTest_h__
|
|
|
|
|
2012-07-13 06:33:42 +00:00
|
|
|
#include "nscore.h"
|
|
|
|
|
|
|
|
class nsIEditor;
|
|
|
|
class nsIPlaintextEditor;
|
2012-06-25 19:59:42 +00:00
|
|
|
#ifdef DEBUG
|
1999-04-15 07:01:24 +00:00
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
|
|
|
class TextEditorTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
void Run(nsIEditor *aEditor, int32_t *outNumTests, int32_t *outNumTestsFailed);
|
1999-04-15 07:01:24 +00:00
|
|
|
TextEditorTest();
|
|
|
|
~TextEditorTest();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
/** create an empty document */
|
|
|
|
nsresult InitDoc();
|
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
nsresult RunUnitTest(int32_t *outNumTests, int32_t *outNumTestsFailed);
|
1999-04-15 07:01:24 +00:00
|
|
|
|
|
|
|
nsresult TestInsertBreak();
|
|
|
|
|
|
|
|
nsresult TestTextProperties();
|
|
|
|
|
2000-11-17 00:25:31 +00:00
|
|
|
nsCOMPtr<nsIPlaintextEditor> mTextEditor;
|
1999-04-15 07:01:24 +00:00
|
|
|
nsCOMPtr<nsIEditor> mEditor;
|
|
|
|
};
|
|
|
|
|
2012-06-25 19:59:42 +00:00
|
|
|
#endif /* DEBUG */
|
1999-04-15 07:01:24 +00:00
|
|
|
|
1999-04-16 22:34:54 +00:00
|
|
|
#endif
|