diff -r d57b86b1867a -r dc268b18d709 kerneltest/e32test/window/t_colour.cpp --- a/kerneltest/e32test/window/t_colour.cpp Mon Sep 13 15:16:07 2010 +0100 +++ b/kerneltest/e32test/window/t_colour.cpp Wed Sep 22 10:53:45 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1996-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "Eclipse Public License v1.0" @@ -15,9 +15,26 @@ // // +#define __E32TEST_EXTENSION__ + #include #include #include +#include + +const TInt KNumColors=256; + +LOCAL_D RTest test(_L("T_COLOUR")); + +LOCAL_C void SimulateKeyPress(TStdScanCode aScanCode) + { + TRawEvent eventDown; + eventDown.Set(TRawEvent::EKeyDown, aScanCode); + UserSvr::AddEvent(eventDown); + TRawEvent eventUp; + eventUp.Set(TRawEvent::EKeyUp, aScanCode); + UserSvr::AddEvent(eventUp); + } class ColorTest { @@ -35,8 +52,10 @@ if(r!=KErrNone) { con.Write(_L("Not supported.")); + test.Printf(_L("Not supported.\r\n")); TConsoleKey key; - con.Read(key); + SimulateKeyPress(EStdKeyEnter); + con.Read(key); } else { @@ -67,20 +86,54 @@ col.Control(_L("+Max")); col.SetWindowPosAbs(TPoint(1,0)); col.Control(_L("+Vis -Cursor")); - for(TInt t=0;t<256;t++) + for(TInt t=0;t