browser/src/BrCtlApiTestContainer.cpp
author Brendan Donegan <brendand@symbian.org>
Fri, 14 May 2010 08:53:07 +0100
branchSymbian3
changeset 37 39b95dd8b504
parent 3 235c00e46fb7
permissions -rw-r--r--
Fixes for App Install and Profile Management smoke tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     1
/*
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     8
*
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    11
*
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    12
* Contributors:
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    13
*
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    14
* Description:  CBrCtlApiTestContainer from BrCtlBCTestContainer.h
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    15
*
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    16
*/
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    17
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    18
// INCLUDE FILES
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    19
#include "BrCtlApiTestContainer.h"
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    20
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    21
#include <eiklabel.h>  // for example label control
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    22
#include <aknview.h>
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    23
#include <AknGlobalConfirmationQuery.h>
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    24
#include <BrCtlInterface.h>
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    25
#include <CHARCONV.H>
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    26
#include "BrCtlApiTestObserver.h"
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    27
#include <e32std.h>
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    28
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    29
_LIT8( KContentDataType, "text/html" );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    30
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    31
// ================= MEMBER FUNCTIONS =======================
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    32
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    33
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    34
// CBrCtlApiTestContainer::ConstructL(const TRect& aRect)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    35
// EPOC two phased constructor
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    36
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    37
//
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    38
void CBrCtlApiTestContainer::ConstructL(const TRect& aRect)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    39
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    40
    iBrCtlApiTestObserver = CBrCtlApiTestObserver::NewL();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    41
    iBrCtlApiTestStateChangeObserver = CBrCtlApiTestStateChangeObserver::NewL( this );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    42
    iBrCtlDialogs = CBrowserDialogsProviderProxy::NewL();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    43
    iCommandBase = TBrCtlDefs::ECommandIdBase;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    44
    CreateWindowL();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    45
    SetRect(aRect);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    46
    ActivateL();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    47
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    48
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    49
// Destructor
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    50
CBrCtlApiTestContainer::~CBrCtlApiTestContainer()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    51
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    52
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    53
    if (iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    54
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    55
        iBrCtlInterface->RemoveLoadEventObserver(iBrCtlApiTestObserver);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    56
        iBrCtlInterface->RemoveStateChangeObserver(iBrCtlApiTestStateChangeObserver);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    57
        delete iBrCtlInterface;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    58
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    59
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    60
    delete iBrCtlApiTestStateChangeObserver;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    61
    delete iBrCtlApiTestObserver;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    62
    delete iBrCtlDialogs;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    63
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    64
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    65
void CBrCtlApiTestContainer::CancelLoad()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    66
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    67
    iCancelInitDataLoad = ETrue;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    68
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    69
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    70
TInt CBrCtlApiTestContainer::LoadPageL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    71
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    72
    if(iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    73
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    74
        iBrCtlInterface->LoadUrlL(KUrlLoadTestHtml2);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    75
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    76
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    77
     return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    78
     }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    79
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    80
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    81
// CBrCtlApiTestContainer::SizeChanged()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    82
// Called by framework when the view size is changed
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    83
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    84
//
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    85
void CBrCtlApiTestContainer::SizeChanged()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    86
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    87
    if (iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    88
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    89
        iBrCtlInterface->SetRect(Rect());
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    90
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    91
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    92
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    93
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    94
// CBrCtlApiTestContainer::CountComponentControls() const
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    95
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    96
//
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    97
TInt CBrCtlApiTestContainer::CountComponentControls() const
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    98
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
    99
    if (iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   100
        return 1;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   101
    return 0;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   102
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   103
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   104
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   105
// CBrCtlApiTestContainer::ComponentControl(TInt aIndex) const
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   106
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   107
//
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   108
CCoeControl* CBrCtlApiTestContainer::ComponentControl(TInt aIndex) const
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   109
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   110
    switch ( aIndex )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   111
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   112
        case 0:
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   113
            return iBrCtlInterface; // Could be NULL
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   114
        default:
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   115
            return NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   116
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   117
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   118
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   119
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   120
// CBrCtlApiTestContainer::Draw(const TRect& aRect) const
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   121
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   122
//
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   123
void CBrCtlApiTestContainer::Draw(const TRect& aRect) const
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   124
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   125
    CWindowGc& gc = SystemGc();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   126
    // TODO: Add your drawing code here
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   127
    // example code...
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   128
    gc.SetPenStyle(CGraphicsContext::ENullPen);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   129
    gc.SetBrushColor(KRgbGray);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   130
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   131
    gc.DrawRect(aRect);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   132
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   133
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   134
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   135
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   136
// CBrCtlApiTestContainer::HandleControlEventL(
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   137
//     CCoeControl* aControl,TCoeEvent aEventType)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   138
// ---------------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   139
//
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   140
void CBrCtlApiTestContainer::HandleControlEventL(
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   141
    CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   142
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   143
    // TODO: Add your control event handler code here
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   144
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   145
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   146
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   147
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   148
// ----------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   149
// CBrCtlApiTestContainer::HandleKeyEventL(
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   150
//     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   151
// ?implementation_description
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   152
// ----------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   153
//
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   154
TKeyResponse CBrCtlApiTestContainer::HandleKeyEventL(
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   155
    const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   156
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   157
    return EKeyWasNotConsumed;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   158
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   159
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   160
// ----------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   161
// CBrCtlApiTestContainer::HandleCommandL(TInt aCommand)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   162
// ?implementation_description
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   163
// ----------------------------------------------------
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   164
//
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   165
TInt CBrCtlApiTestContainer::HandleCommandL( TInt aCommand )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   166
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   167
    const TInt KCommandIdBase( 15000 );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   168
    iBrCtlInterface->HandleCommandL( aCommand + KCommandIdBase );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   169
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   170
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   171
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   172
TKeyResponse CBrCtlApiTestContainer::OfferKeyEventL(const TKeyEvent& /* aKeyEvent */,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   173
                        TEventCode /* aType */ )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   174
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   175
    return EKeyWasConsumed;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   176
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   177
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   178
void CBrCtlApiTestContainer::HandleCommandL( 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   179
    TBrCtlDefs::TBrCtlClientCommands /* aCommand */, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   180
    const CArrayFix<TPtrC>& /* aAttributesNames */,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   181
    const CArrayFix<TPtrC>& /* aAttributeValues */ )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   182
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   183
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   184
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   185
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   186
void CBrCtlApiTestContainer::CreateBrowserControlInterfaceL(TInt aBrCtlConfig)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   187
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   188
    TPoint base( 0, 0 );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   189
    TPoint extent( 352, 295 );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   190
    TRect rect( base, extent );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   191
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   192
    iBrCtlInterface = CreateBrowserControlL( this, rect, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   193
        aBrCtlConfig,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   194
        iCommandBase, iBrCtlApiTestObserver, iBrCtlApiTestObserver,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   195
        iBrCtlApiTestObserver, iBrCtlApiTestObserver, iBrCtlDialogs, NULL, iBrCtlApiTestObserver );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   196
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   197
    iBrCtlInterface->MakeVisible( ETrue );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   198
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   199
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   200
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   201
HBufC8* CBrCtlApiTestContainer::ReadFileLC( const TDesC& aFileName )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   202
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   203
    RFs rfs;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   204
    RFile file;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   205
    User::LeaveIfError( rfs.Connect() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   206
    CleanupClosePushL( rfs );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   207
    User::LeaveIfError( file.Open( rfs, aFileName, EFileRead ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   208
    CleanupClosePushL( file );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   209
    TInt size;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   210
    User::LeaveIfError( file.Size( size ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   211
    HBufC8* buf = HBufC8::NewLC( size );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   212
    TPtr8 bufPtr( buf->Des() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   213
    User::LeaveIfError( file.Read( bufPtr ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   214
    CleanupStack::Pop(); // buf
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   215
    CleanupStack::PopAndDestroy( 2 ); // file, rfs
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   216
    CleanupStack::PushL( buf );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   217
    return buf;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   218
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   219
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   220
TInt CBrCtlApiTestContainer::LoadDataL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   221
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   222
    HBufC8* data = ReadFileLC( KUrlLoadTestHtml );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   223
    TDataType dataType( KContentDataType() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   224
    TUid uid;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   225
    uid.iUid = KCharacterSetIdentifierIso88591;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   226
    TRAPD( err, iBrCtlInterface->LoadDataL( KUrlLoadTestHtml, *data, dataType, uid ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   227
	
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   228
    CleanupStack::PopAndDestroy( data );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   229
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   230
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   231
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   232
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   233
TInt CBrCtlApiTestContainer::ClearCacheTest()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   234
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   235
    const TUint result = iBrCtlInterface->ClearCache();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   236
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   237
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   238
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   239
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   240
TBool CBrCtlApiTestContainer::IsUrlInCacheTest( TDesC16& aUrl )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   241
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   242
    const TBool result = iBrCtlInterface->IsUrlInCache( aUrl ); // ( TDesC16 & )KUrlLoadTestHtml() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   243
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   244
    return result;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   245
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   246
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   247
TInt CBrCtlApiTestContainer::ClearItemInCacheTest()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   248
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   249
    TInt result = iBrCtlInterface->ClearItemInCache( (TDesC16 &) KUrlLoadTestHtml() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   250
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   251
    if ( ( result == KErrNotFound ) || ( result == KErrNone ) )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   252
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   253
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   254
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   255
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   256
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   257
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   258
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   259
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   260
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   261
TInt CBrCtlApiTestContainer::PageInfoLC( TBrCtlDefs::TBrCtlPageInfo aType )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   262
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   263
    iBrCtlInterface->LoadFileL( KUrlLoadTestHtml );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   264
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   265
    TRAPD( err, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   266
        HBufC* url = iBrCtlInterface->PageInfoLC( aType ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   267
        CleanupStack::PopAndDestroy( url ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   268
        )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   269
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   270
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   271
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   272
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   273
TInt CBrCtlApiTestContainer::CertInfo()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   274
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   275
    const TCertInfo* certInfo = iBrCtlInterface->CertInfo();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   276
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   277
    if ( !certInfo )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   278
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   279
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   280
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   281
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   282
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   283
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   284
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   285
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   286
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   287
TInt CBrCtlApiTestContainer::NavigationAvailableTest()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   288
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   289
    const TBool nav = iBrCtlInterface->NavigationAvailable( 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   290
        TBrCtlDefs::ENavigationBack );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   291
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   292
    if ( nav == 0 || nav == 1 )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   293
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   294
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   295
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   296
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   297
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   298
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   299
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   300
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   301
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   302
TInt CBrCtlApiTestContainer::GetBitmapData()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   303
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   304
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   305
    TRAPD( err, iBrCtlInterface->LoadUrlL(KUrlLoadTestHtml2) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   306
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   307
    //waits for browser control to load the page
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   308
    User::After(4000000);
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   309
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   310
    CGulIcon* icon = iBrCtlInterface->GetBitmapData( KUrlLoadTestHtml, TBrCtlDefs::EBitmapFavicon );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   311
    icon = iBrCtlInterface->GetBitmapData( KUrlLoadTestHtml, TBrCtlDefs::EBitmapThumbnail );	
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   312
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   313
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   314
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   315
TInt CBrCtlApiTestContainer::SaveToFileL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   316
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   317
    HBufC8* data = ReadFileLC( KUrlLoadTestHtml );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   318
    TDataType dataType( KContentDataType() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   319
    TUid uid;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   320
    uid.iUid = KCharacterSetIdentifierIso88591;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   321
    TRAPD( err, iBrCtlInterface->LoadDataL( KUrlLoadTestHtml, *data, dataType, uid ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   322
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   323
    TUint16 NoOfBytesSaved =  iBrCtlInterface->SaveToFileL( KUrlLoadTestHtml );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   324
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   325
    CleanupStack::PopAndDestroy( data ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   326
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   327
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   328
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   329
TInt CBrCtlApiTestContainer::OkToExit()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   330
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   331
    const TBool res = iBrCtlInterface->OkToExit();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   332
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   333
    if ( res )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   334
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   335
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   336
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   337
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   338
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   339
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   340
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   341
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   342
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   343
TInt CBrCtlApiTestContainer::FindKeyword( TPtrC aHtml, TPtrC aKeyword, TInt aMatch)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   344
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   345
    TRAP_IGNORE( iBrCtlInterface->LoadFileL( KUrlLoadTestHtml2 ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   346
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   347
    TInt result = iBrCtlInterface->FindKeyword( aKeyword );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   348
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   349
    if ( result == TBrCtlDefs::EFindNoMatches && aMatch == EFindNoMatchesExpected )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   350
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   351
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   352
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   353
    else if ( result == TBrCtlDefs::EFindMatch && ( aMatch == EFindMatchExpected || aMatch == EFindMoreMatchesExpected ) )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   354
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   355
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   356
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   357
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   358
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   359
        return KErrNotFound;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   360
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   361
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   362
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   363
TInt CBrCtlApiTestContainer::FindKeywordAgain( TInt aMatch )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   364
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   365
    TBrCtlDefs::TBrCtlFindResponse result = iBrCtlInterface->FindKeywordAgain( ETrue );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   366
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   367
    if ( result == TBrCtlDefs::EFindNoMatches && ( aMatch == EFindNoMatchesExpected || aMatch == EFindMatchExpected ) )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   368
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   369
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   370
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   371
    else if ( result == TBrCtlDefs::EFindMatch && aMatch == EFindMoreMatchesExpected )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   372
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   373
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   374
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   375
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   376
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   377
        return KErrNotFound;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   378
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   379
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   380
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   381
TInt CBrCtlApiTestContainer::SetFocus()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   382
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   383
    iBrCtlInterface->SetFocus( ETrue, EDrawNow );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   384
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   385
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   386
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   387
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   388
TInt CBrCtlApiTestContainer::OfferKeyEvent()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   389
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   390
    TKeyEvent key;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   391
    key.iCode = 0;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   392
    key.iScanCode = 0;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   393
    key.iModifiers = 0;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   394
    key.iRepeats = 0;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   395
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   396
    TRAPD( err, iBrCtlInterface->OfferKeyEventL( key, EEventNull ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   397
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   398
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   399
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   400
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   401
TInt CBrCtlApiTestContainer::BrCtlMinimumSize()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   402
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   403
    const TSize testSize = iBrCtlInterface->MinimumSize();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   404
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   405
    if ( testSize.iWidth > 0 && testSize.iHeight > 0 )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   406
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   407
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   408
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   409
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   410
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   411
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   412
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   413
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   414
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   415
TInt CBrCtlApiTestContainer::BrCtlSubscribeToMenuItemsL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   416
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   417
    TRAPD( err, iBrCtlInterface->LoadUrlL( KUrlLoadTestHtml2 ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   418
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   419
	const RPointerArray<TBrCtlSubscribeTo> &ptr = iBrCtlInterface->SubscribeToMenuItemsL();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   420
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   421
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   422
    }    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   423
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   424
TInt CBrCtlApiTestContainer::BrCtlContentSize()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   425
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   426
    TBool testPassed = EFalse;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   427
    TSize testSize;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   428
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   429
    if ( iBrCtlInterface )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   430
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   431
        testSize = iBrCtlInterface->ContentSize();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   432
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   433
        if ( testSize.iWidth == 0 && testSize.iHeight == 0 )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   434
            {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   435
            testPassed = ETrue;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   436
            }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   437
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   438
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   439
    return testPassed;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   440
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   441
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   442
TInt CBrCtlApiTestContainer::SetBrowserSettingL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   443
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   444
    iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages, 0 );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   445
        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   446
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   447
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   448
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   449
TInt CBrCtlApiTestContainer::BrowserSettingL( TUint& aSetting )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   450
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   451
    // value returned
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   452
    aSetting = iBrCtlInterface->BrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   453
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   454
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   455
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   456
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   457
TInt CBrCtlApiTestContainer::FocusedImageL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   458
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   459
    iBrCtlInterface->LoadFileL( KUrlLoadTestHtml );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   460
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   461
    iBrCtlInterface->SetFocus( ETrue, EDrawNow );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   462
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   463
    TBrCtlImageCarrier* res = iBrCtlInterface->FocusedImageLC();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   464
    CleanupStack::PopAndDestroy( res );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   465
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   466
    if ( res )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   467
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   468
        return KErrNone; 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   469
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   470
    else 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   471
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   472
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   473
        }        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   474
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   475
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   476
TInt CBrCtlApiTestContainer::AddCommandObserverL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   477
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   478
    iBrCtlInterface->AddCommandObserverL( this );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   479
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   480
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   481
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   482
TInt CBrCtlApiTestContainer::RemoveCommandObserver()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   483
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   484
    iBrCtlInterface->RemoveCommandObserver( this );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   485
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   486
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   487
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   488
TInt CBrCtlApiTestContainer::ImageCountL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   489
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   490
    return iBrCtlInterface->ImageCountL();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   491
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   492
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   493
TInt CBrCtlApiTestContainer::BrCtlFocusedElementTypeL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   494
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   495
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   496
    iBrCtlInterface->LoadUrlL( KUrlLoadTestHtml2 );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   497
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   498
    iBrCtlInterface->SetFocus( ETrue, EDrawNow );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   499
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   500
    iBrCtlInterface->FocusedElementType();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   501
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   502
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   503
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   504
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   505
TInt CBrCtlApiTestContainer::BrCtlSetParam()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   506
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   507
    _LIT( KContentType, "text/html");
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   508
    TRAPD( err, iBrCtlInterface->SetParamL( TBrCtlDefs::EParamsSelfDownoadableTypes, KContentType ) )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   509
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   510
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   511
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   512
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   513
TInt CBrCtlApiTestContainer::LoadSavedPageL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   514
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   515
    _LIT( KUid, "savedpage://4" );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   516
    _LIT( KSavedUrl, "c:\\BrCtlTest\\loadtest.saved" );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   517
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   518
    HBufC8* databuf = ReadFileLC( KSavedUrl );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   519
    HBufC16* bigbuf = HBufC::NewL( databuf->Des().Length() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   520
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   521
    bigbuf->Des().Copy( databuf->Des() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   522
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   523
    iBrCtlInterface->LoadSavedPageL( KUid, *bigbuf );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   524
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   525
    delete bigbuf;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   526
    CleanupStack::PopAndDestroy( databuf ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   527
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   528
    return KErrNone;    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   529
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   530
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   531
TInt CBrCtlApiTestContainer::SetSelfDownloadContentTypes()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   532
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   533
    TRAPD( err, iBrCtlInterface->SetSelfDownloadContentTypesL( (TDesC16&)KContentDataType() ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   534
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   535
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   536
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   537
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   538
TInt CBrCtlApiTestContainer::ZoomLevels()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   539
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   540
    RArray<TUint>* zoom = iBrCtlInterface->ZoomLevels();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   541
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   542
    if ( zoom->Count() > 0 )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   543
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   544
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   545
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   546
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   547
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   548
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   549
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   550
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   551
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   552
TInt CBrCtlApiTestContainer::AddOptionMenuItems()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   553
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   554
    TRAPD( err, iBrCtlInterface->AddOptionMenuItemsL( *iMenuPane, 0, 0 ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   555
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   556
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   557
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   558
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   559
TInt CBrCtlApiTestContainer::BrCtlInitLoadDataL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   560
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   561
    HBufC8* data = ReadFileLC( KUrlLoadTestHtml );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   562
    TDataType dataType( KContentDataType() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   563
    MBrCtlDataLoadConsumer* brCtlDataLoadConsumer = NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   564
    TUid uid;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   565
    uid.iUid = KCharacterSetIdentifierIso88591;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   566
    TRAPD( err, iBrCtlInterface->InitLoadDataL( KUrlLoadTestHtml, dataType, uid, data->Length(),
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   567
        this, &brCtlDataLoadConsumer ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   568
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   569
    if ( brCtlDataLoadConsumer )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   570
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   571
        brCtlDataLoadConsumer->HandleNextDataChunk( *data );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   572
        if ( !iCancelInitDataLoad )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   573
            {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   574
            brCtlDataLoadConsumer->HandleLoadComplete();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   575
            }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   576
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   577
        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   578
    iCancelInitDataLoad = EFalse;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   579
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   580
    CleanupStack::PopAndDestroy( data );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   581
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   582
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   583
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   584
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   585
TInt CBrCtlApiTestContainer::HandleDownloadCommand()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   586
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   587
    TBool testPassed = EFalse;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   588
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   589
    if ( iBrCtlInterface )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   590
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   591
        TRAPD( err, iBrCtlInterface->HandleDownloadCommandL( 0, TBrCtlDefs::EDownloadCmdMarkAsProgressive ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   592
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   593
            if ( err == KErrNone )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   594
            {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   595
            testPassed = ETrue;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   596
            }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   597
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   598
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   599
    if ( testPassed )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   600
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   601
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   602
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   603
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   604
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   605
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   606
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   607
    }   
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   608
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   609
TInt CBrCtlApiTestContainer::VersionInfoL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   610
  {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   611
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   612
  _LIT(KName, "S60 browser");
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   613
  _LIT(KVersion, "5.0");
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   614
  _LIT(KBuild, "0516");
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   615
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   616
  HBufC* verinfo = iBrCtlInterface->VersionInfoLC( TBrCtlDefs::EVersionInfoName );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   617
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   618
  if(!verinfo)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   619
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   620
    return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   621
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   622
  if (verinfo->Compare(KName()) != 0)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   623
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   624
    CleanupStack::PopAndDestroy( verinfo ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   625
    return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   626
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   627
  CleanupStack::PopAndDestroy( verinfo ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   628
  verinfo = 0;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   629
  verinfo = iBrCtlInterface->VersionInfoLC( TBrCtlDefs::EVersionInfoVersion );	
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   630
  if(!verinfo)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   631
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   632
  	return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   633
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   634
  if(verinfo->Compare(KVersion()) != 0)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   635
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   636
    CleanupStack::PopAndDestroy( verinfo ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   637
    return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   638
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   639
  CleanupStack::PopAndDestroy( verinfo ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   640
  verinfo = 0;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   641
  verinfo = iBrCtlInterface->VersionInfoLC( TBrCtlDefs::EVersionInfoBuild );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   642
  if(!verinfo)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   643
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   644
   	return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   645
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   646
  if(verinfo->Compare(KBuild()) != 0)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   647
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   648
    CleanupStack::PopAndDestroy( verinfo ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   649
    return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   650
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   651
  CleanupStack::PopAndDestroy( verinfo ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   652
  return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   653
  }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   654
TInt CBrCtlApiTestContainer::WmlOptionMenuItemsL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   655
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   656
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   657
    iBrCtlInterface->WMLOptionMenuItemsL();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   658
    return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   659
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   660
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   661
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   662
TInt CBrCtlApiTestContainer::BrCtlPostL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   663
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   664
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   665
    RFs rfs;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   666
    RFile file;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   667
    User::LeaveIfError( rfs.Connect() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   668
    CleanupClosePushL( rfs );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   669
    User::LeaveIfError( file.Open( rfs, KUrlLoadTestHtml(), EFileShareReadersOnly ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   670
    CleanupClosePushL( file );    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   671
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   672
    int size;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   673
    User::LeaveIfError( file.Size( size ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   674
    HBufC8* data = NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   675
    data = HBufC8::NewLC( size );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   676
    TPtr8 dataPtr( data->Des() );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   677
    User::LeaveIfError( file.Read( dataPtr ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   678
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   679
    //parse url
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   680
    HBufC* url16 = NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   681
    int pos = dataPtr.Find( _L8("\r\n") );                   
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   682
    if ( pos != KErrNotFound )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   683
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   684
        url16 = HBufC::NewLC( pos );                
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   685
        url16->Des().Copy( dataPtr.Mid( 0, pos ) ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   686
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   687
    else 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   688
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   689
        CleanupStack::PushL( url16 );        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   690
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   691
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   692
    //parse content type
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   693
    HBufC8* contenttype = NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   694
    int pos2 = dataPtr.Mid( pos+2 ).Find( _L8("\r\n") );                   
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   695
    if ( pos2 != KErrNotFound )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   696
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   697
        contenttype = HBufC8::NewLC( pos2 );                
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   698
        contenttype->Des().Copy( dataPtr.Mid( pos+2, pos2 ) );             
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   699
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   700
    else 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   701
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   702
        CleanupStack::PushL( contenttype );        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   703
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   704
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   705
    //parse post data
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   706
    HBufC8* postdata = NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   707
    int pos3 = dataPtr.Mid( pos+2+pos2+2 ).Find( _L8("\r\n") );                   
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   708
    if ( pos3 != KErrNotFound )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   709
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   710
        postdata = HBufC8::NewLC( pos3 );                
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   711
        postdata->Des().Copy( dataPtr.Mid( pos+2+pos2+2, pos3 ) );             
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   712
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   713
    else 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   714
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   715
        CleanupStack::PushL( postdata );        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   716
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   717
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   718
    //parse boundry
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   719
    HBufC8* boundry = NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   720
    int pos4 = dataPtr.Mid( pos+2+pos2+2+pos3+2 ).Find( _L8("\r\n") );                   
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   721
    if ( pos4 != KErrNotFound )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   722
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   723
        boundry = HBufC8::NewLC( pos4 );                
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   724
        boundry->Des().Copy( dataPtr.Mid(pos+2+pos2+2+pos3+2 , pos4) );             
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   725
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   726
    else 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   727
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   728
        CleanupStack::PushL( boundry );        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   729
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   730
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   731
    TAny* any = NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   732
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   733
    TRAPD( error, iBrCtlInterface->PostUrlL ( *url16, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   734
                                *contenttype, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   735
                                *postdata, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   736
                                boundry, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   737
                                any ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   738
	
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   739
/*	HBufC* urlTest = NULL;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   740
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   741
    TRAP( error, iBrCtlInterface->PostUrlL ( *urlTest, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   742
                                *contenttype, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   743
                                *postdata, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   744
                                boundry, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   745
                                any ) );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   746
                                
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   747
     HBufC8* contenttypeTest = NULL;                          
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   748
                                
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   749
     TRAP( error, iBrCtlInterface->PostUrlL ( *url16, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   750
                                *contenttypeTest, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   751
                                *postdata, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   752
                                boundry, 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   753
                                any ) );                           
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   754
*/
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   755
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   756
    CleanupStack::PopAndDestroy( boundry );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   757
    CleanupStack::PopAndDestroy( postdata );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   758
    CleanupStack::PopAndDestroy( contenttype );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   759
    CleanupStack::PopAndDestroy( url16 );    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   760
    CleanupStack::PopAndDestroy( data );                        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   761
    CleanupStack::PopAndDestroy( 2 ); // file, rfs        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   762
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   763
    return error;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   764
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   765
     
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   766
// Added for Widget Extension Test
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   767
TInt CBrCtlApiTestContainer::CreateBrCtlInterfaceAndWidgetExtensionL()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   768
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   769
    TPoint base( 0, 0 );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   770
    TPoint extent( 352, 295 );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   771
    TRect rect( base, extent );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   772
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   773
	iBrCtlInterface = CreateBrowserControlL(
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   774
        this,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   775
        rect,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   776
        TBrCtlDefs::ECapabilityLoadHttpFw |
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   777
        TBrCtlDefs::ECapabilityCursorNavigation|
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   778
        TBrCtlDefs::ECapabilityWebKitLite |
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   779
        TBrCtlDefs::ECapabilityClientResolveEmbeddedURL,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   780
        TBrCtlDefs::ECommandIdBase,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   781
        iBrCtlApiTestObserver, /* softkeys */
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   782
        iBrCtlApiTestObserver, /* link resolver */
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   783
        iBrCtlApiTestObserver, /* special load observer */
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   784
        iBrCtlApiTestObserver, /* layout observer */
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   785
        iBrCtlDialogs,  //iWidgetUiDialogsProviderProxy,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   786
        iBrCtlApiTestObserver, /* window observer */
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   787
        iBrCtlApiTestObserver /* download observer */
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   788
        ); 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   789
        
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   790
    iBrCtlInterface->AddLoadEventObserverL( iBrCtlApiTestObserver );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   791
    iBrCtlInterface->AddStateChangeObserverL( iBrCtlApiTestStateChangeObserver );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   792
    iBrCtlInterface->SetComponentsToInheritVisibility();
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   793
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   794
    iWidgetExtension = iBrCtlInterface->CreateWidgetExtensionL( *this );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   795
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   796
    if ( iWidgetExtension )
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   797
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   798
        return KErrNone;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   799
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   800
    else
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   801
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   802
        return KErrGeneral;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   803
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   804
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   805
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   806
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   807
TInt CBrCtlApiTestContainer::HistoryLoad1L()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   808
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   809
    TInt err( KErrNone );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   810
    if(iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   811
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   812
        TRAP(err, iBrCtlInterface->LoadUrlL(KUrlHistoryHandlerHtml1));
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   813
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   814
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   815
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   816
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   817
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   818
TInt CBrCtlApiTestContainer::HistoryLoad2L()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   819
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   820
    TInt err( KErrNone );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   821
    if(iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   822
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   823
        TRAP(err, iBrCtlInterface->LoadUrlL(KUrlHistoryHandlerHtml2));
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   824
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   825
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   826
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   827
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   828
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   829
TInt CBrCtlApiTestContainer::HistoryLoad3L()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   830
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   831
    TInt err( KErrNone );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   832
    if(iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   833
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   834
        TRAP(err, iBrCtlInterface->LoadUrlL(KUrlHistoryHandlerHtml3));
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   835
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   836
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   837
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   838
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   839
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   840
TInt CBrCtlApiTestContainer::WMLLoad1L()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   841
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   842
    TInt err( KErrNone );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   843
    if(iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   844
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   845
        TRAP(err, iBrCtlInterface->LoadUrlL(KUrlLoadTestWml1));
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   846
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   847
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   848
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   849
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   850
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   851
TInt CBrCtlApiTestContainer::WMLLoad2L()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   852
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   853
    TInt err( KErrNone );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   854
    if(iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   855
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   856
        TRAP(err, iBrCtlInterface->LoadUrlL(KUrlLoadTestWml2));
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   857
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   858
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   859
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   860
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   861
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   862
TInt CBrCtlApiTestContainer::WMLLoad3L()
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   863
    {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   864
    TInt err( KErrNone );
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   865
    if(iBrCtlInterface)
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   866
        {
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   867
        TRAP(err, iBrCtlInterface->LoadUrlL(KUrlLoadTestWml3));
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   868
        }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   869
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   870
    return err;
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   871
    }
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   872
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   873
// Dummy function definitions for the MWidgetCallback functions
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   874
TBool CBrCtlApiTestContainer::DialogMimeFileSelectLC(HBufC*& /* aSelectedFileName */,
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   875
                         const TDesC& /* aMimeType */) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   876
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   877
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   878
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   879
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   880
/**
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   881
* Called to show or hide softkeys
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   882
* @since 3.1
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   883
* @param aVisible ETrue to show softkeys, EFalse when full screen is needed
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   884
*/
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   885
void CBrCtlApiTestContainer::SetSoftkeysVisible(TBool /* aVisible */) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   886
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   887
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   888
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   889
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   890
/**
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   891
* Called to change the display orientation to landscape
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   892
* @since 3.1
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   893
*/
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   894
void CBrCtlApiTestContainer::SetDisplayMode(TBrCtlDefs::TBrCtlOrientation /* aOrientation */) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   895
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   896
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   897
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   898
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   899
//Reserved for future use
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   900
TInt CBrCtlApiTestContainer::Reserved_1(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   901
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   902
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   903
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   904
TInt CBrCtlApiTestContainer::Reserved_2(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   905
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   906
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   907
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   908
TInt CBrCtlApiTestContainer::Reserved_3(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   909
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   910
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   911
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   912
TInt CBrCtlApiTestContainer::Reserved_4(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   913
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   914
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   915
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   916
TInt CBrCtlApiTestContainer::Reserved_5(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   917
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   918
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   919
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   920
TInt CBrCtlApiTestContainer::Reserved_6(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   921
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   922
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   923
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   924
TInt CBrCtlApiTestContainer::Reserved_7(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   925
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   926
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   927
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   928
TInt CBrCtlApiTestContainer::Reserved_8(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   929
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   930
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   931
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   932
TInt CBrCtlApiTestContainer::Reserved_9(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   933
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   934
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   935
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   936
TInt CBrCtlApiTestContainer::Reserved_10(TAny*& a0, TAny* a1, TAny* a2) 
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   937
	{
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   938
		
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   939
	}
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   940
    
235c00e46fb7 Added Symbian3 smoketests
Maciej Seroka <maciejs@symbian.org>
parents:
diff changeset
   941
// End of File